mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 14:03:59 +08:00
More robust Mobject.become
This commit is contained in:
@ -977,12 +977,9 @@ class Mobject(Container):
|
||||
Edit points, colors and submobjects to be idential
|
||||
to another mobject
|
||||
"""
|
||||
self.align_points(mobject)
|
||||
self.interpolate(self, mobject, 1)
|
||||
self.submobjects = [
|
||||
sm.copy() if copy_submobjects else sm
|
||||
for sm in mobject.submobjects
|
||||
]
|
||||
self.align_data(mobject)
|
||||
for sm1, sm2 in zip(self.get_family(), mobject.get_family()):
|
||||
sm1.interpolate(sm1, sm2, 1)
|
||||
return self
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user