function loadModel(){
switchCamera("orthographic");
var modelLoader = new THREE.JSONLoader();
modelLoader.load("models/sphere.json", callBack);
}
function callBack(object3D_geometry){
var material = new THREE.MeshLambertMaterial( { color:0x000000 } );
var model = new THREE.Mesh( object3D_geometry, material);
scene.add(model);
console.log(object3D_geometry);
//console.log(object3D_geometry.boundingBox);
//model.geometry.computeBoundingBox;
modelBoundingBox = model.geometry.boundingBox;
console.log("model Bounding box");
console.log(modelBoundingBox);
renderer.render( scene, camera );
}
I'm currently working on calculating bounding boxes for 3D JSON models. At this moment, I'm only using a simple sphere as an example. However, when attempting to retrieve the bounding box, it returns null. How can I properly obtain the bounding box so that it accurately encompasses the entire model, even when loading more complex structures?