Commit graph

130 commits

Author SHA1 Message Date
Grant Sanderson
b2e0aee93e Get rid of ctrl + shift + e embed option 2022-04-22 11:46:18 -07:00
Grant Sanderson
cf466006fa Add undo and redo stacks for scene, together with Command + Z functionality 2022-04-22 11:44:28 -07:00
Grant Sanderson
e0f5686d66 Fix bug with trying to close window during embed 2022-04-22 10:16:43 -07:00
Grant Sanderson
581228b08f Have scene keep track of a map from mobject ids to mobjects for all it's ever seen 2022-04-22 08:33:57 -07:00
Grant Sanderson
c96bdc243e Update Scene.embed to play nicely with gui interactions 2022-04-22 08:16:17 -07:00
Grant Sanderson
78a7078772 Move saved mobject directory logic to scene_file_writer.py 2022-04-21 15:02:11 -07:00
Grant Sanderson
68e2909af1 Mild cleanup to Scene interactivity 2022-04-20 21:50:37 -07:00
Grant Sanderson
777b6d3778 Allow for saving and loading mobjects from file at the Scene level 2022-04-20 21:49:57 -07:00
Grant Sanderson
97400a5cf2 Update Scene.save_state and Scene.restore 2022-04-20 21:49:38 -07:00
Grant Sanderson
cb768c26a0 Add functionality for recovering mobjects from their ids (to enable copying and pasting) 2022-04-20 21:48:58 -07:00
Grant Sanderson
50565fcd7a Change the way changing-vs-static mobjects are tracked
Previously, Camera would keep track of which mobjects are supposed to be "static", so that it could generated their render groups once and not repeat unnecessarily. This had an awkward dependence where Scene would then need to keep track of which mobjects should and should not be considered static.

