Thanks for your answer. It's more clear like that. My point is that I want to send the data in another variable when velocity is updated. I don't know if it's possible.
Something like that :
let scrollVelocity = 0;
ScrollTrigger.create({
start: 0,
end: () => ScrollTrigger.maxScroll("html"),
onUpdate: function(self) {
scrollVelocity = self.getVelocity();
}
});
let defaultOptions = {
loop: true,
autoplay: true,
speed: scrollVelocity,
animationData: animation,
};