-
Notifications
You must be signed in to change notification settings - Fork 701
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
feat: add prop to configure canvasRenderingContext2DSettings #2104
feat: add prop to configure canvasRenderingContext2DSettings #2104
Conversation
This commit optimizes the performance of the useSpriteLoader function by adding the 'willReadFrequently' flag to the getContext method call. This flag improves the rendering performance when reading from the canvas context. The change ensures that the getContext method is called with the 'willReadFrequently' flag set to true, which can result in faster rendering of sprite textures.
@hichemfantar is attempting to deploy a commit to the Poimandres Team on Vercel. A member of the Team first needs to authorize it. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
- Added the canvasRenderingContext2DSettings prop to the SpriteAnimator component in the core module.
@hichemfantar There are some conflicts now because I merged your other PR with the error handling, please fix them so I can merge this one as well. Thanks! |
@netgfx all good! |
🎉 This PR is included in version 9.114.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Why
Added the canvasRenderingContext2DSettings prop to the SpriteAnimator component in the core module
resolves #2103
What
add ability to enable
willReadFrequently
as recommended by https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequentlyChecklist