Sfoglia il codice sorgente

Merge pull request #14877 from takahirox/EnvMapSerialization

Add missing combine and envMapIntensity serialization
Mr.doob 7 anni fa
parent
commit
6f4ce37e09
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      src/materials/Material.js

+ 3 - 0
src/materials/Material.js

@@ -218,6 +218,9 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 			data.envMap = this.envMap.toJSON( meta ).uuid;
 			data.reflectivity = this.reflectivity; // Scale behind envMap
 
+			if ( this.combine !== undefined ) data.combine = this.combine;
+			if ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity;
+
 		}
 
 		if ( this.gradientMap && this.gradientMap.isTexture ) {