Browse Source

Updated examples builds

Mr.doob 4 năm trước cách đây
mục cha
commit
42d48acd24

+ 2 - 2
examples/js/exporters/USDZExporter.js

@@ -396,7 +396,7 @@ ${array.join( '' )}
 
 		}
 
-		if ( material.roughnessMap !== null ) {
+		if ( material.roughnessMap !== null && material.roughness === 1 ) {
 
 			inputs.push( `${pad}float inputs:roughness.connect = </Materials/Material_${material.id}/Texture_${material.roughnessMap.id}_roughness.outputs:g>` );
 			samplers.push( buildTexture( material.roughnessMap, 'roughness' ) );
@@ -407,7 +407,7 @@ ${array.join( '' )}
 
 		}
 
-		if ( material.metalnessMap !== null ) {
+		if ( material.metalnessMap !== null && material.metalness === 1 ) {
 
 			inputs.push( `${pad}float inputs:metallic.connect = </Materials/Material_${material.id}/Texture_${material.metalnessMap.id}_metallic.outputs:b>` );
 			samplers.push( buildTexture( material.metalnessMap, 'metallic' ) );

+ 1 - 1
examples/js/loaders/HDRCubeTextureLoader.js

@@ -6,7 +6,7 @@
 
 			super( manager );
 			this.hdrLoader = new THREE.RGBELoader();
-			this.type = THREE.UnsignedByteType;
+			this.type = THREE.FloatType;
 
 		}
 

+ 1 - 1
examples/js/loaders/LDrawLoader.js

@@ -136,6 +136,7 @@
 				}
 			} );
 			this.setValues( parameters );
+			this.isLDrawConditionalLineMaterial = true;
 
 		}
 
@@ -900,7 +901,6 @@
 					material = new THREE.MeshStandardMaterial( {
 						color: colour,
 						roughness: 0.3,
-						envMapIntensity: 0.3,
 						metalness: 0
 					} );
 					break;

+ 1 - 1
examples/js/loaders/RGBELoader.js

@@ -7,7 +7,7 @@
 		constructor( manager ) {
 
 			super( manager );
-			this.type = THREE.UnsignedByteType;
+			this.type = THREE.FloatType;
 
 		} // adapted from http://www.graphics.cornell.edu/~bjw/rgbe.html