We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add_updater does not work when redering with OpenGL. The code runs normally under the Cairo renderer.
class BugReport(Scene): def construct(self): wave_generate = Circle(radius=0.3, color=RED_A, fill_color=BLUE, fill_opacity=0.3, stroke_width=0.8).move_to(3 * LEFT) Nc = 20 circle_list = [Circle(radius=0.3 + 0.8 * i, color=RED_A, stroke_width=1).move_to(3 * LEFT) for i in range(Nc)] self.add(wave_generate, *circle_list) self.wait(1) self.remove(wave_generate, *circle_list) self.start_time_for_circle = self.renderer.time def circle_update(mob, phase): v_factor = 1.5 current_time = self.renderer.time - self.start_time_for_circle radius = math.fmod(0.8 * phase + v_factor * current_time, 0.8 * Nc) + 0.3 mob.set(width=2 * radius) if radius - 0.3 <= v_factor * 1.1 / self.camera.frame_rate: mob.set_x(wave_generate.get_x()) update_list = [] for i in range(Nc): update_list.append(lambda mob, phase=i: circle_update(mob, phase)) (circle_list[i]).add_updater(update_list[i]) self.add(wave_generate, *circle_list) self.wait(2) self.play(wave_generate.animate.shift(5 * RIGHT), run_time=5, rate_func=linear) for i in range(Nc): (circle_list[i]).remove_updater(update_list[i]) self.wait(2)
Cairo:
OpenGL:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description of bug / unexpected behavior
add_updater does not work when redering with OpenGL. The code runs normally under the Cairo renderer.
Code for reproducing the problem
Cairo:
BugReport_Cairo.mp4
OpenGL:
BugReport_OpenGL.mp4
System specifications
System Details
LaTeX details
The text was updated successfully, but these errors were encountered: