This document discusses device orientation and motion APIs. It provides an overview of the math and concepts involved, including Tait-Bryan angles and applying rotations. Code examples are given for capturing orientation data from a device and updating a 3D model. Browser support for the APIs is covered, noting differences between implementations. Tips are offered on testing support, dealing with calibration needs, and handling portrait vs landscape orientations.
25. Holding your device THE RIGTH WAY™
How FF thinks you should hold How Opera (and Chrome) think
your landscape device you should hold your landscape
device
33. Things to remember:
• Angular position, angular speed and acceleration
• Intrinsic axes of rotation
• Rotations have to be applied *in order*
• Singularity in alpha/gamma
• 3D libraries / languages can make your life easier
• Browser support but different implementations
• BYO calibration
• Portrait/landscape matters
• You may want some buffering
• Device motion has only partial support
34. That’s all :)
Thanks!!
Luz Caballero
@gerbille
github.com/luzc