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
void testApp::findMatchingColors(Candy &c) { | |
float upNeighborX = c.position.x; | |
float upNeighborY = c.position.y - GRID_SQUARE_SIZE; | |
float downNeighborX = c.position.x; | |
float downNeighborY = c.position.y + GRID_SQUARE_SIZE; | |
float leftNeighborX = c.position.x - GRID_SQUARE_SIZE; | |
float leftNeighborY = c.position.y; | |
float rightNeighborX = c.position.x + GRID_SQUARE_SIZE; | |
float rightNeighborY = c.position.y; | |
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 startColor; | |
var endColor; | |
var bgColor; | |
var counter; | |
function setup() { | |
// uncomment this line to make the canvas the full size of the window | |
createCanvas(windowWidth, windowHeight); | |
startColor = color(255,0,0); | |
endColor = color(127,30,200); |
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() { | |
// uncomment this line to make the canvas the full size of the window | |
createCanvas(windowWidth, windowHeight); | |
} | |
function draw() { | |
// draw stuff here |
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() { | |
// uncomment this line to make the canvas the full size of the window | |
createCanvas(windowWidth, windowHeight); | |
} | |
function draw() { | |
// draw stuff here |
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() { | |
// uncomment this line to make the canvas the full size of the window | |
createCanvas(windowWidth, windowHeight); | |
} | |
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
var startColor; | |
var endColor; | |
var counter; | |
var bgColor; | |
var y = 0; | |
var ySpeed = 1; | |
function setup() { | |
// uncomment this line to make the canvas the full size of the window | |
createCanvas(windowWidth, windowHeight); |
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 shouldDrawCircle = false; | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
} | |
function draw() { | |
if (shouldDrawCircle == true) { | |
ellipse(mouseX,mouseY, 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 y; | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
y = 0; | |
} | |
function draw() { | |
background(0); | |
ellipse(width/2, y, 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); | |
y = 0; | |
} | |
function draw() { | |
background(0); | |
var oneThird = width/3; | |
var twoThirds = width - width/3; |
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); | |
rectMode(CENTER); | |
background(255); | |
} | |
function draw() { | |
OlderNewer