mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 20:43:56 +08:00
Ensure align_family works well with VMobject fill
This commit is contained in:
@ -1673,10 +1673,13 @@ class Mobject(object):
|
||||
for submob, sf in zip(self.submobjects, split_factors):
|
||||
new_submobs.append(submob)
|
||||
for k in range(1, sf):
|
||||
new_submobs.append(submob.copy().scale(0))
|
||||
new_submobs.append(submob.invisible_copy())
|
||||
self.set_submobjects(new_submobs)
|
||||
return self
|
||||
|
||||
def invisible_copy(self):
|
||||
return self.copy().set_opacity(0)
|
||||
|
||||
# Interpolate
|
||||
|
||||
def interpolate(
|
||||
|
@ -878,6 +878,12 @@ class VMobject(Mobject):
|
||||
mob.get_joint_products()
|
||||
return self
|
||||
|
||||
def invisible_copy(self):
|
||||
result = self.copy()
|
||||
result.append_vectorized_mobject(self.copy().reverse_points())
|
||||
result.set_opacity(0)
|
||||
return result
|
||||
|
||||
def insert_n_curves(self, n: int, recurse: bool = True):
|
||||
for mob in self.get_family(recurse):
|
||||
if mob.get_num_curves() > 0:
|
||||
@ -1107,6 +1113,7 @@ class VMobject(Mobject):
|
||||
if refresh:
|
||||
self.refresh_triangulation()
|
||||
self.refresh_joint_products()
|
||||
return self
|
||||
return wrapper
|
||||
|
||||
@triggers_refreshed_triangulation
|
||||
|
Reference in New Issue
Block a user