Normally, however, I'd use GSAP for SVG animations: https://greensock.com/gsap/
``` @keyframes sea-Top-Deck-Inside {
from {transform: translateX(0);}
from {transform: translateX(0);}
to {transform: translateX(-3px);}
}@keyframes sea-Top-Deck-Shadow {
from {transform: translateX(0);}
from {transform: translateX(0);}
to {transform: translateX(-3px);}
}
```sorry if it seems like im doubting you, i am just really super impressed by this animation and wanted to understand how you put this together!
also: readme is really cool! love your podcast interviews!
Yup, I used Stylus mixins for this. I just mean I didn't use something like Framer or an animation library :)
Here's the code (I don't expect it to make any sense to anyone other than me!)
(There's a bug in that code causing two `from`s! Seems it's moot since it works, but I fixed it on my end. Here's the updated code: https://pastebin.com/Y6JwkZi4)
You just described 3d projection, aka how most 3d games display a 3d world on a flat monitor.
Everything else is just CSS!
minimal repro: https://svelte.dev/repl/7eea2eba3707414aa62c9ea53b92ad2d?ver...
quick youtube discussion: https://www.youtube.com/watch?v=9wKnZNjdpp8&feature=youtu.be
I didn't get everything bc you can only get so far looking at the output CSS - he used Stylus here to generate most of these https://news.ycombinator.com/item?id=24138573
This had me in splits:
>> “ Yup, had to get it out quick so I went simple!“
> “What the actual fuck?!”
thanks