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

Use separate "offscreen" canvas to optimize performance? #197

Open
Trunksome opened this issue Oct 28, 2020 · 2 comments
Open

Use separate "offscreen" canvas to optimize performance? #197

Trunksome opened this issue Oct 28, 2020 · 2 comments

Comments

@Trunksome
Copy link

Is there any way to use multiple canvases with this library? I am asking this because drawing more complex objects on a separate "offscreen" canvas in order to cache them is a common way to improve performance. Take a look at Mozillas recommendations here.

Would be great to hear any hints on this!

@chy101010
Copy link

Hey, did you figure out how?

@mikepj
Copy link

mikepj commented Dec 3, 2021

If you don't need high framerates, you can always draw to the canvas offscreen and then create an image from it using toDataURL(). Then just display the resulting image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants