Skip to content

Instantly share code, notes, and snippets.

@SumanglaBishnoi
Created October 27, 2018 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SumanglaBishnoi/04131e51df540be698d81a0983b50e0f to your computer and use it in GitHub Desktop.
Save SumanglaBishnoi/04131e51df540be698d81a0983b50e0f to your computer and use it in GitHub Desktop.
Feature 1: Wind
function setup() {
createCanvas(windowWidth, windowHeight);
fill(255);
noStroke();
rectMode(CENTER);
console.log(1+" "+frameRate());
frameRate(20);
console.log(2+" "+frameRate());
noiseDetail(3, 0.5);
}
function draw() {
background(118,198,229);
for (var x = 0; x < width; x += 15) {
for (var y = 0; y < height; y += 15) {
var n = noise(x * 0.0052, y * 0.005, frameCount * 0.1);
push();
translate(x, y);
rotate(TWO_PI * n);
scale(12 * n);
ellipse(0, 0, 2.8, 2.8);
pop();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment