🚀 Auto-deploy: melhoria no snap e medição AR em 22/05/2026 20:17:13
This commit is contained in:
@@ -802,7 +802,7 @@ function SelectionHandler() {
|
|||||||
|
|
||||||
/** Walks the scene each time visibility/selection state changes and applies
|
/** Walks the scene each time visibility/selection state changes and applies
|
||||||
* per-element visibility + emissive highlight for selected elements. */
|
* per-element visibility + emissive highlight for selected elements. */
|
||||||
function VisibilityApplier() {
|
export function VisibilityApplier() {
|
||||||
const { scene } = useThree();
|
const { scene } = useThree();
|
||||||
const nonce = useModelStore((s) => s.visibilityNonce);
|
const nonce = useModelStore((s) => s.visibilityNonce);
|
||||||
const models = useModelStore((s) => s.models);
|
const models = useModelStore((s) => s.models);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import { ControllerLocomotion } from '@/components/three/ControllerLocomotion';
|
|||||||
import { useDevKit } from '@/devkit/useDevKit';
|
import { useDevKit } from '@/devkit/useDevKit';
|
||||||
import { DevPanel } from '@/devkit/DevPanel';
|
import { DevPanel } from '@/devkit/DevPanel';
|
||||||
import { FakeControllers } from '@/devkit/FakeControllers';
|
import { FakeControllers } from '@/devkit/FakeControllers';
|
||||||
|
import { VisibilityApplier } from '@/components/three/ModelViewer';
|
||||||
|
|
||||||
// --- Diagnóstico XR ---
|
// --- Diagnóstico XR ---
|
||||||
console.log('[XR] Inicializando store...');
|
console.log('[XR] Inicializando store...');
|
||||||
@@ -158,6 +159,7 @@ function XRModel({ sceneModel }: { sceneModel: import('@/stores/useModelStore').
|
|||||||
<group scale={[renderFactor, renderFactor, renderFactor]}>
|
<group scale={[renderFactor, renderFactor, renderFactor]}>
|
||||||
<group
|
<group
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
userData={{ modelId: sceneModel.id }}
|
||||||
position={[
|
position={[
|
||||||
-modelInfo.center.x + fineTuning.posX,
|
-modelInfo.center.x + fineTuning.posX,
|
||||||
-modelInfo.center.y + fineTuning.posY,
|
-modelInfo.center.y + fineTuning.posY,
|
||||||
@@ -614,7 +616,7 @@ const XRSession = () => {
|
|||||||
<XRMeasurementOverlay />
|
<XRMeasurementOverlay />
|
||||||
<XRControllerMeasure />
|
<XRControllerMeasure />
|
||||||
<ControllerLocomotion rigRef={rigRef} />
|
<ControllerLocomotion rigRef={rigRef} />
|
||||||
|
<VisibilityApplier />
|
||||||
|
|
||||||
|
|
||||||
{/* In-world HUD — visible inside passthrough where DOM overlays cannot reach */}
|
{/* In-world HUD — visible inside passthrough where DOM overlays cannot reach */}
|
||||||
|
|||||||
Reference in New Issue
Block a user