Stop
Continue
Go
/* Animation Loop This code demonstrates using the animation loop to draw a moving circle. The circle will start at the center of the left side canvas and move off the canvas to the right. */ /* Variables for the center of the moving circle. These are declared outside of any function so that they are global and can be used in any function */ var x,y; function setup(){ //Set the initial position of the circle x=0; y=height/2; /* Set the number of miliseconds to wait between drawing. The larger this number is, the slower the animation will be. */ timestep(50); //call loop to make the draw function be //called repeatedly. loop(); } function draw(){ //clear canvas for next frame clear(); //draw filled circle circle(x,y,10); fill(); //update x coordinate to move the circle x=x+1; }
default
3024-day
3024-night
ambiance
base16-dark
base16-light
blackboard
cobalt
eclipse
elegant
erlang-dark
lesser-dark
mbo
mdn-like
midnight
monokai
neat
night
paraiso-dark
paraiso-light
pastel-on-dark
rubyblue
solarized dark
solarized light
the-matrix
tomorrow-night-eighties
twilight
vibrant-ink
xq-dark
xq-light