Toggle navigation
Sign Up
Log In
Explore
Works
Folders
Tools
Collections
Artists
Groups
Groups
Topics
Tasks
Tasks
Jobs
Teams
Jobs
Recommendation
More Effects...
JS
var yoff = 0; function setup() { var width = window.innerWidth, height = window.innerHeight; createCanvas(width, height); } function draw() { background(51); fill(255); // We are going to draw a polygon out of the wave points beginShape(); var xoff = 0; // Option #1: 2D Noise // float xoff = yoff; // Option #2: 1D Noise // Iterate over horizontal pixels for (var x = 0; x <= width; x += 10) { // Calculate a y value according to noise, map to // Option #1: 2D Noise var y = map(noise(xoff, yoff), 0, 1, 200,300); // Option #2: 1D Noise // var y = map(noise(xoff), 0, 1, 200,300); // Set the vertex vertex(x, y); // Increment x dimension for noise xoff += 0.05; } // increment y dimension for noise yoff += 0.01; vertex(width, height); vertex(0, height); endShape(CLOSE); }
CSS
body { padding: 0; margin: 0; overflow: hidden; }
HTML
Join Effecthub.com
Working with Global Gaming Artists and Developers!
Login
Sign Up
Or Login with Your Email Address:
Email
Password
Remember
Or Sign Up with Your Email Address:
Your Email
This field must contain a valid email
Set Password
Password should be at least 1 character
Stay informed via email