mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 05:52:34 +08:00
Enabled coloring of the point in a GrowFromPoint animation
This commit is contained in:
@ -101,9 +101,15 @@ class Swap(CyclicReplace):
|
||||
pass #Renaming, more understandable for two entries
|
||||
|
||||
class GrowFromPoint(Transform):
|
||||
CONFIG = {
|
||||
"point_color" : None,
|
||||
}
|
||||
def __init__(self, mobject, point, **kwargs):
|
||||
digest_config(self, kwargs)
|
||||
target = mobject.copy()
|
||||
point_mob = Point(point)
|
||||
if self.point_color:
|
||||
point_mob.highlight(self.point_color)
|
||||
mobject.replace(point_mob)
|
||||
mobject.highlight(point_mob.get_color())
|
||||
Transform.__init__(self, mobject, target, **kwargs)
|
||||
|
@ -144,7 +144,6 @@ class ContinualChangingDecimal(ContinualAnimation):
|
||||
|
||||
def update_mobject(self, dt):
|
||||
self.anim.update(self.internal_time)
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user