We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R3F v8 and v9 both cause the following warning: THREE.Renderer: .render() called before the backend is initialized. Try using .renderAsync() instead.
THREE.Renderer: .render() called before the backend is initialized. Try using .renderAsync() instead.
Reproduction:
git clone [email protected]:verekia/three-gpu-ecosystem-tests.git
cd three-gpu-ecosystem-tests
cd vite-ts-swc-r3f8-react18
npm i
npm run dev
The text was updated successfully, but these errors were encountered:
@CodyJasonBennett provided a workaround here:
const [frameloop, setFrameloop] = useState('never') return ( <Canvas frameloop={frameloop} gl={canvas => { const renderer = new WebGPURenderer({ canvas, powerPreference: 'high-performance', antialias: true, alpha: true, }) renderer.init().then(() => setFrameloop('always')) renderer.xr = { addEventListener: () => {} } return renderer }} >
But ideally we leverage suspense and allow for a promise to be passed into gl such that this works:
gl
<Canvas gl={async (canvas) => { const renderer = new WebGPURenderer({ canvas, powerPreference: 'high-performance', antialias: true, alpha: true, }); await renderer.init(); // This shouldn't be necessary either // renderer.xr = { addEventListener: () => {} }; return renderer; }} >
Sorry, something went wrong.
krispya
No branches or pull requests
R3F v8 and v9 both cause the following warning:
THREE.Renderer: .render() called before the backend is initialized. Try using .renderAsync() instead.
Reproduction:
git clone [email protected]:verekia/three-gpu-ecosystem-tests.git
cd three-gpu-ecosystem-tests
cd vite-ts-swc-r3f8-react18
npm i
npm run dev
The text was updated successfully, but these errors were encountered: