🚀 Auto-deploy: melhoria no snap e medição AR em 02/06/2026 21:25:43

This commit is contained in:
2026-06-02 21:25:43 +00:00
parent 0126d8d78c
commit 11547f7bc7
4 changed files with 310 additions and 209 deletions
+1 -19
View File
@@ -330,25 +330,7 @@ export function XRControllerMeasure() {
trigState.current = false;
}
// ── Button A (undo) ──────────────────────────────────────────────
const aBtn = gp?.buttons?.[4];
const aVal = aBtn ? (aBtn.value || (aBtn.pressed ? 1 : 0)) : 0;
if (!aState.current && aVal > BTN_ON) {
aState.current = true;
useModelStore.getState().undoLastMeasurement();
} else if (aState.current && aVal < TRIG_OFF) {
aState.current = false;
}
// ── Button B (clear) ─────────────────────────────────────────────
const bBtn = gp?.buttons?.[5];
const bVal = bBtn ? (bBtn.value || (bBtn.pressed ? 1 : 0)) : 0;
if (!bState.current && bVal > BTN_ON) {
bState.current = true;
useModelStore.getState().clearMeasurements();
} else if (bState.current && bVal < TRIG_OFF) {
bState.current = false;
}
// A and B physical buttons are now handled globally in XRHudInWorld.tsx for the Summon Menu.
});
// Construct the laser Line object once so we can attach via <primitive>