Created
October 3, 2015 16:44
-
-
Save claytical/9f532b9df662757ad732 to your computer and use it in GitHub Desktop.
Simple Ball Object Example
This file contains hidden or 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
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