mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Change it so that reset points is not necessarily called on mobject initialization
This commit is contained in:
parent
e2fc0ab1aa
commit
369a7fc455
1 changed files with 2 additions and 5 deletions
|
@ -32,7 +32,6 @@ class Mobject(object):
|
||||||
"""
|
"""
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"color": WHITE,
|
"color": WHITE,
|
||||||
"name": None,
|
|
||||||
"dim": 3,
|
"dim": 3,
|
||||||
# Lighting parameters
|
# Lighting parameters
|
||||||
# Positive gloss up to 1 makes it reflect the light.
|
# Positive gloss up to 1 makes it reflect the light.
|
||||||
|
@ -59,11 +58,9 @@ class Mobject(object):
|
||||||
self.submobjects = []
|
self.submobjects = []
|
||||||
self.parents = []
|
self.parents = []
|
||||||
self.family = [self]
|
self.family = [self]
|
||||||
if self.name is None:
|
|
||||||
self.name = self.__class__.__name__
|
|
||||||
|
|
||||||
self.init_updaters()
|
self.init_updaters()
|
||||||
self.reset_points()
|
self.points = np.zeros((0, self.dim))
|
||||||
self.init_points()
|
self.init_points()
|
||||||
self.init_colors()
|
self.init_colors()
|
||||||
self.init_shader_data()
|
self.init_shader_data()
|
||||||
|
@ -74,7 +71,7 @@ class Mobject(object):
|
||||||
self.apply_depth_test()
|
self.apply_depth_test()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(self.name)
|
return self.__class__.__name__
|
||||||
|
|
||||||
def reset_points(self):
|
def reset_points(self):
|
||||||
self.points = np.zeros((0, self.dim))
|
self.points = np.zeros((0, self.dim))
|
||||||
|
|
Loading…
Add table
Reference in a new issue