Browse Source

Merge pull request #21166 from Mugen87/dev51

Material: Honor lightMapIntensity in toJSON().
Mr.doob 4 years ago
parent
commit
9394c704d1
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/materials/Material.js

+ 7 - 1
src/materials/Material.js

@@ -200,7 +200,13 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 		if ( this.map && this.map.isTexture ) data.map = this.map.toJSON( meta ).uuid;
 		if ( this.map && this.map.isTexture ) data.map = this.map.toJSON( meta ).uuid;
 		if ( this.matcap && this.matcap.isTexture ) data.matcap = this.matcap.toJSON( meta ).uuid;
 		if ( this.matcap && this.matcap.isTexture ) data.matcap = this.matcap.toJSON( meta ).uuid;
 		if ( this.alphaMap && this.alphaMap.isTexture ) data.alphaMap = this.alphaMap.toJSON( meta ).uuid;
 		if ( this.alphaMap && this.alphaMap.isTexture ) data.alphaMap = this.alphaMap.toJSON( meta ).uuid;
-		if ( this.lightMap && this.lightMap.isTexture ) data.lightMap = this.lightMap.toJSON( meta ).uuid;
+
+		if ( this.lightMap && this.lightMap.isTexture ) {
+
+			data.lightMap = this.lightMap.toJSON( meta ).uuid;
+			data.lightMapIntensity = this.lightMapIntensity;
+
+		}
 
 
 		if ( this.aoMap && this.aoMap.isTexture ) {
 		if ( this.aoMap && this.aoMap.isTexture ) {