5 ms·
Here is a very similar effect in canvas: http://29a.ch/2010/3/24/normal-mapping-with-javascript-and-canvas-tag http://29a.ch/2010/3/24/normal-mapping-with-java
by bd 16y ago
Here is a very similar effect in canvas:
http://29a.ch/2010/3/24/normal-mapping-with-javascript-and-canvas-tag http://29a.ch/2010/3/24/normal-mapping-with-javascript-and-c...
- winter_blue 16y agoIt's so slow.. According to hackermom the 14Mhz Amiga could do this at 25 fps, any idea why this is so slow on modern computers?
- MichaelGG 16y agoIt's not slow on modern computers. It's slow on these environments that weren't made to execute code quickly, much less do any pixel manipulation. How many orders of magnitude more instructions is it to set a pixel on an Amiga, versus setting it via JavaScript?
- efsavage 16y agoBecause it's running in canvas? In other words, it's running within abstraction layer upon abstraction layer, with various other abstraction layers involved to help make sense of the fact that there are too many abstraction layers. The amiga code was probably pretty close to talking to the graphics driver directly. Canvas is cool, but in terms of performance it's never really going to compete with native code, or even with flash for that matter since flash can remove some complexity by only building for a single, predictable, optimized environment.
- est 16y agoThat's why everyone is embracing GPU powered graphics.
- raganwald 16y ago> it's running within abstraction layer upon abstraction layer, with various other abstraction layers involved to help make sense of the fact that there are too many abstraction layers. "Every problem can be solved by adding another layer of abstraction--Except for the problem of having too many layers of abstraction"--Alan Perlis
- othello 16y ago"Graphics driver" still sounds too complex. The code was probably poking bytes to the memory segment mapped directly to the display - just like in DOS days, where each byte of the 0xA000 segment represented a pixel when using a VGA 320x200 resolution, 256 colors palette.
- mitjak 16y agoNot in Chrome it isn't!
- Shorel 16y agoIt's just as fast in Opera!
- not_an_alien 16y ago'Similar', but not the same - it's only changing the color and not actually displacing the bitmap. Big difference.
- tomlin 16y agoReally? What dimension of reality are we living in if we're even considering comparing this to canvas today?
- keltex 16y agoDramatically faster on Chrome vs. Firefox. I think Google is right... javascript speed does make a difference.