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
//JSON | |
var params = { | |
debugMode: false, //it's "," | |
ampAdj: 0.7, //it's "," | |
leafScaleRate: 0.25, | |
//region:0 | |
}; | |
var gui = new dat.gui.GUI(); | |
gui.add(params, "debugMode"); |
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 vines = []; | |
function setup() { | |
createCanvas(500, 600); | |
background(0); | |
vines.push(new Vine(width / 2, 500, 0.02, 5)); | |
} | |
function draw() { |
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 flowers; | |
function setup() { | |
createCanvas(500, 600); | |
background(255); | |
flowers = new Flower(width / 2, height / 2, 255, 100, 400); | |
} | |
function draw() { |
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
function setup() { | |
createCanvas(500, 600); | |
background(0); | |
} | |
function draw() { | |
background(0, 10); | |
push(); |
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 RESOLUTION = 3; | |
function setup() { | |
createCanvas(500, 600); | |
background(0); | |
noStroke(); | |
fill(150, 255, 30, 60); //the point is we need to give a very small amount of value to make it blend | |
} |
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
function setup() { | |
createCanvas(500, 600); | |
background(255); | |
} | |
function draw() { | |
//background(0); | |
// freq = frameCount * 0.02; |
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 WATER_SURFACE = 200; | |
var GRAVITY_MAGNITUDE = 3; | |
var particles = []; | |
var ink = []; | |
function setup() { | |
createCanvas(500, 600); |
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 WATER_SURFACE = 200; | |
var GRAVITY_MAGNITUDE = 3; | |
var particles = []; | |
var ink = []; | |
function setup() { | |
createCanvas(500, 600); |
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 WATER_SURFACE = 100; | |
var GRAVITY_MAGNITUDE = 3; | |
var particles = []; | |
var ink = []; | |
function setup() { | |
createCanvas(500, 600); |
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 moon = []; | |
var earth; | |
function setup() { | |
createCanvas(800, 500); | |
background(0); | |
for (var i = 0; i < 3; i++) { | |
moon.push(new Particle(random(width), random(height), random(0.1, 3))); // (x,y,mass) | |
moon[i].vel.y = random(0.5, 1.2); |