pankod / canvas2video

canvas2video is a backend solution for creating and rendering dynamic videos.
https://pankod.com
GNU General Public License v3.0
282 stars 38 forks source link

Text wont fade in when is change opacity #27

Open licavalentin opened 3 years ago

licavalentin commented 3 years ago

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();
BatuhanW commented 3 years ago

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