Kaynağa Gözat

ShadowMapViewer: Fix usage of UniformsUtils.

Mugen87 6 yıl önce
ebeveyn
işleme
cad36ccb66
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      examples/js/utils/ShadowMapViewer.js

+ 3 - 2
examples/js/utils/ShadowMapViewer.js

@@ -49,7 +49,7 @@ THREE.ShadowMapViewer = function ( light ) {
 	//HUD for shadow map
 	//HUD for shadow map
 	var shader = THREE.UnpackDepthRGBAShader;
 	var shader = THREE.UnpackDepthRGBAShader;
 
 
-	var uniforms = new THREE.UniformsUtils.clone( shader.uniforms );
+	var uniforms = THREE.UniformsUtils.clone( shader.uniforms );
 	var material = new THREE.ShaderMaterial( {
 	var material = new THREE.ShaderMaterial( {
 		uniforms: uniforms,
 		uniforms: uniforms,
 		vertexShader: shader.vertexShader,
 		vertexShader: shader.vertexShader,
@@ -95,7 +95,7 @@ THREE.ShadowMapViewer = function ( light ) {
 	}
 	}
 
 
 
 
-	function resetPosition () {
+	function resetPosition() {
 
 
 		scope.position.set( scope.position.x, scope.position.y );
 		scope.position.set( scope.position.x, scope.position.y );
 
 
@@ -173,6 +173,7 @@ THREE.ShadowMapViewer = function ( light ) {
 			 camera.updateProjectionMatrix();
 			 camera.updateProjectionMatrix();
 
 
 			 this.update();
 			 this.update();
+
 		}
 		}
 
 
 	};
 	};