Browse Source

Fixed MD2 example shadows.

Mr.doob 9 years ago
parent
commit
9b2017e41b
1 changed files with 11 additions and 11 deletions
  1. 11 11
      examples/webgl_loader_md2.html

+ 11 - 11
examples/webgl_loader_md2.html

@@ -95,26 +95,26 @@
 
 				scene.add( new THREE.AmbientLight( 0x222222 ) );
 
-				var light = new THREE.SpotLight( 0xffffff, 10, 1000 );
+				var light = new THREE.SpotLight( 0xffffff, 5, 1000 );
 				light.position.set( 200, 250, 500 );
 
 				light.castShadow = true;
-				light.shadowMapWidth = 1024;
-				light.shadowMapHeight = 1024;
-				light.shadowMapDarkness = 0.95;
-				//light.shadowCameraVisible = true;
+				light.shadow.mapSize.width = 1024;
+				light.shadow.mapSize.height = 1024;
+				light.shadow.camera.far = 2000;
 
+				// scene.add( new THREE.CameraHelper( light.shadow.camera ) );
 				scene.add( light );
 
-				var light = new THREE.SpotLight( 0xffffff, 5, 500 );
-				light.position.set( -100, 350, 250 );
+				var light = new THREE.SpotLight( 0xffffff, 5, 1000 );
+				light.position.set( -100, 350, 350 );
 
 				light.castShadow = true;
-				light.shadowMapWidth = 1024;
-				light.shadowMapHeight = 1024;
-				light.shadowMapDarkness = 0.95;
-				//light.shadowCameraVisible = true;
+				light.shadow.mapSize.width = 1024;
+				light.shadow.mapSize.height = 1024;
+				light.shadow.camera.far = 1000;
 
+				// scene.add( new THREE.CameraHelper( light.shadow.camera ) );
 				scene.add( light );
 
 				//  GROUND