/ Published in: JavaScript
URL: http://nettuts.s3.amazonaws.com/854_noiseWithCanvas/noise.html
This allows you to add image noise to the body of your website. simply call generateNoise(), pass an optional opacity parameter, and then apply a background color to the body element in your stylesheet.
It's not ideal, and maybe isn't practical -- but it works. :)
Adapted from: http://mitchj.info/blog/2010/09/generate-background-noise-with-jquery/
Comments
Subscribe to comments
You need to login to post a comment.

If you do
var num=Math.random() * 255; r = Math.floor( num ); g = Math.floor( num ); b = Math.floor( num );You can make a grayscale or monochromatic noise. And also, you should not generate canvas larger than 2 digits. Because it's going to hang the browser for some seconds! (I've tried 350 and my laptop died about 3 secs)