@mvaneijgen
gsap.utils.clamp - this is not what solve my problem.
I will try explain what I need, hope you can help me with this.
I use GSAP with PIXI JS, not in css.
Image A:
Object (black circle) move from 300 px to 50 px by .to() method. For X and Y axe
But, i want that when black circle up to 100 px by X axe, its stop change X value, and continue only by Y
I imagine it on image B.
Suppose we add limit value for X = 100
Black hole move by X and Y from 300;300 to 50;50, but while on moving by limit X should stop move on 100px and continue only by Y.
So onComplete will called on 100;50
Image C
I can't do straightaway to 100;50, because object will move my another X and Y, for me very important, that object repeat path and time as if no limit.
With limit object path will like triangle Image D