Algorithm-Arena / weekly-challenge-12-fools-cursor

3 stars 1 forks source link

Submission - Nerd Sniped #1

Open vjeux opened 4 months ago

vjeux commented 4 months ago

I knew that I would eventually nerd snipe myself to participate in a challenge... That time has come!

This uses spring follow behavior to have a bunch of cursors trailing your cursor. They are all pointed at the middle of the <button> on the screen. I wanted to make it a standalone script you could paste in any website's console but ran out of time.

https://github.com/Algorithm-Arena/weekly-challenge-12-fools-cursor/assets/197597/2be3d64c-3f42-44bd-8366-40dd9eb681ec

Source and demo link: https://codesandbox.io/p/sandbox/pointer-97p47c?file=%2Fsrc%2Findex.mjs%3A7%2C49

nikpundik commented 4 months ago

Wow, that's smooth!!

vjeux commented 4 months ago

Wow, that's smooth!!

Yeah, spring animations are very under-utilized!

https://blog.vjeux.com/2015/javascript/react-rally-animated-react-performance-toolbox.html

nikpundik commented 4 months ago

Finally had the time to have a look at it, really interesting analysis and techniques! It makes me think about react-spring lib. Thanks for sharing 😊