This update pushes that logic to the Mobject level, where it keeps track internally of whether it's being animated, has an updater, or can be moved around by the mouse.
2022-04-14 16:27:58 -07:00
Grant Sanderson
6a01e36b36 Minor cleanup 2022-04-14 14:36:17 -07:00
Grant Sanderson
e74cb85182 Remove unnecessary close of ProgressDisplay 2022-03-30 13:14:29 -07:00
Grant Sanderson
a9349057ad Merge branch 'master' of github.com:3b1b/manim into video-work 2022-03-22 11:30:25 -07:00
Grant Sanderson
9d0cc810c5 Make panning more sensitive to mouse movements 2022-03-22 10:36:48 -07:00
TonyCrane
4fbe948b63
style: insert an empty line after import 2022-02-16 21:08:25 +08:00
TonyCrane
9f3b404df6
resolve conflict and add type hints for it 2022-02-16 11:46:55 +08:00
Grant Sanderson
46e356e791 Change keyboard shortcut to drop into an embedding to be ctrl+shift+e 2022-02-15 10:10:57 -08:00
Grant Sanderson
133724d29a Allow for using right arrow in presenter mode 2022-02-14 07:56:26 -08:00
Grant Sanderson
559b96e7ce Small bug fix for presenter mode 2022-02-14 07:52:06 -08:00
TonyCrane
be5de32d70
chore: add type hints to manimlib.scene 2022-02-14 21:22:18 +08:00
Grant Sanderson
602809758e
Video work (#1739)
* Enable setting points to a null list, and adding one point at a time.

* Add refresh_locked_data

* Add presenter mode to scenes with -p option

* Allow for an embed by hitting e during interaction

* Add set_min_height, etc.

* Make sure null parametric curve has at least one point

* Account for edge case where \{ is used in Tex

* Allow for logging notes in wait calls, useful for presenter mode

* Simplify choose, and add gen_choose for fractional amounts

* Default to no top on axes

* Allow match_x, match_y, etc. to take in a point

* Allow wait calls to ignore presenter mode

* Just use math.combo, no caching with choose(n, r)

* Use generator instead of list in bezier

* Bubble init_colors should override

* Account for "px" values read in from an svg

* Stop displaying when writing is happening

* Update the way Bubble override SVG colors
2022-02-13 15:16:16 -08:00
Grant Sanderson
5dd7cce67f Have Scene.wait only go through full progression during skipping when there are time-based updaters 2021-12-07 10:05:33 -08:00
Grant Sanderson
f21a4a4696 Only stop skipping if the scene wasn't originally meant to be 2021-12-07 10:04:28 -08:00
Grant Sanderson
98b0d266d2 Make sure skip_animations and start_at_animation_number play well together 2021-12-07 10:03:10 -08:00
Grant Sanderson
9dd1f47dab Create single progress display for full scene render
When a scene is written to file, it will now do a preliminary run of a copy of the scene with skip_animations turned on to count the total frames, which has the added benefit of catching runtime errors early, and allowing an quicker preview of the last frame to be sure everything will render as expected.

The Progress display bars for individual animations are replaced with a more global progress display bar showing the full render time for the scene.

This has the downside that all the non-rendering computations in a scene are run twice, so any scene with slow computations unrelated to rendering will take longer. But those are rarer, so the benefits seem worth it.
2021-11-30 11:41:33 -08:00
Grant Sanderson
7070777408 Tiny formatting change 2021-11-12 15:47:23 -08:00
Michael W
0e574882b3
Refactor #1637 (#1650)
* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Update config.py

Co-authored-by: 鹤翔万里 <tonycrane@foxmail.com>
2021-10-16 13:04:52 +08:00
Grant Sanderson
4466cfe727
Merge branch 'master' into add_warnings 2021-10-15 12:12:36 -07:00
Grant Sanderson
f22a341e84 Save state before each embed 2021-10-11 06:22:41 -07:00
TonyCrane
7425057d9f use rich to log 2021-10-07 17:37:10 +08:00
TonyCrane
fbccb1ebf3 add tips for embed mode 2021-10-06 17:34:46 +08:00
TonyCrane
f626a1a1e2 add tips for interactive mode 2021-10-06 17:28:18 +08:00
Grant Sanderson
acba13f499 Add Scene.point_to_mobject 2021-08-22 14:57:32 -07:00
Grant Sanderson
0787c4f362 Make sure framerate is 30 for previewed scenes 2021-08-21 17:07:20 -07:00
slowy07
1e621e8278 fix: fix typo spelling grammar 2021-08-07 22:25:26 +07:00
Grant Sanderson
354db4423f
Merge pull request #1578 from nutanstrek/patch-1
Minor fix for zooming
2021-07-28 07:50:42 -07:00
Paras Sharma
4940ccac7d
Minor fix for zooming
It's weird that when you Scroll Up, the interactive shell zooms out.

So to fix this replace factor -> 1/factor .
2021-07-14 13:56:20 +05:30
Eric Brown
275cf94b06
Add frame to the scene when initialization
If we add an updater to the frame of the camera, and have not added the frame into the scene before, the updater will not work. So, I suggest to add the frame to the objects of the scene at the initilization stage.
2021-06-29 23:03:08 +08:00
Grant Sanderson
d1fc6c8ed7 Merge branch 'master' of github.com:3b1b/manim 2021-02-23 12:01:00 -08:00
Grant Sanderson
5008e20b8e Tiny PEP fix 2021-02-23 11:59:08 -08:00
Casper da Costa-Luis
c92b6dbd0b
correct ascii fallback 2021-02-19 17:04:29 +00:00
Grant Sanderson
9bf51bda02 Remove unnecessary import 2021-02-12 13:34:50 -08:00
Grant Sanderson
e1e7b1e6c1 Changes to make reduce the time of from manimlib import * 2021-02-11 12:22:37 -08:00
Grant Sanderson
1798875396 Call Window.init_mgl_context and reorder Window.__init__ 2021-02-10 14:48:00 -08:00
friedkeenan
d24ba30fde Add .animate syntax 2021-02-10 07:43:46 -06:00
Thierry Parmentelat
e7251bcc2f handle_play_like_call decorator to use functools.wraps
this way, decorated methods - typically Scene.play - have a decent docstring
so first-time users can use help()
2021-02-05 11:10:17 +01:00
Grant Sanderson
521e3ef143 Include wait in the embed shortcut commends 2021-02-03 14:19:20 -08:00
Sahil Makhijani
7b614bc968 Refactored Event Dispatching Mechanism 2021-02-02 16:04:50 +05:30
Sahil Makhijani
d6b23324a6 Interactive Mobjects Performance Improvements 2021-01-31 16:05:55 +05:30