Skip to content

Commit

Permalink
hide background for AR
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohlender committed Jan 13, 2025
1 parent af3f43c commit 182c8fc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/editor/app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Canvas, Color, extend, RootState, useFrame, useThree } from '@react-three/fiber'
import {
createXRStore,
IfInSessionMode,
isXRInputSourceState,
noEvents,
NotInXR,
Expand Down Expand Up @@ -121,10 +122,12 @@ export function App() {
style={{ width: '100%', flexGrow: 1 }}
>
<XR store={store}>
<mesh scale={1000}>
<meshBasicMaterial side={BackSide} color="black" />
<sphereGeometry />
</mesh>
<IfInSessionMode deny="immersive-ar">
<mesh scale={1000}>
<meshBasicMaterial side={BackSide} color="black" />
<sphereGeometry />
</mesh>
</IfInSessionMode>
<group pointerEventsType={{ deny: 'touch' }}>
<AudioEffects />
<PointerEvents />
Expand Down

0 comments on commit 182c8fc

Please sign in to comment.