Skip to content

Instantly share code, notes, and snippets.

@mactkg
Last active March 25, 2019 13:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mactkg/562dfbe4fe2e36d51369a48dd0244f51 to your computer and use it in GitHub Desktop.
var x = 100;
var y = 100;
function setup() {
createCanvas(200,200);
}
function draw() {
background(0);
fill(255);
ellipse(x,y,50,50);
}
var s = function( sketch ) {
var x = 100;
var y = 100;
sketch.setup = function() {
sketch.createCanvas(200, 200);
};
sketch.draw = function() {
sketch.background(0);
sketch.fill(255);
sketch.rect(x,y,50,50);
};
};
var myp5 = new p5(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment