Avoid using set_points in Rotation

This commit is contained in:
Grant Sanderson
2023-01-05 08:29:59 -05:00
parent 0d433b075e
commit f5455bb554

View File

@ -40,8 +40,12 @@ class Rotating(Animation):
)
def interpolate_mobject(self, alpha: float) -> None:
for sm1, sm2 in self.get_all_families_zipped():
sm1.set_points(sm2.get_points())
pairs = zip(
self.mobject.family_members_with_points(),
self.starting_mobject.family_members_with_points(),
)
for sm1, sm2 in pairs:
sm1.data["points"][:] = sm2.data["points"]
self.mobject.rotate(
self.rate_func(alpha) * self.angle,
axis=self.axis,