← Back

AR Camera Overlay

Live camera feed with canvas markers pinned to compass bearings. Tests the viability of placing world-anchored elements on a camera view using only the browser's orientation API.

Live viewer

Markers are placed at fixed angular offsets from north. Pan the device — they should remain locked to their bearing. Accuracy depends on compass quality and how the projection handles the camera's horizontal field of view.

Camera and orientation not started.
heading: —°
Projection model. This uses a simple cylindrical projection: the camera's horizontal FOV (assumed ~60°) maps linearly to screen width. A target at bearing B is positioned at x = width/2 + (B − heading) / FOV × width, wrapping at ±180°. A full spherical projection would handle looking up/down correctly but is overkill for a flat world view.

Test targets

Six test markers at fixed compass bearings (every 60°). The Screen angle column shows how far off-centre each marker currently is — 0° means dead ahead, ±30° is at the edge of the assumed FOV.