resetOrientation
resetOrientation(): voidSource: main.ts:227
Resets and calibrates the reference frame, setting the current physical orientation as origin (0, 0, 0, 1).
Emits an immediate identity quaternion update through the registered onUpdate callback. Subsequent updates are rotated relative to this new zero reference.
Returns
void
Example
CODE
import { deviceRotation } from "web-orientation";
document.getElementById("recalibrate-btn").addEventListener("click", () => {
deviceRotation.resetOrientation();
});