Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function foo(x, y) {
this.x = x;
this.y = y;
this.color = "#" + ((1 << 24) * Math.random() | 0).toString(16)
this.move = function() {
this.x += cos(random(360))
this.y += sin(random(360))
}
this.çiz = function() {
ellipse(this.x, this.y, 20, 20)
fill(this.color)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.