Skip to content

Commit b9784a0

Browse files
store color data (#3134)
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
1 parent 80795d8 commit b9784a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

manim/mobject/opengl/opengl_surface.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ def get_shader_data(self):
261261
shader_data["du_point"] = du_points
262262
shader_data["dv_point"] = dv_points
263263
if self.colorscale:
264-
shader_data["color"] = self._get_color_by_value(s_points)
264+
if not hasattr(self, "color_by_val"):
265+
self.color_by_val = self._get_color_by_value(s_points)
266+
shader_data["color"] = self.color_by_val
265267
else:
266268
self.fill_in_shader_color_info(shader_data)
267269
return shader_data

0 commit comments

Comments
 (0)