Update completed

This commit is contained in:
Lev
2021-06-26 23:38:11 -05:00
parent 8f90139062
commit 895935ec36
2 changed files with 19 additions and 7 deletions

View File

@ -1,10 +1,11 @@
var points;
var font;
let points;
let font;
let time = 0;
let amt = 20;
function preload() {
font = loadFont('assets/Calistoga-Regular.ttf');
}
//////////////////////////////////////////////////////////////////////
function setup() {
createCanvas(900, 400);
background(0);
@ -15,10 +16,21 @@ function setup() {
});
}
//////////////////////////////////////////////////////////////////////
function draw() {
fill(0,5);
rect(0,0,width,height);
background(0);
noStroke();
fill(255, 104, 204, 150);
// **** Your code here ****
amt = map(mouseX, 0, width, 0, 20);
// **** Your code here ****
for (let i = 0; i < points.length; i++)
{
let nX = noise(frameCount%width + points[i].x);
let deltaX = map(nX, 0, 1, -amt, amt);
let nY = noise(frameCount%width + points[i].y);
let deltaY = map(nY, 0, 1, -amt, amt);
//console.log(nX);
ellipse(points[i].x + deltaX, points[i].y + deltaY, 10, 10);
}
}