Open
Description
When I want to use the transform effect, to make it move from one side to the other, it leaves a trail. The previous frame should be cleared when moving.
const cursorLayer = new etro.layer.Image({
source: cursorImage,
startTime: 0,
duration: video.duration,
destHeight: 32,
destWidth: 22,
x: (canvas.width - canvas.width / 1.1) / 2,
y: (canvas.height - canvas.height / 1.1) / 2,
width: canvas.width / 1.1,
height: canvas.height / 1.1,
});
const cursorEffect = new etro.effect.Transform({
matrix: new etro.KeyFrame(...cursorKeyframes),
})
cursorLayer.effects.push(cursorEffect);
movie.layers.push(cursorLayer);