Commit graph

332 commits

Author SHA1 Message Date
Grant Sanderson
2ba9243067 Merge branch 'master' of github.com:3b1b/manim into video-work 2022-04-23 09:03:53 -07:00
Grant Sanderson
f70e91348c Remove Mobject.interaction_allowed, in favor of using _is_animating for multiple purposes 2022-04-22 23:14:57 -07:00
Grant Sanderson
62289045cc Fix animating Mobject.restore bug 2022-04-22 19:42:47 -07:00
Grant Sanderson
3961005fd7 Rename is_movable to interaction_allowed 2022-04-22 19:17:39 -07:00
Grant Sanderson
59506b89cc Revert to original copying scheme 2022-04-22 19:02:44 -07:00
Grant Sanderson
4d8698a0e8 Add Mobject.deserialize 2022-04-22 11:42:26 -07:00
Grant Sanderson
1b2460f02a Remove refresh_shader_wrapper_id from Mobject.become 2022-04-22 08:14:05 -07:00
YishiMichael
37075590b5
Sort imports 2022-04-22 16:42:45 +08:00
YishiMichael
f226aa7314
Merge branch '3b1b:master' into master 2022-04-22 15:02:59 +08:00
Grant Sanderson
f53f202dcd A few small cleanups 2022-04-21 15:00:58 -07:00
Grant Sanderson
fe3e10acd2 Updates to copying based on pickle serializing 2022-04-21 14:32:27 -07:00
Grant Sanderson
c04615c4e9 In Mobject.set_uniforms, copy uniforms that are numpy arrays 2022-04-21 14:30:39 -07:00
Grant Sanderson
996d71c49e Add fallback for Mobject copying for unpicklable objects 2022-04-20 22:53:49 -07:00
Grant Sanderson
d24b8ff48f
Merge branch 'master' into master 2022-04-20 22:40:11 -07:00
Grant Sanderson
1b009a4b03 Simplify Mobject.copy to just use pickle serialization 2022-04-20 22:07:10 -07:00
Grant Sanderson
a0c46ef3bf Have set_animating_status recurse over family 2022-04-20 21:46:43 -07:00
Grant Sanderson
4839037503 Update Mobject.make_movable to recurse over family 2022-04-20 21:44:42 -07:00
Grant Sanderson
f636199d9a Add Mobject.get_all_corners 2022-04-20 21:43:16 -07:00
Grant Sanderson
50f5d20cc3 Allow for saving and loading mobjects from file 2022-04-20 21:42:59 -07:00
Grant Sanderson
2dd2fb500e Remove Mobject.get_highlight 2022-04-20 21:42:22 -07:00
Grant Sanderson
c1716895c0 Add Mobject.is_touching 2022-04-20 21:42:07 -07:00
Grant Sanderson
135f68de35 Update Mobject.is_point_touching 2022-04-20 21:41:47 -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
29816fa74c Add get_highlight 2022-04-14 14:37:38 -07:00
Grant Sanderson
95f56f5e80 Be sure has_updater_status is properly updated after clear 2022-04-14 14:37:12 -07:00
YishiMichael
4c324767bd
Recover Mobject.scale method 2022-04-15 00:55:02 +08:00
YishiMichael
b11ce7ff7c
Adjust annotation 2022-04-12 20:22:13 +08:00
YishiMichael
296ab84b46
Adjust annotation 2022-04-12 20:21:25 +08:00
YishiMichael
9ef9961d0e
Sort imports 2022-04-12 19:19:59 +08:00
Grant Sanderson
3b847da9ea Update parent updater status when adding updaters 2022-04-06 13:04:05 -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
8b1f0a8749 Refactor Mobject.set_rgba_array_by_color 2022-03-22 10:35:49 -07:00
TonyCrane
61c70b426c
remove unnecessary import 2022-02-14 21:43:22 +08:00
TonyCrane
9bdcc8b635
style: remove quotes of annotations according to PEP 563 2022-02-14 21:41:45 +08:00
TonyCrane
7fb6f352c4
fix: fix some bugs caused by type hints and imports 2022-02-14 20:02:24 +08:00
TonyCrane
a0ed9edb42
resolve conflict 2022-02-14 14:12:06 +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
TonyCrane
9a8aee481d
chore: add type hints to manimlib.event_handler 2022-02-13 20:03:05 +08:00
TonyCrane
992e61ddf2
style: rename Color type to ManimColor 2022-02-13 19:02:28 +08:00
TonyCrane
e78113373a
chore: add type hints to manimlib.mobject.mobject 2022-02-13 15:11:35 +08:00
YishiMichael
67f5b10626
Attempt to refactor SVGMobject with svgelements (#1731)
* Some small refactors

* Refactor MTex

* Implement TransformMatchingMTex

* Some refactors

* Some refactors

* Some small refactors

* Strip strings before matching

* Implement get_submob_tex

* Use RGB color mode

* Some small refactors

* Try refactoring SVGMobject with svglib

* Refactor SVGMobject using svgelements

* Refactor SVGMobject using svgelements

* Use functions instead of func names as dict values

* style: modify import order to conform to PEP8

* Set default values to None

* modify import order

* Remove unused import

Co-authored-by: TonyCrane <tonycrane@foxmail.com>
2022-02-11 07:53:21 -08:00
TonyCrane
d2e0811285
import Iterable from collections.abc instead of collections 2022-02-04 10:55:59 +08:00
TonyCrane
92adcd75d4
add style support to svg 2022-01-26 13:53:53 +08:00
TonyCrane
1658438fef
allow Mobject.scale receive iterable scale_factor 2022-01-25 14:05:32 +08:00
Grant Sanderson
49743daf32 Add Mobject.insert_submobject method 2021-11-30 11:30:50 -08:00
Grant Sanderson
ba23fbe71e Make sure Mobject.is_fixed_in_frame stays updated with uniforms 2021-11-30 11:30:34 -08:00
Grant Sanderson
5930e6a176 Refresh unit normal when reversing points 2021-11-09 09:15:15 -08:00
Grant Sanderson
81c3ae3037 Have separate notions of gloss and reflectiveness 2021-11-08 21:46:09 -08:00
Grant Sanderson
5a0e5a16ea
Merge pull request #1667 from TurkeyBilly/master
Overridden add operations for mobjects
2021-11-01 13:17:16 -07:00
Grant Sanderson
f0b5181694
Update manimlib/mobject/mobject.py
Small bug fix to Mobject.__add__
2021-11-01 13:16:50 -07:00