🚀 Auto-deploy: melhoria no snap e medição AR em 02/06/2026 21:25:43
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user