import { Canvas } from '@react-three/fiber' import { XR, createXRStore } from '@react-three/xr' import { useState } from 'react' const store = createXRStore() export function App() { const [red, setRed] = useState(false) return ( <> <button onClick={() => store.enterAR()}>Enter AR</button> <Canvas> <XR store={store}> <mesh pointerEventsType={{ deny: 'grab' }} onClick={() => setRed(!red)} position={[0, 1, -1]}> <boxGeometry /> <meshBasicMaterial color={red ? 'red' : 'blue'} /> </mesh> </XR> </Canvas> </> ) }
This project is supported by a few companies and individuals building cutting-edge 3D Web & XR experiences. Check them out!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4