Skip to content

Commit 614c3b5

Browse files
authored
[Lang] Fix fractal gui close warning (#5281)
* fix fractal gui close warning * fix fractal gui close warning
1 parent d1b61eb commit 614c3b5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/taichi/examples/simulation/fractal.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ def paint(t: float):
2525

2626
def main():
2727
gui = ti.GUI("Julia Set", res=(n * 2, n))
28-
29-
for i in range(1000000):
30-
paint(i * 0.03)
28+
t = 0.0
29+
while not gui.get_event(ti.GUI.ESCAPE, ti.GUI.EXIT):
30+
paint(t)
31+
t += 0.03
3132
gui.set_image(pixels)
3233
gui.show()
3334

0 commit comments

Comments
 (0)