You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, there's a lot to consider here, especially if you take into account three dimensional space. Maybe aircraft motion types? Pitch, yaw, roll? coupled with "gestures" like "flick" or "shake"
That's actually a great point: Accelerometers work a bit like joystick axes. Since that's the case I should be able to just mimick how the Gamepad plugin handles it:
HI.on('gpad:axis:1', moveBackAndForth); // Something similar to this
To keep things simple for everyone I'll see if I can add support for all the common ways to represent axes:
That way you could do HI.on('pitch', forwardBack)orHI.on('tilt', tiltControl)or get more specific and do things like HI.on('tilt:left', doTiltLeft);
Once those basics are complete I can add support for gestures like shake, spin, flip, and tossdevice. The latter could be a cool way for manufacturers to demonstrate the robustness of their phones/tablets by writing a game that detects when the device is thrown (HI.on('tossdevice', playWheeSound)) and lands in a designated bin (HI.on('suddenstop', locationCheck)) 😄
Awesome library!
Would be great to add motion support, via:
https://developer.mozilla.org/en-US/docs/Web/API/Detecting_device_orientation
The text was updated successfully, but these errors were encountered: