mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
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:
parent
97be203b57
commit
a6e21b2ccd
1 changed files with 3 additions and 1 deletions
|
@ -181,7 +181,9 @@ class Mobject(object):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def append_points(self, new_points: Vect3Array):
|
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()
|
self.refresh_bounding_box()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue