Thank, looks like great tool.
Yes, I use it, and looked at examples, they work only with linear ease, but I need ease inOut.
I think the use of SVG will not solve the problem, and the plans include a series of animations with text and an adaptive design, for this I need just text, not SVG.
––––
The main problem here is that ExpoScaleEase "power2.inOut" for images does not work the same with another layer of a different size.
I also have a couple of other more specific questions:
1. What is the best way in terms of performance to instant change one image to another?
I tried
gsap.set(image, {zIndex: 0})
gsap.set(image, {autoAlpha: 0})
gsap.set(image, {z: -1})
gsap.set(image, {visibility:"hidden"})
gsap.set(image, {opacity:0})
gsap.set(image, {display:'none'})
For example zIndex works better for me than autoAlpha, most likely because autoAlpha is only suitable if you need fade, and not an instant image change. Or maybe better not to use gsap.set() but something else?
2. How can i use one global easing for multiple items to make changes depending on the scale value, not on progress or duration? I did it like this:
var obj = {
scale: 1
};
var tl = gsap.timeline({ paused: true, onUpdate: update });
tl.to(obj, { scale: 2.2, duration: 3, ease: "power2.inOut"});
function update() {
gsap.set(image, { scale: obj.scale });
gsap.set(text, { scale: obj.scale });
if(obj.scale > 2){
gsap.set(text, { zIndex: 0 });
}
}
but it seems that using onUpdate is bad for performance (even if you leave only one change there)