I am trying to render a object3D component with my own data onto the three scene. Using the OBJLoader built into threejs, the callback provides me a variable representing an object3D from the loaded file. However, I am uncertain on how I should go about adding it to the scene.
As of right now, I am assigning the object3D variable in the render function to a variable.
<object3D ref={(model) => { this.model = model; }}/>
And in the callback of the loader function, I am assigning the obj to the ref:
To no avail :(. Maybe it's because i don't have a material assigned to this object3D; however, I am struggling to place that as a child of the object3D.
Hello friends,
I am trying to render a object3D component with my own data onto the three scene. Using the OBJLoader built into threejs, the callback provides me a variable representing an object3D from the loaded file. However, I am uncertain on how I should go about adding it to the scene.
As of right now, I am assigning the object3D variable in the render function to a variable.
<object3D ref={(model) => { this.model = model; }}/>
And in the callback of the loader function, I am assigning the obj to the ref:To no avail :(. Maybe it's because i don't have a material assigned to this object3D; however, I am struggling to place that as a child of the object3D.