Any ideas how to create a tween with momentum effect?
For example, in this site: http://tram-house.com / elements continue moving for a while after scrolling has stopped.
Thank you in advance!
I've recently had to implement scroll with momentum/inertia. It's actually incredible simple:
1) animate scroll with basic linear tween with short duration (eg. .15 s) - let it be tween A
2) create second tween with easeOut ease and way longer duration (eg. 1 second)- let it be tween B
3) when user scrolls, use tween A - basic scroll movement
4) whenever user stops scrolling launch tween B - you can measure time from the last event and decide if user has stopped scrolling