canvas2video icon indicating copy to clipboard operation
canvas2video copied to clipboard

Text wont fade in when is change opacity

Open licavalentin opened this issue 3 years ago • 1 comments

I wanted to make the text (i also have tried with images) fade in by changing its opacity, but the text just "pops up"

            var text = new fabric.Textbox("Hello Worlds");
            text.set("fill", "#ffffff");

            anim.fromTo(
                text,
                { opacity: 0 },
                { opacity: 1, duration: 1, delay: 1, ease: Power2.easeIn },
            );

            canvas.add(text);
            compose();

licavalentin avatar Feb 07 '21 17:02 licavalentin

@ValentinHLica You should add text first, then animate it. You are adding text after the animation is completed.

BatuhanW avatar Feb 10 '21 16:02 BatuhanW