kopia lustrzana https://github.com/villares/sketch-a-day
update
rodzic
1e253f3776
commit
51f01dc586
|
@ -24,8 +24,8 @@ def create_grids():
|
|||
grids.append(Grid(pos=(x, y),
|
||||
dims=(d, d),
|
||||
space=sp,
|
||||
elem=(sh, si))
|
||||
)
|
||||
elem=(sh, si)))
|
||||
|
||||
global ix, iy
|
||||
ix, iy, _ = grids[0].pos
|
||||
print ix, iy
|
||||
|
|
|
@ -30,7 +30,6 @@ def create_grids():
|
|||
|
||||
global ix, iy
|
||||
ix, iy, _ = grids[0].pos
|
||||
print ix, iy
|
||||
|
||||
def draw():
|
||||
background(240)
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
from random import choice
|
||||
|
||||
add_library('GifAnimation')
|
||||
from gif_exporter import *
|
||||
|
||||
from grid import Grid
|
||||
|
||||
def setup():
|
||||
|
@ -28,6 +31,10 @@ def create_grids():
|
|||
space=sp,
|
||||
elem=(sh, si))
|
||||
)
|
||||
global ix, iy
|
||||
ix, iy, _ = grids[0].pos
|
||||
print ix, iy
|
||||
|
||||
def draw():
|
||||
background(0)
|
||||
translate(width / 2., height / 2.)
|
||||
|
@ -35,6 +42,11 @@ def draw():
|
|||
|
||||
for g in grids:
|
||||
g.update()
|
||||
|
||||
saveFrame("###.png")
|
||||
fx, fy, _ = grids[0].pos
|
||||
if (ix, iy) == (fx, fy):
|
||||
exit()
|
||||
|
||||
def keyPressed():
|
||||
if key == "s":
|
||||
|
|
Ładowanie…
Reference in New Issue