Skip to content

Instantly share code, notes, and snippets.

@diegogangl
Created May 11, 2012 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diegogangl/2662822 to your computer and use it in GitHub Desktop.
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.
# 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