Thanks Jack! This is how the function looks like in GSAP 3:
const throttleAnimation = (animation, fps) => {
let frame = 0
const ticker = gsap.ticker,
time = ticker.time,
frameLength = 1 / fps,
update = function () {
const newTime = ticker.time - time,
newFrame = ~~(newTime / frameLength)
if (frame !== newFrame) {
frame = newFrame
animation.time(newTime)
if (animation.progress() === 1) {
ticker.remove(update)
}
}
}
animation.pause()
ticker.add(update)
}