Web APIs

Device Orientation API

Checking compatibility...

Access information about the device's physical orientation and motion. Perfect for creating immersive experiences and motion-based interactions.

Basic Orientation Detection

Detect device rotation around three axes (alpha, beta, gamma) to respond to how the device is held.

=
=
=
=
=
=

Output

Click Run to see output...

Motion Detection

Track device acceleration and rotation rate to detect how the device is moving through space.

=
=
=
=
=
=

Output

Click Run to see output...

Compass Heading

Calculate compass direction using orientation data to show which way the device is pointing.

=
=
=
=
=
=

Output

Click Run to see output...

Gesture Recognition

Implement shake detection by analyzing acceleration data to create gesture-based controls.

=
=
=
=
=
=

Output

Click Run to see output...