Currently, I'm in the process of uploading a range of .obj and .mtl files for a volume rendering tool that was created using WebGL and Three.js. Within a section of my code, I am utilizing OBJMTLLoader to handle the file uploads:
scapula = new THREE.OBJMTLLoader();
scapula.load( 'obj/scapulaTWO.obj', 'obj/scapulaTWO.mtl',
function ( object ) {
object.name = "scapula";
object.scale.set (4,4,4);
vertices = object.geometry.vertices;
scene.add(object);
});
Despite my efforts, I've encountered an issue where I'm unable to access the vertices. The debugger indicates that object.geometry is undefined. I also attempted:
vertices = new THREE.Mesh(object);
without success. Any assistance with this matter would be greatly appreciated.
Thank you in advance.