Shouldn't setEasingFunction() take an IEasingFunction instead of EasingFunction?

Hello,
Shouldn’t Animation.setEasingFunction() take an IEasingFunction instead of an EasingFunction as argument. Would make it easier to create custom functions.
All the best,

1 Like

Adding @Drigax our master of animations.

This is totally right. I will fix that for next nightly!

1 Like

Great. Thanks.
For anybody reading this and if you are using TypeScript, to create a custom easing function, just create a TypeScript class with one method “ease(g:number):number”, create an instance of this class and cast it to BABYLON.EasingFunction and call setEasingFunction().
—bjorn
#3ddecks

2 Likes