Update completed
This commit is contained in:
Binary file not shown.
@ -1,10 +1,11 @@
|
|||||||
var points;
|
let points;
|
||||||
var font;
|
let font;
|
||||||
|
let time = 0;
|
||||||
|
let amt = 20;
|
||||||
function preload() {
|
function preload() {
|
||||||
font = loadFont('assets/Calistoga-Regular.ttf');
|
font = loadFont('assets/Calistoga-Regular.ttf');
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
function setup() {
|
function setup() {
|
||||||
createCanvas(900, 400);
|
createCanvas(900, 400);
|
||||||
background(0);
|
background(0);
|
||||||
@ -15,10 +16,21 @@ function setup() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
function draw() {
|
function draw() {
|
||||||
fill(0,5);
|
background(0);
|
||||||
rect(0,0,width,height);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user