News for hackers. Stuff that matters.
Re:2KB JavaScript animation library by benjamindc on Sunday December 03, 2017 @11:52AM (#15838340)
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.
Re:2KB JavaScript animation library by jonahx on Sunday December 03, 2017 @11:59AM (#15838370)
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?
Re:2KB JavaScript animation library by benjamindc on Sunday December 03, 2017 @12:06PM (#15838394)
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.
Re:2KB JavaScript animation library by codingdave on Sunday December 03, 2017 @03:16PM (#15839308)
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.

Re:2KB JavaScript animation library by pharrington on Sunday December 03, 2017 @01:53PM (#15838865)
A pedantic note - your library provides sinusoidal easing, not spring physics.
Re:2KB JavaScript animation library by bitL on Sunday December 03, 2017 @01:29PM (#15838744)
Where do you use spring physics? Is it just for translations, or do you actually deform objects using mass-spring networks?