Browse Source

Examples: Clean up.

Mr.doob 6 years ago
parent
commit
cade4234cb
2 changed files with 7 additions and 6 deletions
  1. 7 3
      examples/webgl_furnace_test.html
  2. 0 3
      examples/webgl_loader_stl.html

+ 7 - 3
examples/webgl_furnace_test.html

@@ -60,18 +60,22 @@
 
 			function createObjects() {
 
-				var geo = new THREE.SphereBufferGeometry( 0.4, 32, 32 );
+				var geometry = new THREE.SphereBufferGeometry( 0.4, 32, 32 );
+
 				var count = 10;
+
 				for ( var x = 0; x <= count; x ++ ) {
 
-					var mesh = new THREE.Mesh( geo, new THREE.MeshPhysicalMaterial( {
+					var material = new THREE.MeshPhysicalMaterial( {
 						roughness: x / count,
 						metalness: 1,
 						color: 0xffffff,
 						envMap: radianceMap,
 						envMapIntensity: 1,
 						reflectivity: 1,
-					} ) );
+					} );
+
+					var mesh = new THREE.Mesh( geometry, material );
 					mesh.position.x = x - ( Math.floor( count / 2 ) );
 					scene.add( mesh );
 

+ 0 - 3
examples/webgl_loader_stl.html

@@ -181,9 +181,6 @@
 				directionalLight.shadow.camera.near = 1;
 				directionalLight.shadow.camera.far = 4;
 
-				directionalLight.shadow.mapSize.width = 1024;
-				directionalLight.shadow.mapSize.height = 1024;
-
 				directionalLight.shadow.bias = - 0.002;
 
 			}