Procházet zdrojové kódy

Material: Less aggressive roughness/metalness toJSON.

Mr.doob před 10 roky
rodič
revize
eeb750fb45
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      src/materials/Material.js

+ 2 - 2
src/materials/Material.js

@@ -149,8 +149,8 @@ THREE.Material.prototype = {
 
 		if ( this.color instanceof THREE.Color ) data.color = this.color.getHex();
 
-		if ( this.roughness !== 0.5 ) data.roughness = this.roughness;
-		if ( this.metalness !== 0.5 ) data.metalness = this.metalness;
+		if ( this.roughness !== undefined ) data.roughness = this.roughness;
+		if ( this.metalness !== undefined ) data.metalness = this.metalness;
 
 		if ( this.emissive instanceof THREE.Color ) data.emissive = this.emissive.getHex();
 		if ( this.specular instanceof THREE.Color ) data.specular = this.specular.getHex();

粤ICP备19079148号