Add calibration options to the compass app

This commit is contained in:
James Babcock committed 2026-08-20 09:57:33 -07:00
1 parent 9e447b70e2
commit 12bb76ba3c
4 files changed
+252 -35

No files matched your search

+10
View File
@@ -10,6 +10,16 @@ export const TOP_BAR_HEIGHT = 28;
*/
export const SIDEBAR_WIDTH = 64;
/**
* X of the display's true horizontal centre, in app-viewport coordinates. The
* sidebar pushes the viewport to the right, so UI the wearer physically aims
* with — a compass rose, a calibration crosshair — has to offset by it rather
* than use the viewport's own centre.
*/
export function screenCenterInViewportX(): number {
return Math.round(G2_LENS_WIDTH / 2) - SIDEBAR_WIDTH;
}
/**
* On the color-key shell surface, pixel value 0 is transparent; 1 is the
* darkest opaque shade (identical to 0 after 4bpp quantization). Shell