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 x; | |
var y; | |
var xSpeed; | |
var ySpeed; | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
x = width/2; | |
y = height/2; | |
xSpeed = 0; |
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
function setup() { | |
createCanvas(500,500); | |
} | |
function draw() { | |
background(255,255,255); | |
if (mouseY > height/2 && mouseX > width/2) { | |
fill(255,0,0); | |
ellipse(width/2, height/2, 50, 50); |
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 c; | |
function setup() { | |
createCanvas(500,500); | |
c = color(255,255,255); | |
} | |
function draw() { | |
if (mouseY > height/2) { | |
c = color(255,0,0); |
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 canDraw = false; | |
function setup() { | |
createCanvas(500,500); | |
background(255,255,0); | |
} | |
function draw() { | |
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
function setup() { | |
createCanvas(500,500); | |
} | |
function draw() { | |
background(255,255,255); | |
if (mouseX > 250) { | |
ellipse(50,50,50,50); | |
} | |
} |
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
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
} | |
function draw() { | |
background(255); | |
var x = width/2; | |
var y = height/2; | |
var circleWidth = map(mouseX, 0, width, 0, 100); | |
var circleHeight = map(mouseX, 0, width, 0, 100); |
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
function setup() { | |
createCanvas(400,400); | |
} | |
function draw() { | |
console.log("Random Number Between 5 and 10: " + random(5,10)); | |
} |
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 something = "Hello"; | |
function setup() { | |
createCanvas(400,400); | |
something = something + " World"; | |
console.log(something); | |
} |
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
function setup() { | |
createCanvas(400,400); | |
} | |
function draw() { | |
r = random(255); | |
g = random(255); | |
b = random(255); | |
x = random(width); |
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 x; | |
var y; | |
var r; | |
var g; | |
var b; | |
function setup() { | |
createCanvas(400,400); | |
y = 0; | |
r = random(255); |