mirror of
https://github.com/wahyd4/three.js.git
synced 2026-08-09 04:56:01 +10:00
Brought back automatic centroid computation.
This commit is contained in:
@@ -56,8 +56,9 @@ THREE.JSONLoader.prototype.createModel = function ( json, callback, texture_path
|
||||
parseMorphing( scale );
|
||||
parseEdges();
|
||||
|
||||
geometry.computeCentroids();
|
||||
geometry.computeFaceNormals();
|
||||
// geometry.computeCentroids();
|
||||
|
||||
// geometry.computeEdgeFaces();
|
||||
|
||||
function parseModel( scale ) {
|
||||
|
||||
@@ -7,7 +7,7 @@ THREE.SceneLoader = function () {
|
||||
this.onLoadStart = function () {};
|
||||
this.onLoadProgress = function() {};
|
||||
this.onLoadComplete = function () {};
|
||||
|
||||
|
||||
this.callbackSync = function () {};
|
||||
this.callbackProgress = function () {};
|
||||
|
||||
@@ -60,24 +60,24 @@ THREE.SceneLoader.prototype = {
|
||||
};
|
||||
|
||||
// find out if there are some colliders
|
||||
|
||||
|
||||
var hasColliders = false;
|
||||
|
||||
|
||||
for( dd in data.objects ) {
|
||||
|
||||
|
||||
o = data.objects[ dd ];
|
||||
|
||||
if ( o.meshCollider ) {
|
||||
|
||||
|
||||
hasColliders = true;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ( hasColliders ) {
|
||||
|
||||
|
||||
result.scene.collisions = new THREE.CollisionSystem();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user