Tars
Tars

Reputation: 99

Animating color in Fabric.js

Loving fabric and trying to get to grips with it all.

First, I created a text like this:

newtext = new fabric.Text('EUI', {
    fontFamily: 'UbuntuL',
    fontSize: 70,
    fill: '#555',
    selectable: false,
});
canvas.add(newtext);

But, It can't change color with animate:

newtext.animate({
    fill:'#f00',
}, {
    duration: 3000,
    easing: fabric.util.ease.easeOutCubic,
    onChange: canvas.renderAll.bind(canvas),
});

Can someone explain please?

Thanks

Upvotes: 4

Views: 1415

Answers (1)

Vito Gentile
Vito Gentile

Reputation: 14356

In this Google Group, a user explains that:

color animation is not yet implemented in fabric.js

So the only thing you can do is to implement something to animate color by yourself.

Upvotes: 2

Related Questions