Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update src/events/mouse.js
Co-authored-by: Perminder Singh <[email protected]>
  • Loading branch information
ksen0 and perminder-17 authored Aug 21, 2025
commit f6a6bca6bd8dc874da999c5463179e968c6a16f9
2 changes: 1 addition & 1 deletion src/events/mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ p5.prototype._updateNextMouseCoords = function(e) {
// https://developer.mozilla.org/en-US/docs/Web/API/Document/pointerLockElement
// "The pointerLockElement ... is null if lock is pending, pointer is unlocked,
// or the target is in another document."
// In this case, we use mouseX/Y and pmousX/Y to calculate the distance,
// In this case, we use mouseX/Y and pmouseX/Y to calculate the distance,
// which allows movedX/Y to look consistent at different zoom levels acorss
// browsers.
const deltaX = this.mouseX - this.pmouseX;
Expand Down