Explanation on Scene is ther AutoUpdate? #2381
Replies: 4 comments
-
Never mind apparently this works fine? had to change |
Beta Was this translation helpful? Give feedback.
-
<Canvas onCreated={state => {
state.scene.autoUpdate = true |
Beta Was this translation helpful? Give feedback.
-
I read this the docs about onCreate its callback so could I callback my Scene? and pass it as prop for another class to add to? I am really sorry but the docs don't explain much to me on this |
Beta Was this translation helpful? Give feedback.
-
oncreated fires when the canvas is ready, and you receive the full state model as the 1st arg. it contains everything, the default scene, camera, raycaster, etc. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying gain access to Scene and Camera and pass that through a useRef besides that I think I am misunderstanding react-three-fiber
so Component is THREE.scene right its not accessible via the atrributes of that component like camera for example.
How do you implement autoUpdate properties then?
here i am following this attribute syntax scene-autoUpdate as exampled for meshes form the docs
https://threejs.org/docs/#api/en/scenes/Scene
Maybe I just don't get it.
Beta Was this translation helpful? Give feedback.
All reactions