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
let lava; | |
let goal; | |
function setup() { | |
createCanvas(400, 400); | |
lava = new Terrain(50, 50, 75, 50, 0); // 0 means lava | |
goal = new Terrain(250, 250, 75, 50, 1); // 1 means goal | |
} | |
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
// this object literal holds our triangle info | |
let playerTriangle = { | |
x: 50, | |
y: 50, | |
size: 25 | |
} | |
function setup() { | |
createCanvas(800, 700); | |
} |
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
let diameters = [] | |
let locationX = [] | |
let locationY = [] | |
let circleHues = [] | |
let numCircles = 10; | |
let circlesFilled = [] | |
function setup() { | |
createCanvas(600, 400); |
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
let myLineOfSquares; | |
function setup() { | |
createCanvas(400, 400); | |
myLineOfSquares = new LineOfSquares(height / 2, 9, 1.5, 140, 255, 140) | |
} | |
function draw() { | |
background(40); | |
myLineOfSquares.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(400, 400); | |
background(220); | |
fill(80); | |
} | |
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(400, 400); | |
} | |
function draw() { | |
background(227); | |
rectMode(CENTER); | |
fill(0, 120, 180); | |
drawGrid(); |
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() { | |
background(255); | |
drawButton(100, 100, 200, 200); | |
if (mouseIsPressed && | |
mouseX > 100 && mouseX < 300 && |
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(300, 300); | |
} | |
function draw() { | |
background(180); | |
rectMode(CENTER); | |
fill("#EE3366"); | |
applyMatrix(); | |
translate(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
let dark = 20; | |
let light = 180; | |
function setup() { | |
createCanvas(400, 400); | |
fill(200, 100, 0); | |
} | |
function draw() { | |
fill(light); |
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() { | |
background(255); | |
drawSquares(9); | |
} |
NewerOlder