Skip to content

Instantly share code, notes, and snippets.

@claytical
Created October 3, 2015 16:44
Show Gist options
  • Save claytical/9f532b9df662757ad732 to your computer and use it in GitHub Desktop.
Save claytical/9f532b9df662757ad732 to your computer and use it in GitHub Desktop.
Simple Ball Object Example
var ball = { x: 50,
y: 50,
diameter: 50
};
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(0);
fill(255,0,0);
stroke(0,255,0);
ellipse(ball.x, ball.y, ball.diameter, ball.diameter);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment