-
Notifications
You must be signed in to change notification settings - Fork 0
derekmwright/noise.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Usage: // Instantiate var image = new noise(); // Generate Random Noise Pattern image.generate(); // Add the DOM Element to your Document document.body.appendChild(image.domElement); // If you have a RequestAnimFrame loop you can use noise.generate() to create a new pattern. MainLoop() { image.generate(); requestAnimFrame(MainLoop); } // Or apply it as a style to your webpage background document.body.style.backgroundImage = "url(" + image.domElement.toDataURL("image/png") + ")"; ...etc Optional arguments for instantiation are: height, width, opacity, monochrome/color, size. Default values are Height/Width: 200px, Opacity: 0.04, Monochromatic, Size: 1. Enjoy.
About
Small JavaScript library to generate noise
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published