Machine-readable: manifest · index · English Markdown
Coordinate and pose conventions
After a successful localization request, 01Spatial returns the camera pose in map coordinates. Correct matrix direction and camera-axis handling prevent mirrored Content, 180° rotations, and constant offsets.
Transform notation
Let T_A_B mean “transform a point expressed in frame B into frame A.”
M: the Map coordinate frame.A: the current AR session coordinate frame.C: the Camera coordinate frame.T_M_C: camera-to-map, returned by the API ascamera_to_world.
matrix_column_major is a complete 4 × 4 column-major matrix. Three.js Matrix4.fromArray() reads it directly; do not transpose it again.
Camera axes
The API pose uses computer-vision camera axes:
| Axis | Direction |
|---|---|
+X | Right |
+Y | Down |
+Z | Forward |
WebXR and OpenGL-style cameras usually use +X right, +Y up, and -Z forward, so define:
D_cv_to_graphics = diag(1, -1, -1, 1)
Align map Content
When capturing a query image, save the camera-to-session transform T_A_C_graphics from the same frame. If the uploaded image is not rotated:
T_A_M = T_A_C_graphics × D_cv_to_graphics × inverse(T_M_C)
Apply T_A_M to a shared map root, never to the AR camera. For an object with map-space transform T_M_O:
T_A_O = T_A_M × T_M_O
If the uploaded image is rotated, include the inverse transform for that exact image rotation; swapping width and height or adjusting intrinsics is not sufficient. A Rig.v2 response can reference any uploaded frame, so use the saved AR transform that corresponds to poses[0].image.
Translation is in metres for a metrically configured map. Do not assume that every map uses the same up axis; the Origin saved for that map is authoritative.