浏览代码

Make CSS2DRenderer respect scene.autoUpdate

donutcoffee 5 年之前
父节点
当前提交
63ef42cd4d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      examples/js/renderers/CSS2DRenderer.js

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

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