Chapter 10TWEEN ENGINES
In Chapter 8 of Making Things Move I wrote about a subject called easing. I called this type of easing simple easing because it was quite easy to implement and had limited power and flexibility. This type of easing consists of having an object and a target location for that object to move to. On each frame you calculate the distance between the object and the target and move it one-half (or some other fraction) of that distance. The object moves smoothly into place, slowing down as it arrives at the target.
In that chapter I made reference to Robert Penner's easing functions and suggested that you look into them, (referring to them as advanced easing). This was a subject I would have liked to write about back then, but ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access