Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform effect leaves a trail when using the image layer. #286

Open
keithudev opened this issue Oct 21, 2024 · 0 comments
Open

Transform effect leaves a trail when using the image layer. #286

keithudev opened this issue Oct 21, 2024 · 0 comments

Comments

@keithudev
Copy link

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant