Thanks for the reply guys, really helped out a lot. In the end we decided to go with the class extension of Ease as that seemed like a clean way to do it.
Here is how it turned out.
class springEase extends Ease {
constructor(tension, friction) {
super()
this.spring = new RK4({tension: tension, friction: friction});
this.time = this.spring.time()
}
getRatio(progress) {
progress = this.spring.step();
return progress
}
}
var ease = new springEase(200, 10)
new TimelineMax().to(box, ease.time, {
delay: 1,
x: 400,
y: 400,
ease
})