mirror of
https://github.com/3b1b/manim.git
synced 2025-11-15 05:17:47 +00:00
Bug fix to bug fix on Mobject.fade method
This commit is contained in:
parent
8f8eeea870
commit
6816014023
1 changed files with 3 additions and 3 deletions
|
|
@ -307,13 +307,13 @@ class Mobject(object):
|
|||
return self
|
||||
|
||||
def fade_to(self, color, alpha):
|
||||
self.rgbs = interpolate(self.rgbs, np.array(Color(color).rgb), 1-alpha)
|
||||
self.rgbs = interpolate(self.rgbs, np.array(Color(color).rgb), alpha)
|
||||
for mob in self.sub_mobjects:
|
||||
mob.fade_to(color, alpha)
|
||||
return self
|
||||
|
||||
def fade(self, brightness = 0.5):
|
||||
self.fade_to(BLACK, brightness)
|
||||
def fade(self, darkness = 0.5):
|
||||
self.fade_to(BLACK, darkness)
|
||||
return self
|
||||
|
||||
def reduce_across_dimension(self, points_func, reduce_func, dim):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue