Hacker News new | ask | show | jobs
by benjamindc 3119 days ago
Spring physics, frame-based callbacks (see the `change()` examples), functions as values for duration, delay and any property you animate, making staggered animations easy to create, etc.
3 comments

Nice. I'd be interested in that and love small footprint libraries. Do you have a comparison with http://velocityjs.org/ or other popular alternatives?
In terms of performance, it outperforms all the animation libraries I’ve tried ( you can compare the stress test linked at the bottom of the page with this version made with GreenSock: http://animateplus.com/examples/stress-test/gsap/ ). In terms of weight and parse time, it’s also the fastest afaict. That being said, it’s not as powerful as GreenSock for example as it mainly focuses on performance and simplicity.
I just did -- your stress test kept my CPU and GPU at 20-25. GSAP's kept them at 13-15.

EDIT: More testing -- When I shut down all other tabs, yours dropped down to a bit lower than GSAP. But I find that a bit odd/concerning that it only performs better when it is the only thing running.

A pedantic note - your library provides sinusoidal easing, not spring physics.
Where do you use spring physics? Is it just for translations, or do you actually deform objects using mass-spring networks?