I’m loading an FBX model and receiving a THREE.Object3D object when its loaded. I want to get its vertex data and stuff from the models geometry preferably in a buffer geometry class.
I tried to simply access it like obj.geometry.etc...
but that doesn’t seem to work
The result object of FBXLoader
is an instance of THREE.Group
. Consider it as a container which holds a hierarchy of meshes. Use this approach for accessing geometry data:
obj.traverse( function( o ) {
if ( o.isMesh ) console.log( o.geometry );
} );
And yes, the geometries are represented as instances of THREE.BufferGeometry
.