Skip to content

mouse offscreen behaviors bugfix #8030

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

Merged
merged 6 commits into from
Aug 21, 2025
Merged

mouse offscreen behaviors bugfix #8030

merged 6 commits into from
Aug 21, 2025

Conversation

ksen0
Copy link
Member

@ksen0 ksen0 commented Aug 11, 2025

Addresses #8022
Build used by https://editor.p5js.org/ksen0/sketches/jX3A7w1dL - this sketch also allows to manually test movedX/Y with and without pointer lock, at different zoom levels.

The proposed bugfix uses a different moved X/Y mechanism if pointer lock is on or off. The documentation is also updated to more precisely describe behavior during pointerlock.

@ksen0 ksen0 force-pushed the 8022 branch 2 times, most recently from 97ba3a0 to 848fe95 Compare August 21, 2025 15:36
@ksen0 ksen0 marked this pull request as ready for review August 21, 2025 15:46
Copy link
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo in comments, otherwise looks good to me!

Copy link
Collaborator

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor typo, otherwise looks great to me!

@ksen0
Copy link
Member Author

ksen0 commented Aug 21, 2025

Quick update - there's a really weird lag in the locked condition - here's a recording of me moving the mouse at about a constant speed, then requesting pointer lock (iff pink background):

Untitled3.mov

I'm not quite able to reproduce it consistently, for example this sketch which is using the same build at the local version in the video (both at no specific zoom level), doesn't have this: https://editor.p5js.org/ksen0/sketches/jX3A7w1dL

EDIT: Occurs specifically when "developer tools" are open, which is the behavior in earlier versions. Therefore, will merge

@ksen0 ksen0 merged commit 374cc96 into main Aug 21, 2025
5 checks passed
@ksen0 ksen0 deleted the 8022 branch August 21, 2025 21:56
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

Successfully merging this pull request may close these issues.

3 participants