🚀 Auto-deploy: melhoria no snap e medição AR em 30/05/2026 10:13:44

This commit is contained in:
2026-05-30 10:13:44 +00:00
parent 153c91dfc9
commit 7ff4ed3176
2 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ export function XRControllerMeasure() {
// running them every frame at 72fps can stall the Quest right after // running them every frame at 72fps can stall the Quest right after
// toggling "Medir" from the Ferramentas tab. We cap heavy work to ~24Hz. // toggling "Medir" from the Ferramentas tab. We cap heavy work to ~24Hz.
// Trigger/A/B/L-trigger polling continues every frame for responsiveness. // Trigger/A/B/L-trigger polling continues every frame for responsiveness.
const hitTestSourceRef = useRef<any>(null); const hitTestSourceRef = useRef<XRHitTestSource | null>(null);
const hitTestRequestedRef = useRef<boolean>(false); const hitTestRequestedRef = useRef<boolean>(false);
useFrame((_state, _dt, frame: XRFrame | undefined) => { useFrame((_state, _dt, frame: XRFrame | undefined) => {
+8 -3
View File
@@ -448,7 +448,7 @@ function XRGridLandingHandler() {
<XRGridLandingLaser reticlePos={reticlePos} /> <XRGridLandingLaser reticlePos={reticlePos} />
{/* Retícula dourada premium */} {/* Retícula dourada premium */}
<group ref={reticleRef as any}> <group ref={reticleRef}>
<mesh onClick={handleSelect}> <mesh onClick={handleSelect}>
<ringGeometry args={[0.08, 0.1, 32]} /> <ringGeometry args={[0.08, 0.1, 32]} />
<meshBasicMaterial color="#eab308" side={THREE.DoubleSide} transparent opacity={0.8} /> <meshBasicMaterial color="#eab308" side={THREE.DoubleSide} transparent opacity={0.8} />
@@ -557,7 +557,7 @@ function XRVirtRealCalibHandler() {
<XRVirtRealCalibLaser reticlePos={reticlePos} /> <XRVirtRealCalibLaser reticlePos={reticlePos} />
{/* Golden reticle */} {/* Golden reticle */}
<group ref={reticleRef as any}> <group ref={reticleRef}>
<mesh onClick={handleSelect}> <mesh onClick={handleSelect}>
<ringGeometry args={[0.08, 0.1, 32]} /> <ringGeometry args={[0.08, 0.1, 32]} />
<meshBasicMaterial color="#eab308" side={THREE.DoubleSide} transparent opacity={0.8} depthTest={false} /> <meshBasicMaterial color="#eab308" side={THREE.DoubleSide} transparent opacity={0.8} depthTest={false} />
@@ -920,6 +920,11 @@ function XRSnapHandler() {
// ─── Desktop Aligner Fallback for Virt/Real Calibration ─ // ─── Desktop Aligner Fallback for Virt/Real Calibration ─
function XRVirtRealDesktopAligner() { function XRVirtRealDesktopAligner() {
const { gl, camera, scene } = useThree(); const { gl, camera, scene } = useThree();
const [tick, setTick] = useState(0);
useEffect(() => {
return subscribeXRCalibration(() => setTick(t => t + 1));
}, []);
useEffect(() => { useEffect(() => {
const isAligning = xrCalibration.alignType === 'virt-real' && const isAligning = xrCalibration.alignType === 'virt-real' &&
@@ -959,7 +964,7 @@ function XRVirtRealDesktopAligner() {
gl.domElement.addEventListener('click', onClick); gl.domElement.addEventListener('click', onClick);
return () => gl.domElement.removeEventListener('click', onClick); return () => gl.domElement.removeEventListener('click', onClick);
}, [gl, camera, scene, xrCalibration.step, xrCalibration.alignType]); }, [gl, camera, scene, tick]);
return null; return null;
} }