O'Reilly logo

Babylon.js Essentials by Julien Moreau-Mathis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using easing functions to smooth animations

One of the advanced features of the Babylon.js animations management is to use easing functions to smooth well and add behaviors to your animations.

To take a quick look at the appearance of the easing functions (we do not necessarily remember every type of easing functions), you should follow this link (http://easings.net/en).

Applying an easing function to an animation

To apply an easing function to an animation, the method only consists of customizing an already created animation. You'll just have to call the .setEasingFunction method for an animation with an easing function as the parameter.

The available easing functions are (with the associated curve in time) as shown in the following:

  • Circle ease:  ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required