Skip to content

Commit 11461f0

Browse files
committed
Brought back automatic centroid computation.
1 parent 95bb462 commit 11461f0

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/extras/io/JSONLoader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ THREE.JSONLoader.prototype.createModel = function ( json, callback, texture_path
5656
parseMorphing( scale );
5757
parseEdges();
5858

59+
geometry.computeCentroids();
5960
geometry.computeFaceNormals();
60-
// geometry.computeCentroids();
61+
6162
// geometry.computeEdgeFaces();
6263

6364
function parseModel( scale ) {

src/extras/io/SceneLoader.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ THREE.SceneLoader = function () {
77
this.onLoadStart = function () {};
88
this.onLoadProgress = function() {};
99
this.onLoadComplete = function () {};
10-
10+
1111
this.callbackSync = function () {};
1212
this.callbackProgress = function () {};
1313

@@ -60,24 +60,24 @@ THREE.SceneLoader.prototype = {
6060
};
6161

6262
// find out if there are some colliders
63-
63+
6464
var hasColliders = false;
65-
65+
6666
for( dd in data.objects ) {
67-
67+
6868
o = data.objects[ dd ];
6969

7070
if ( o.meshCollider ) {
71-
71+
7272
hasColliders = true;
7373
break;
7474

7575
}
76-
76+
7777
}
78-
78+
7979
if ( hasColliders ) {
80-
80+
8181
result.scene.collisions = new THREE.CollisionSystem();
8282

8383
}

0 commit comments

Comments
 (0)