kopia lustrzana https://github.com/villares/sketch-a-day
main
rodzic
36f177597a
commit
94f89f2831
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Ładowanie…
Reference in New Issue