((((sandro.net))))

sexta-feira, 27 de março de 2026

Show HN: Scroll bar scuba dude swimming as you scroll https://ift.tt/FtC9DGI

Show HN: Scroll bar scuba dude swimming as you scroll Hi! Instead of a boring scrollbar I made a scuba dude that swims down the page when you scroll. The idea came from nostalgia; remember SkiFree game on Windows? I wanted a skier skiing down my site. Building the skier mechanics in pure javascript turned out to be difficult so I started with a runner, added a santa hat, and recently built scuba buddy. You can try it directly as soon as you start to scroll down the page, and see the other animations with the "Change Animation" button. Technical details: entirely javascript, takes scroll depth value (window.scrollY) and inputs that into math.sin() functions. This lets CSS (transform: rotate() property) create rotations of the various stick-figure's html elements, giving the character animation based on the input which is a user scrolling. It is pretty cumbersome to sync correctly when building the animations. It's difficult to get the upper and lower arms / legs to stay connected and have the animation transitions appear smooth. Posted the runner about year ago here on hn. https://ift.tt/nPrKcqE Should I re-try the skiier or something else? Thank for checking it out! https://ift.tt/7Y3a5Lm March 27, 2026 at 12:12AM

Nenhum comentário:

DJ Sandro

http://sandroxbox.listen2myradio.com