-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Currently we depend on pex-sys/Window.addEventListener or manually calling gui.onMouseMove callbacks. It would be good to move to shared library between pex-sys,pex-gui and pex-cam.
Requirements:
- works with mouse and touch (ideally using PointerEvents)
- works in plask and borwser (can be via pex-gl.canvas)
- has clear prioritisation (e.g. gui/GUI before cam/Arcball)
- can cancel events or mark as handled (so Arcball doesn't move when i move the slider)
- can filter events / record
- allows implementing gestures
- can map/filter/transform events (e.g. limit mouse movement to a viewport)
Ideal scenario:
- create stream of events for a canvas
- pass stream to a Logger
- pass stream to GUI
- pass stream to Arcball
- on canvas.mousedown new event is added to the stream
- Logger responds to a change, console.logs the event and leaves it in the stream
- GUI responds to the change, if click is inside a slider the event is consumed, otherwise it's passed to the Arcball
Questions:
- am i reinventing the wheel and try to compensate for lack of event bubbling that I would have for free when using HTML based GUI?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels