Enabled coloring of the point in a GrowFromPoint animation

This commit is contained in:
Grant Sanderson
2018-02-26 19:01:44 -08:00
parent a302a6bf04
commit 226f0153bd
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -144,7 +144,6 @@ class ContinualChangingDecimal(ContinualAnimation):
def update_mobject(self, dt):
self.anim.update(self.internal_time)