-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Added window size check upon p5 instantiation #7134
Conversation
This fixes a bug where `windowWidth` and `windowHeight` would represent the correct values when the window was resized and no p5 sketch was active
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for helping narrow down the cause of this bug!
I've just updated where the function is called to run before the init handlers as you suggested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes, looks great!
@all-contributors please add @Evorage0 for bug, code |
I've put up a pull request to add @Evorage0! 🎉 |
Resolves #7133
Changes:
Adds a function called upon p5 initialisation which fixes a bug where
windowWidth
andwindowHeight
would represent the correct values when the window was resized and no p5 sketch was activeVideo of the before:
https://github.com/user-attachments/assets/82ebad21-5d55-4203-870b-184f9b8775e8
PR Checklist
npm run lint
passes