Browse Source

THREE.Object3D.DefaultMatrixAutoUpdate

For performance, I end up setting matrixAutoUpdate to false for the majority of objects and manually trigger the update as needed. It would be great if this could be set this way globally.
N Halloran 10 years ago
parent
commit
0a3109d474
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/core/Object3D.js

+ 2 - 1
src/core/Object3D.js

@@ -64,7 +64,7 @@ THREE.Object3D = function () {
 	this.matrix = new THREE.Matrix4();
 	this.matrixWorld = new THREE.Matrix4();
 
-	this.matrixAutoUpdate = true;
+	this.matrixAutoUpdate = THREE.Object3D.DefaultMatrixAutoUpdate;
 	this.matrixWorldNeedsUpdate = false;
 
 	this.visible = true;
@@ -80,6 +80,7 @@ THREE.Object3D = function () {
 };
 
 THREE.Object3D.DefaultUp = new THREE.Vector3( 0, 1, 0 );
+THREE.Object3D.DefaultMatrixAutoUpdate = true;
 
 THREE.Object3D.prototype = {