Changes
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
@@ -533,14 +533,15 @@ const XRSession = () => {
|
|||||||
|
|
||||||
{effectiveInXR ? (
|
{effectiveInXR ? (
|
||||||
<>
|
<>
|
||||||
{/* In XR (or SimXR): grab wrapper → model. Skip hit-test in SimXR mode. */}
|
{/* In XR (or SimXR): grab wrapper → ACTIVE model. Other models render as static background. */}
|
||||||
|
<XRBackgroundModels />
|
||||||
{simXR ? (
|
{simXR ? (
|
||||||
<group position={[0, 1.0, -1.2]}>
|
<group position={[0, 1.0, -1.2]}>
|
||||||
<XRGrabbable
|
<XRGrabbable
|
||||||
allowScale={allowScale}
|
allowScale={allowScale}
|
||||||
onGrabStart={() => { if (placementMode) setPlacementMode(false); }}
|
onGrabStart={() => { if (placementMode) setPlacementMode(false); }}
|
||||||
>
|
>
|
||||||
<XRModel url={model.url} />
|
<XRActiveModel />
|
||||||
</XRGrabbable>
|
</XRGrabbable>
|
||||||
</group>
|
</group>
|
||||||
) : (
|
) : (
|
||||||
@@ -556,7 +557,7 @@ const XRSession = () => {
|
|||||||
allowScale={allowScale}
|
allowScale={allowScale}
|
||||||
onGrabStart={() => { if (placementMode) setPlacementMode(false); }}
|
onGrabStart={() => { if (placementMode) setPlacementMode(false); }}
|
||||||
>
|
>
|
||||||
<XRModel url={model.url} />
|
<XRActiveModel />
|
||||||
</XRGrabbable>
|
</XRGrabbable>
|
||||||
</XRHitTestPlacement>
|
</XRHitTestPlacement>
|
||||||
)}
|
)}
|
||||||
@@ -580,9 +581,10 @@ const XRSession = () => {
|
|||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
{/* Desktop preview (no headset): show model with OrbitControls */}
|
{/* Desktop preview (no headset): show all models with OrbitControls */}
|
||||||
<group position={[0, 0, 0]}>
|
<group position={[0, 0, 0]}>
|
||||||
<XRModel url={model.url} />
|
<XRBackgroundModels />
|
||||||
|
<XRActiveModel />
|
||||||
</group>
|
</group>
|
||||||
<XRMeasurementOverlay />
|
<XRMeasurementOverlay />
|
||||||
<OrbitControls
|
<OrbitControls
|
||||||
|
|||||||
Reference in New Issue
Block a user