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).
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:
BABYLON.CircleEase()
- Back ease:
BABYLON.BackEase(amplitude)
- Bounce ease:
BABYLON.BounceEase(bounces, bounciness)
- Cubic ease:
BABYLON.CubicEase()
- Elastic ease:
BABYLON.ElasticEase(oscillations, springiness)
- Exponential ease:
BABYLON.ExponentialEase...