freshfork / p5.EasyCam

A p5.js library for easy 3D camera control.
https://freshfork.github.io/p5.EasyCam
MIT License
136 stars 33 forks source link

Mouse wheel behavior in offset canvas #28

Open jwdunn1 opened 1 year ago

jwdunn1 commented 1 year ago

View a reproduction of the issue here In this example, the red zone represents a non-offset canvas. The mouse wheel only works (zooms) where the red overlaps the offset canvas. The wheel fails while over the canvas outside the red zone. Expected behavior: mouse wheel should work if the mouse pointer is anywhere over the canvas, even when offset. Code at line 299 should account for canvas offset in a manner similar to the handling of mousedown and dblclick.

jwdunn1 commented 1 year ago

Another observation in examples/MultiCanvas: the mouse wheel only works for the first instance.