Alexandre B A Villares 2018-03-25 23:14:39 -03:00
rodzic 36f177597a
commit 94f89f2831
2 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -12,7 +12,7 @@ and add gif_export(GifMaker) at the end of draw()
def gif_export(GifMaker, # gets a reference to the library
filename="exported", # .gif will be added
repeat=0, # 0 makes it an "endless" animation
quality=255, # quality range 0 - 255
quality=32, # quality range 0 - 255
delay=170, # this is quick
frames=0): # 0 will stop on keyPressed or frameCount >= 100000
global gifExporter

Wyświetl plik

@ -41,8 +41,8 @@ def setup():
A.position(40, height - 70)
B.position(40, height - 30)
C.position(width - 120, height - 70)
D.position(width - 120, height - 30)
C.position(width - 140, height - 70)
D.position(width - 140, height - 30)
# noLoop()
def draw():
@ -72,11 +72,11 @@ def draw():
d = int(D.value()) # grid num
# uncomment next lines to export GIF
if not frameCount % 10:
gif_export(GifMaker,
frames=2000,
delay=340,
filename=SKETCH_NAME)
# if not frameCount % 12:
# gif_export(GifMaker,
# frames=2000,
# delay=340,
# filename=SKETCH_NAME)
def grid(x, y, num, size_, space, func):
for i in range(x, x + num * space, space):