Hacker News new | ask | show | jobs
by 0x0 3382 days ago
Near the bottom, I wonder if high-speed img flipping in js could be done by absolute-positioning the two images and toggling display:none/display:block (or flip the z-index above/below) on the upper layer on every animation frame?
1 comments

I think you'd have better luck with rendering a pair of ImageBitmap to a canvas via requestAnimationFrame.
Would either be faster on mobile? I feel like a gif would have been better in this case, and I generally dislike the format.