I'll have to try some more stuff out with video elements too. I haven't dug that rabbit hole deep enough yet π
Mainly I wanted to try the sprite techniqueπ This gives creative control tweaking the animation in post with CSS. Changing FPS, rescaling the pixel-art with `image-rendering: pixelated;` keeps it crispy looking. I also have user interaction ideas for the sprite, I imagine extend nicely with sprites.
Learned about `image-rendering: pixelated;`
From @chrisburnell.com chrisburnell.com/note/elevent...
I got it working on Chrome by doing 2 animations on the position values of the custom properties for the X and Y values.
Sadly I had to switch last minute to a better supported method of `overflow: hidden` + `translate` as I noticed that Firefox did not like my way of animating the variables π΅
I initially used the technique from the article. To animate the `object-position` which I liked a lot, and since my animation was so long I had to wrap it to multiple rows so as to not exceed WEBP maximum width, which required me to move the sprite's X and Y frame position at separate intervals.
Was inspired by this article to try a spritesheet animation:
@joshwcomeau.com
www.joshwcomeau.com/animation/sp...
Made this 3D animated puppy that I rendered into a 2D 1-bit style spritesheet CSS animation for my website. Weekend project went a bit overtime, but had to get it done before I'm off travelling πͺ
Really beautiful work π
This website is a definitive hype builder ππ