File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2
2
h = 50.0
3
3
4
4
def mandel ():
5
- """Print a mandelbrot fractal to the console, yielding after each character
6
- is printed"""
5
+ """Print a mandelbrot fractal to the console, yielding after each character is printed"""
7
6
y = 0.0
8
7
while y < h :
9
8
x = 0.0
@@ -32,12 +31,14 @@ def mandel():
32
31
y += 1
33
32
yield
34
33
34
+ # run the mandelbrot
35
+
35
36
try : from browser import request_animation_frame
36
37
except : request_animation_frame = None
37
38
38
39
gen = mandel ()
39
40
def gen_cb (_time = None ):
40
- gen .__next__ ()
41
+ for _ in range ( 4 ): gen .__next__ ()
41
42
request_animation_frame (gen_cb )
42
43
if request_animation_frame : gen_cb ()
43
- else : list (gen )
44
+ else : any (gen )
Original file line number Diff line number Diff line change 1
1
textarea {
2
2
font-family : monospace;
3
- resize : none ;
3
+ resize : vertical ;
4
4
}
5
5
6
6
# code ,
You can’t perform that action at this time.
0 commit comments