va3c / viewer

3D Model Viewer with Three.js
http://va3c.github.io/viewer/
184 stars 115 forks source link

Collada loader #8

Open ecoeficiente opened 9 years ago

ecoeficiente commented 9 years ago

Working with your ColladaLoader from the Cookbook I have found that the method for getting the BoundingSphere does not work right and therefore camera position and displayed bounding sphere are not correct. I have solved it getting the bounding sphere in sommExtents method with this code: var bSphere = new THREE.Box3().setFromObject(scene.children[2].children[0]).getBoundingSphere(); which seems to work ok at least with a couple of models from Sketchup.

Regards.