User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
Admin
Wyvern-shaped software developer and hobby vector artist. Also sometimes a fluffy werewolf alien creature (Areon).

Creator of the neofoxes, neocats and other emojis.
wvrnBox
Website
https://volpeon.ink/
Speaking German, English
Age 30s
Pronouns he / him
Backup Account @volpeon@goto.wyvern.rip
Bonus Content @areon@icy.wyvern.rip
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
Oh fuck no, the stink bugs are back
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
quantum-enabled AI
Oh, is this the next hype term after "agentic AI"?
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@Akulatraxas drgn_think_woozy
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@catraxx @ziphi @Bwee No way wyvAngel
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@Bwee @ziphi Maximum floof wyvHyper
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
It actually didn't add that much code.

I added a function to record the current velocity since the last frame. It loops with requestAnimationFrame and stores the coordinates in a variable so the next call can compare current and previous coordinates.

The velocity itself is computed as moving average. The window size is dynamic: 2 if the velocity is higher than the recorded one, and 15 if it's lower. The higher the window size, the less the impact of a new value on the average. This is necessary because when you're about to lift your finger, you typically slow down and this would've caused the final velocity to be lower than expected.

The inertia is also implemented with a function which calls itself in a requestAnimationFrame loop. I simply multiply the velocity variables by 0.95 and then add the velocity to the image coordinates.
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
The lightbox on my website now has inertia when moving the zoomed in image. It really makes the experience much better wyvCookie
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@ziphi EEEEEEEE2EEEEEEEEE wyvScream
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@Jain wyvMug
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@Soblow Sometimes I get a follower like this and I feel the same way neofox_lul
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
I'm so eepy wvrnFlat
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
Well GUESS WHAT
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@Enalys Happy hatchday drgn_pat
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@Baa Here's the original: knowyourmeme.com/memes/poob-has-it-for-you
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@morgunkorn neofox_googly_shocked
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
AI when it needs to speak French
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@meluzzy Thank you wyvHeart
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
📈 Things to do at work
📉 Motivation for work

This is not a good combination
neofox_sweat
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@Citali wyvUwu
User avatar
privTri Volpeon areonNSmol @volpeon@icy.wyvern.rip
7mo
@puniko There is no ibex involved whatsoever wyvNom