Using a mobile device as a rotation controller (2019)

0

Demo

Exhaust a QR code scanner with a cell instrument to scan this code, and originate transferring the Earth!

Placing it collectively

This if truth be told changed into a conventional case of stacking current substances love lego.

  • The DeviceOrientation match is fragment of the W3C standards, and whereas it’s detached an experimental characteristic, many browsers already enhance it.
    The documentation even helps you out changing Euler angles (the match’s illustration of the instrument orientation) to quaternions, which can furthermore very properly be on the total neatly-behaved when facing rotations and orientations.
  • three.js is a sturdy 3D javascript library; the globe changed into tailored from this situation.
  • PeerJS is a javascript p2p library wrapping WebRTC with a actually easy-to-spend API, they typically even present a default, free dealer server for the preliminary connection.
  • I aged qrcode-generator to generate the QR code.

Code

The code is on hand on Github:
globe.html,
globe.js,
consumer.html,
consumer.js.

Read More

Leave A Reply

Your email address will not be published.