Skip to content

Compass

Josh Stovall edited this page Dec 19, 2020 · 2 revisions

Compass()

Uses phone magnetometer as a compass. See the live demo.

tracks orientation of the device as compared to the Earth coordinate frame

see DeviceOrientationEvent and Orientation and motion data explained

Example

var compass = new XR.Compass();

Parameters

Name Type Default Description
range array 0 to 1 range
Clone this wiki locally