-
Notifications
You must be signed in to change notification settings - Fork 4
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
Modular mouse and touch handling #8
Comments
Some of the stack.gl modules that DON'T fulfil the requirements http://stack.gl/packages/#mattdesl/touch-position var position = require('touch-position')();
//inside your render loop...
function render () {
drawSprite(position[0], position[1]);
} http://stack.gl/packages/#Jam3/touches const mouseDown = (ev, position) => { }
//get mouse/touch events on window
require('touches')()
.on('start', mouseDown) //-> mousedown / touchstart
.on('move', mouseMove) //-> mousemove / touchmove
.on('end', mouseEnd) //-> mouseup / touchend |
Approaches to events Flyd Streams Pull Streams? Channels? |
Pointer Events (unifies mouse + touch) Possible events
|
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
andpex-cam
.Requirements:
Ideal scenario:
Questions:
The text was updated successfully, but these errors were encountered: