Closed kettle11 closed 3 years ago
https://github.com/kettle11/kettlewin/blob/e0bb32b4e9083493bafcc53e5e97f00a24978536/platforms/web/src/application_web.rs#L30
set_mouse_position should set the mouse position relative to the current window (or canvas?)
set_mouse_position
Investigate pointer lock API here: https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API
Perhaps other platforms should be implemented to have a similar API, as "locking" the pointer seems to be the most common use case for moving the mouse.
Closing this because set_mouse_position is impossible (as far as I know) on web and lock_mouse_position will be used instead.
lock_mouse_position
https://github.com/kettle11/kettlewin/blob/e0bb32b4e9083493bafcc53e5e97f00a24978536/platforms/web/src/application_web.rs#L30
set_mouse_position
should set the mouse position relative to the current window (or canvas?)Investigate pointer lock API here: https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API
Perhaps other platforms should be implemented to have a similar API, as "locking" the pointer seems to be the most common use case for moving the mouse.