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

Canvas renderer visual bug #140

Open
1 task
spmonahan opened this issue Jun 7, 2023 · 3 comments
Open
1 task

Canvas renderer visual bug #140

spmonahan opened this issue Jun 7, 2023 · 3 comments
Labels

Comments

@spmonahan
Copy link

Overview

The canvas renderer displays visual bugs. It looks like the background is not being cleared before a new frame is drawn.

I've created a repro for the issue:

The issue is also present in lottie-player but is not present in lottie-web.

For the repro cases I've used an animation file from the Lottie site but I first noticed this with a different animation so it seems that it's not the animation file itself.

Consuming repo

react-lottie-player

...

Labels

  • Add the Type: Bug label to this issue.

This is potentially the same issue as: LottieFiles/lottie-player#211

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Aug 7, 2023
@Aystub
Copy link

Aystub commented Sep 22, 2023

If anyone else comes across this, there's a setting already in the library to handle clearing the canvas on re-draw. I didn't see it in the docs anywhere though. Can pass it as rendererSettings to the Player component. Properties you can pass are in this defaultOptions object: https://github.com/LottieFiles/lottie-react/blob/master/src/Player.tsx#L101-L106

<Player
  src={"./animation.json"}
  renderer={"canvas"}
  rendererSettings={{clearCanvas: true}} // Clears on re-draw
/>

@github-actions github-actions bot removed the stale label Sep 23, 2023
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants