浏览代码

Examples: Clean up

Mugen87 5 年之前
父节点
当前提交
abc2fed9ef

+ 1 - 2
examples/js/renderers/CSS2DRenderer.js

@@ -161,9 +161,8 @@ THREE.CSS2DRenderer = function () {
 	};
 
 	this.render = function ( scene, camera ) {
-		
-		if ( scene.autoUpdate === true ) { scene.updateMatrixWorld(); }
 
+		if ( scene.autoUpdate === true ) scene.updateMatrixWorld();
 		if ( camera.parent === null ) camera.updateMatrixWorld();
 
 		viewMatrix.copy( camera.matrixWorldInverse );

+ 1 - 2
examples/js/renderers/CSS3DRenderer.js

@@ -296,8 +296,7 @@ THREE.CSS3DRenderer = function () {
 
 		}
 
-		if ( scene.autoUpdate === true ) { scene.updateMatrixWorld(); }
-
+		if ( scene.autoUpdate === true ) scene.updateMatrixWorld();
 		if ( camera.parent === null ) camera.updateMatrixWorld();
 
 		if ( camera.isOrthographicCamera ) {

+ 1 - 2
examples/jsm/renderers/CSS2DRenderer.js

@@ -168,8 +168,7 @@ var CSS2DRenderer = function () {
 
 	this.render = function ( scene, camera ) {
 
-		scene.updateMatrixWorld();
-
+		if ( scene.autoUpdate === true ) scene.updateMatrixWorld();
 		if ( camera.parent === null ) camera.updateMatrixWorld();
 
 		viewMatrix.copy( camera.matrixWorldInverse );

+ 1 - 2
examples/jsm/renderers/CSS3DRenderer.js

@@ -302,8 +302,7 @@ var CSS3DRenderer = function () {
 
 		}
 
-		scene.updateMatrixWorld();
-
+		if ( scene.autoUpdate === true ) scene.updateMatrixWorld();
 		if ( camera.parent === null ) camera.updateMatrixWorld();
 
 		if ( camera.isOrthographicCamera ) {