Created
October 27, 2018 16:16
-
-
Save SumanglaBishnoi/04131e51df540be698d81a0983b50e0f to your computer and use it in GitHub Desktop.
Feature 1: Wind
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(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