kopia lustrzana https://github.com/villares/sketch-a-day
rectMode() comment
rodzic
3516964404
commit
5a4a7ebd2c
|
|
@ -18,6 +18,8 @@ SHAPES = [my_ellipse,
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
size(600, 600, P2D)
|
size(600, 600, P2D)
|
||||||
|
rectMode(CENTER)
|
||||||
|
|
||||||
A.position(40, height - 70)
|
A.position(40, height - 70)
|
||||||
B.position(40, height - 30)
|
B.position(40, height - 30)
|
||||||
C.position(width - 140, height - 70)
|
C.position(width - 140, height - 70)
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,9 @@ SHAPES = [circle,
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
size(600, 600, P2D)
|
size(600, 600, P2D)
|
||||||
|
# rectMode(CENTER) # forgot this and it dislocates losangs :(
|
||||||
|
# but now I've left like this for this one :)
|
||||||
|
|
||||||
A.position(40, height - 70)
|
A.position(40, height - 70)
|
||||||
B.position(40, height - 30)
|
B.position(40, height - 30)
|
||||||
C.position(width - 140, height - 70)
|
C.position(width - 140, height - 70)
|
||||||
|
|
@ -45,11 +48,11 @@ def draw():
|
||||||
rnd_choice(SHAPES)) # random shape drawing function
|
rnd_choice(SHAPES)) # random shape drawing function
|
||||||
|
|
||||||
# uncomment next lines to export GIF
|
# uncomment next lines to export GIF
|
||||||
if not frameCount % 30:
|
# if not frameCount % 30:
|
||||||
gif_export(GifMaker,
|
# gif_export(GifMaker,
|
||||||
frames=2000,
|
# frames=2000,
|
||||||
delay=500,
|
# delay=500,
|
||||||
filename=SKETCH_NAME)
|
# filename=SKETCH_NAME)
|
||||||
|
|
||||||
# Draws sliders and checks for mouse dragging or keystrokes
|
# Draws sliders and checks for mouse dragging or keystrokes
|
||||||
Slider.update_all()
|
Slider.update_all()
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue