Pico4 Browser Crash
My VR device is PICO4 I use the official example code and npm package:
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>
</>
)
}
Entering VR mode for the first time works fine, but if I pause and then resume, the browser crashes (just keeps loading).
Here is the console error:
@Yanbing-Han does the error happen on any other experience? :)
yes, I also encountered this error on other project, but the code is much more complicated.
@Yanbing-Han please check if you can reproduce the problem in the official examples: https://immersive-web.github.io/webxr-samples/
if that is the case, its not a library problem but a device/OS/browser issue that I have no control over and you should reach out to pico in that case
thanks !