Closed samevision closed 1 year ago
canvas is running completely off the main thread, there are no callbacks between the two threads, except messaging channels that you yourself manage (postmessage, broadcast, shared arraybuffer)
// Scene.jsx
export default function Scene() {
const state = useThree()
useLayoutEffect(() => {
// ... in here, "state" contains the initial root state
}, [])
return (
<mesh />
...
I see. Thanks.
Hi,
I noticed that setting a function for the Canvas prop
onCreated
for example leads to this error:How is it possible to use it?
Best