RotationUpdate
interface RotationUpdate {
quaternion: { w: number; x: number; y: number; z: number };
}Source: types.ts:24
Example
CODE
deviceRotation.onUpdate((update: RotationUpdate) => {
const { x, y, z, w } = update.quaternion;
console.log(`Current rotation quaternion: (${x}, ${y}, ${z}, ${w})`);
});Properties
quaternion: { w: number; x: number; y: number; z: number }
Properties
w(number)x(number)y(number)z(number)