Open ES-Alexander opened 10 months ago
May be possible using the Touch events API, but from an initial read I'm unsure whether it provides access to touch positions relative to the pad, or just something based on previous mouse positions or something. The descriptions seem to be focused on what a touchscreen would have (where you literally touch parts of the page), but the API does specify it can apply to both touch screens and trackpads...
Oh you went far with that one 😅
I liked it, but apparently this is not yet supported by any browser api, although there is the pointer lock api, which is very cool and maybe has some synergy with that kind of feature.
In case it's relevant, there's also the proposed GamepadTouch
Interface, but I don't believe it has browser support yet either.
No idea if this is possible (I'm not sure what the browser gets access to), but it'd be really cool to be able to assign regions of the trackpad as input sliders for controls, e.g. if I slide my finger up/down the right edge then I can make my lights1 dimmer/brighter, but if I do it on the left edge it does lights2 instead...
We could also then have the left and right halves of the trackpad used for motion control, which could be useful for testing purposes, or in emergencies if the joystick dies or something.