mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
In VMobject.set_stroke, Don't use resize_with_interpolation for non-list args
This commit is contained in:
parent
93f3c6535f
commit
dbeef42600
1 changed files with 3 additions and 4 deletions
|
@ -199,10 +199,9 @@ class VMobject(Mobject):
|
|||
if width is not None:
|
||||
for mob in self.get_family(recurse):
|
||||
data = mob.data if mob.get_num_points() > 0 else mob._data_defaults
|
||||
width_arr = np.array(listify(width)).flatten()
|
||||
if len(width_arr) == 0:
|
||||
continue
|
||||
data['stroke_width'][:, 0] = resize_with_interpolation(width_arr, len(data))
|
||||
if not isinstance(width, float | int):
|
||||
width = resize_with_interpolation(np.array(width), len(data)).flatten()
|
||||
data['stroke_width'][:, 0] = width
|
||||
|
||||
if background is not None:
|
||||
for mob in self.get_family(recurse):
|
||||
|
|
Loading…
Add table
Reference in a new issue