mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Make sure rgbas will be resized if bigger than Mobject.data
This commit is contained in:
parent
f2d71e6521
commit
5952f9ea74
1 changed files with 1 additions and 1 deletions
|
@ -1320,7 +1320,7 @@ class Mobject(object):
|
||||||
data = mob.data if mob.has_points() > 0 else mob._data_defaults
|
data = mob.data if mob.has_points() > 0 else mob._data_defaults
|
||||||
if color is not None:
|
if color is not None:
|
||||||
rgbs = np.array(list(map(color_to_rgb, listify(color))))
|
rgbs = np.array(list(map(color_to_rgb, listify(color))))
|
||||||
if 1 < len(rgbs) < len(data):
|
if 1 < len(rgbs):
|
||||||
rgbs = resize_with_interpolation(rgbs, len(data))
|
rgbs = resize_with_interpolation(rgbs, len(data))
|
||||||
data[name][:, :3] = rgbs
|
data[name][:, :3] = rgbs
|
||||||
if opacity is not None:
|
if opacity is not None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue