3 ms·
This would look way better on actual canvas; right now the demo is just a IMG tag that changes it's z-Index really fast; not an smart way to do it.
by jQueryIsAwesome 14y ago
This would look way better on actual canvas; right now the demo is just a IMG tag that changes it's z-Index really fast; not an smart way to do it.
- mihaip 14y agoI tried this with a canvas (putImageData with alternatively the positive and negative frame) and it wasn't any faster on desktop Chrome (and slower on iOS devices).
- jQueryIsAwesome 14y agoYep, its true. Maybe you should try using an animated gif.
- mihaip 14y agoI tried that too (https://github.com/mihaip/web-experiments/blob/master/temporal-dithering/example/temporal-dithering.gif https://github.com/mihaip/web-experiments/blob/master/tempor...). It still flickers, I'm guessing because the frame delay interval is specified as an integer, and both 16 and 17ms don't quite line up with 60Hz (or whatever the screen's refresh rate is).
- jQueryIsAwesome 14y agoThe only suggestion I have left is to convert it to a video; that is always difficult to snapshot anyway.