Grant Sanderson
744e695340
Misc. clean up ( #2269 )
...
* Comment tweak
* Directly print traceback
Since the shell.showtraceback is giving some issues
* Make InteracrtiveSceneEmbed into a class
This way it can keep track of it's internal shell; use of get_ipython has a finicky relationship with reloading.
* Move remaining checkpoint_paste logic into scene_embed.py
This involved making a few context managers for Scene: temp_record, temp_skip, temp_progress_bar, which seem useful in and of themselves.
* Change null key to be the empty string
* Ensure temporary svg paths for Text are deleted
* Remove unused dict_ops.py functions
* Remove break_into_partial_movies from file_writer configuration
* Rewrite guarantee_existence using Path
* Clean up SceneFileWriter
It had a number of vestigial functions no longer used, and some setup that could be made more organized.
* Remove --save_pngs CLI arg (which did nothing)
* Add --subdivide CLI arg
* Remove add_extension_if_not_present
* Remove get_sorted_integer_files
* Have find_file return Path
* Minor clean up
* Clean up num_tex_symbols
* Fix find_file
* Minor cleanup for extract_scene.py
* Add preview_frame_while_skipping option to scene config
* Use shell.showtraceback function
* Move keybindings to config, instead of in-place constants
* Replace DEGREES -> DEG
2024-12-12 08:39:54 -08:00
Grant Sanderson
9ac16ab722
Remove DEFAULT_FPS constant
...
It's a bit silly to have it's valued defined by camera_config, when it's only function is to be a default value for Camera's configuration
2024-12-10 20:19:25 -06:00
Grant Sanderson
4cc2e5ed17
Consolidate camera configuration
2024-12-10 11:39:13 -06:00
Varniex
5d3f730824
Cleaning up some imports + Minor Bug fixed in VectorField ( #2253 )
...
* cleaning up imports
* sample_points -> sample_coords
2024-12-05 14:42:46 -08:00
Varniex
04295ec177
Minor Bug fixed: window's bg color now changing.
2024-10-20 16:53:47 +05:30
Grant Sanderson
6d23df0497
Clean up changes associated with fixing aspect ratio issue
2024-09-06 12:50:19 -05:00
Grant Sanderson
1f55832a6a
Clean up around z_index
2024-09-06 12:20:26 -05:00
Grant Sanderson
8f1299929f
Swap window buffer after blit from another fbo
2024-09-06 11:15:38 -05:00
Grant Sanderson
441ac77eae
Change Euler axis limits for xz flat plane
2024-08-26 08:22:29 -05:00
Grant Sanderson
058914fdd2
Mildly more efficient CameraFrame.get_view_matrix()
2024-08-19 16:54:29 -05:00
Grant Sanderson
902a4f264e
Add white space after assert statements
2024-08-16 12:15:55 -05:00
Grant Sanderson
a5ba721f96
Cease useless rendering
...
Change so that with a live window, rendering only happens if there has been an event (mouse motion, key press, etc.) to respond to.
2024-08-15 14:03:16 -05:00
Grant Sanderson
bc91e91634
In get_euler_angles, add edge case for gimbal lock on the low side
2024-08-07 14:11:10 -05:00
Grant Sanderson
b45c71d3c2
Account for Gimbal lock in panning
2024-08-05 16:58:03 -05:00
Grant Sanderson
ed3ac74d67
Add option to change Euler axes
2024-02-13 14:48:56 -06:00
Grant Sanderson
4aef0d1bf5
Add add_ambient_rotation
2024-02-03 18:48:16 -06:00
Grant Sanderson
661814deea
Add all orientation options into CameraFrame.reorient
2024-02-03 18:48:07 -06:00
Grant Sanderson
d10745a379
Have CameraFrame.get_view_matrix and and CameraFrame.get_implied_camera_location use _data_has_changed instead of a refresh arg
2023-02-02 20:47:12 -08:00
Grant Sanderson
d3a4d81a63
Remove commended code
2023-01-31 16:08:43 -08:00
Grant Sanderson
fca5770b9f
Fix Camera.blit
2023-01-31 16:06:53 -08:00
Grant Sanderson
3b0c958189
Check case of scale = 0 in get_view_matrix
2023-01-31 15:37:03 -08:00
Grant Sanderson
92e4d43ca3
Make sure camera location is not computed more times than it needs to be
2023-01-31 12:29:49 -08:00
Grant Sanderson
424db4b3e4
Ensure view matrix is not computed more than it needs to be
2023-01-31 12:20:25 -08:00
Grant Sanderson
9017df847d
Add Camera.blit, and use it when there's a window, but the used fbo is not the window's
2023-01-30 20:38:13 -08:00
Grant Sanderson
daaaba0a67
Use frame_scale uniform instead of frame_shape
2023-01-30 15:10:41 -08:00
Grant Sanderson
af69cf9c7d
Track field of view instead of focal_dist_to_height
2023-01-30 15:02:33 -08:00
Grant Sanderson
71bd3edb09
Fix frame scaling
2023-01-30 15:02:04 -08:00
Grant Sanderson
277c471c90
Refactor so that view matrix incorporates frame scaling
2023-01-30 14:15:39 -08:00
Grant Sanderson
285953b44d
Add FRAME_SHAPE constant
2023-01-30 11:57:01 -08:00
Grant Sanderson
2705ba3afa
Fix CameraFrame.to_fixed_frame_point
2023-01-28 22:58:05 -08:00
Grant Sanderson
91f69be3e0
Add CameraFrame.to_fixed_frame_point
2023-01-28 22:30:00 -08:00
Grant Sanderson
28c4921a1a
Specify ctx type
2023-01-28 15:40:58 -08:00
Grant Sanderson
fbde9e8bba
Check for null orientation in getting euler angles
2023-01-28 13:06:08 -08:00
Grant Sanderson
5deef1c249
Allow for setting a default frame orientation
2023-01-28 12:02:19 -08:00
Grant Sanderson
3a0916fe3a
Reorganize fbo initialization
2023-01-27 10:12:53 -08:00
Grant Sanderson
e9333a908c
Move camera.clear call into 'capture'
2023-01-26 20:38:38 -08:00
Grant Sanderson
a1595a9e2f
Use separate fbo for writing to file when window is active
2023-01-25 22:34:11 -08:00
Grant Sanderson
a601384211
Remove stray imports
2023-01-25 19:23:22 -08:00
Grant Sanderson
424707d035
Move rendering more fully away from Camera to Mobject and ShaderWrapper
2023-01-25 14:13:56 -08:00
Grant Sanderson
2c737ed540
Move most of rendering logic to ShaderWrapper
2023-01-25 13:45:18 -08:00
Grant Sanderson
c94d8fd3b0
Move Texture handling and vao creation outside of Camera
2023-01-25 12:10:39 -08:00
Grant Sanderson
3299741359
Move program code to ShaderWrapper, away from Camera
2023-01-25 11:23:31 -08:00
Grant Sanderson
10047773f7
Have ShaderWrapper track OpenGL context
2023-01-25 10:49:30 -08:00
Grant Sanderson
8c1e5f3b42
Change use_clip_plane to be a function
2023-01-25 10:31:05 -08:00
Grant Sanderson
3339aad29e
Separate CameraFrame into its own file
2023-01-25 10:19:44 -08:00
Grant Sanderson
7deaf4cb11
Small clean up
2023-01-25 09:51:27 -08:00
Grant Sanderson
272925fa19
Change winding fill blend_func
2023-01-24 21:46:52 -08:00
Grant Sanderson
088a2f65a3
Misc. clean up
2023-01-24 21:10:57 -08:00
Grant Sanderson
f0df5c759d
Make winding fill optional, and make winding additive rather than toggling
2023-01-24 20:03:23 -08:00
Grant Sanderson
72da9786a3
Use null array for vert indices in place of None
2023-01-24 15:53:43 -08:00