satoshinm / NetCraft

Web-based fork of fogleman/Craft ⛺
https://satoshinm.github.io/NetCraft/
MIT License
57 stars 13 forks source link

Listen for devicemotion event #184

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

Allow device acceleration (devicemotion HTML5 event: http://kripken.github.io/emscripten-site/docs/api_reference/html5.h.html#device-motion) to move the camera freely, as an alternative to free look with the mouse or touch or keyboard or joystick.

This is important for e.g. Google Cardboard support

satoshinm commented 7 years ago

three.js for reference added in https://github.com/mrdoob/three.js/pull/4475 this example: https://github.com/mrdoob/three.js/blob/6c7f000734f8579da37fb39e5c2e9e5e2dfb14f8/examples/js/controls/DeviceOrientationControls.js "DeviceOrientationControls"

satoshinm commented 7 years ago

Not functional, but might as well merge this stub for implementation later - no sense in keeping this PR open