Created
May 11, 2012 22:30
-
-
Save diegogangl/2662822 to your computer and use it in GitHub Desktop.
A simple animation in Zajal 0.3.3, a circle that grows and shrinks over time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple animation example | |
# in Zajal | |
sizeBase = 0 | |
speed = 0.05 | |
setup do | |
title "Simple Circle" | |
framerate 60 | |
smoothing true | |
end | |
update do | |
sizeBase += speed | |
end | |
draw do | |
radius = sin( sizeBase )*25 | |
circle width/2,height/2,radius | |
text "FPS %0.2f"%framerate, 20, height - 20 | |
text "Radius %0.2f"%radius, 20, height - 35 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment