Last active
March 25, 2019 13:14
-
-
Save mactkg/562dfbe4fe2e36d51369a48dd0244f51 to your computer and use it in GitHub Desktop.
This file contains 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 x = 100; | |
var y = 100; | |
function setup() { | |
createCanvas(200,200); | |
} | |
function draw() { | |
background(0); | |
fill(255); | |
ellipse(x,y,50,50); | |
} |
This file contains 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 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