4 ms·
Procedural Textures in HTML5 Canvas
- BonsaiDen 15y agoTook the time and refactored the perlin-noise port in the post to make it look a bit more like JavaScript. As a small side effect I got a 3x speed increase. JS Engines are good at optimizing, but having a senseless 256 copy loop in every call doesn't really work out that well if you can have a memcpy with Array.slice(). See: http://jsperf.com/perlin-noise http://jsperf.com/perlin-noise
- ricardobeat 15y agoclickable demo: http://jsbin.com/edobev http://jsbin.com/edobev