0
如何动画fillLinearGradientColorStops
KineticJS Rect
?我尝试使用补间,但肯定它不工作。动画“fillLinearGradientColorStops”形状
矩形:
var rect = new Kinetic.Rect({
x: 20,
y: 20,
width: 100,
height: 100,
fillLinearGradientStartPoint: { x: -50, y: -50 },
fillLinearGradientEndPoint: { x: 50, y: 50 },
fillLinearGradientColorStops: [0, 'red', 1, 'yellow']
});
补间:
var tween = new Kinetic.Tween({
node: rect,
duration: 2,
easing: Kinetic.Easings.Linear,
fillLinearGradientColorStops: [0, 'black', 1, 'green']
});
tween.play();
请参阅小提琴http://jsfiddle.net/ZdCmS/。这不可能吗?