Change Mobject.append_points

For future plans, it may be nicest for data["points"] to only ever get redefined by Mobject.resize_points
This commit is contained in:
Grant Sanderson 2022-12-28 09:22:22 -08:00
parent 97be203b57
commit a6e21b2ccd

View file

@ -181,7 +181,9 @@ class Mobject(object):
return self
def append_points(self, new_points: Vect3Array):
self.data["points"] = np.vstack([self.data["points"], new_points])
n = self.get_num_points()
self.resize_points(n + len(new_points))
self.data["points"][n:] = new_points
self.refresh_bounding_box()
return self