6 ms·
JQuery noise generator
- ronaldj 16y agoWhy does everything have to be JQuery dependent these days?
- Rapp 16y agoIt could very easily be converted to any framework of your choosing, I originally created it in pure javascript. Do you have any requests for frameworks you'd like me to port it to?
- PHPAdam 16y agoSorry, I dont get it. What am I looking at?
- Rapp 16y agoSorry, it might be a bit confusing if you're not used to github. Here is an interactive demo: http://rappdaniel.com/noisy/ http://rappdaniel.com/noisy/
- captaincrowbar 16y agoI don't get it either. Your demo link just leads to a page with some text boxes on it. I tried it in Firefox and Safari and can't see anything that looks "noisy". I tried changing some of the parameters but that just crashed Firefox.
- zone411 16y agoIncrease the opacity and look at the background.
- maw 16y agoIt wasn't github. It was the fact that, at first blush, Noisy seemed to fail the actually-does-something test. It turned out not to be so, but it did take me a lot of control wiggling to figure out what was going on.
- lwhi 16y agoI like the fact that this is jQuery - and that it could probably be used dynamically with other effects. .. but I'm starting to think noise + block-color backgrounds are starting to become a bit cliche.
- huhtenberg 16y agoThat's not what cliché is. Noise is there to make the design easier on the eye. It simply works better than a solid fill in a lot of situations as it improves visual quality of the design. It is more natural if you will, similarly to how rounded corners look subjectively better than the straight ones. The noise was not extensively used before because it does not compress well, and spending 20KB on a background tile was just too much. Now it is lesser of an issue, so the noisy fill is seeing a wider adoption. In other words, if it were just a decoration for the sake of decoration, then - yes, you would've been right, but since it carries a useful function, then it is not a cliche.
- lwhi 16y agoNo, when something is overused, it actually does become a cliche. Perhaps noise can improve the visual quality of a design when it's used subtly. However, I'm increasingly seeing it (over) used in a conspicuous way, and I think it's become a trend. In some cases, I think there's an element of 'lets jump on the bandwagon'. Round corners definitely became a cliche. EDIT: re. noise - see dribbble for proof.
- mcav 16y agoIf you look back at trends in web design over the past 10-20 years, you'll notice the progression of different styles. Heck, go back to circa-2004 "Web 2.0" designs, work your way forward, and you'll see that web design trends change every year. In another few years, noise will be out, and something else will be "in".
- lwhi 16y agoI agree - noise will reach saturation point (no pun intended) .. and will eventually be forgotten about. When it's used properly, you don't notice it. I sometimes wonder why we actually need trends. It's an interesting subject - in a way trends are a just part of the commodification of design. They provide a way to transfer values (through loose connotations) to an audience .. I think there's something quite cheap (throwaway) about the concept. Without trends, progress is less able to drive commercialisation and the need to update is less essential.
- fizx 16y agoAny benchmarks?
- systemtrigger 16y agoThere is a little variation in how the noise renders across browsers. FF vs Chrome vs Safari: http://dl.dropbox.com/u/17455578/noise.png http://dl.dropbox.com/u/17455578/noise.png
- ianbishop 16y agoHa, I'm surprised how simple the algorithm to generate random noise is. This is really cool though its applications may not be too widespread. I find with solid colours elements that slight noise can give it more of a body.
- jcampbell1 16y agoFYI, it uses canvas. If canvas is not supported (IE < 9), then fallback image is needed.
- lwhi 16y agoPerlin noise[1] could be a nice addition. [1] http://en.wikipedia.org/wiki/Perlin_noise http://en.wikipedia.org/wiki/Perlin_noise
- ohrite 16y agoI hacked up http://github.com/ohrite/jquery-perlin http://github.com/ohrite/jquery-perlin a while back. edit: I had to go look at it. Now I want to go back and clean it up.
- lwhi 16y agoNice.
- chrisbroadfoot 16y ago... and write a demo page :)
- Sephr 16y agoWhy are you using HTML5 range input for intensity and opacity but only a text input instead of numeric for the size?
- Rapp 16y agoNice find, just changed it to numeric.
- jarin 16y agoOh this is awesome. It's the last thing I need to completely eliminate images from my website. All the rest is cross-browser gradient and rounded corner code from http://css3please.com http://css3please.com, and I'm debating whether to vectorize the picture of me via raphael.js or do an inline data-URL image in my CSS (it might be considered cheating).
- jarin 16y agoOh, I guess jQuery-noise adds data-URLs to the elements on the page, so I guess I don't have to feel bad about inlining my images :)
- zbanks 16y agoI set up a jsperf to do some benchmarking: http://jsperf.com/noisy http://jsperf.com/noisy If you can help out by running the tests, it'll be great to compare browsers. This isn't exactly the perfect tool for the job, but it's close enough.
- flat20 16y agoI moved this line out of the for loop which made it slightly faster: var numPixels = options.intensity * Math.pow(options.size, 2); http://jsperf.com/noisy/2 http://jsperf.com/noisy/2
- potomak 16y agoThis is what I needed just some days ago and this is why: http://www.thoundsday.com http://www.thoundsday.com
- zaph0d 16y agoInteresting, we used an image to achieve the same effect on http://www.paisa.com/ http://www.paisa.com/ -- this works across all browsers.
- Herald_MJ 16y agoWhy is this useful?
- jjcm 16y agoUsing noise is a way of adding another aspect of realism to objects. Normally you can prepare images ahead of time and use those in your css to create this effect, but for some procedurally generated things images can't always be used. That's where something like this would come into play. While the use case for this over precomputed images is quite small, it's nice nonetheless to have. Aside from sites styles though, it's also a fully functional noise implementation - which could be ported to web based photo/graphics editors.