ソースを参照

Clean up Material.toJSON()

Takahiro 7 年 前
コミット
39268c7dd5
1 ファイル変更3 行追加0 行削除
  1. 3 0
      src/materials/Material.js

+ 3 - 0
src/materials/Material.js

@@ -190,12 +190,14 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 			data.bumpScale = this.bumpScale;
 
 		}
+
 		if ( this.normalMap && this.normalMap.isTexture ) {
 
 			data.normalMap = this.normalMap.toJSON( meta ).uuid;
 			data.normalScale = this.normalScale.toArray();
 
 		}
+
 		if ( this.displacementMap && this.displacementMap.isTexture ) {
 
 			data.displacementMap = this.displacementMap.toJSON( meta ).uuid;
@@ -203,6 +205,7 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 			data.displacementBias = this.displacementBias;
 
 		}
+
 		if ( this.roughnessMap && this.roughnessMap.isTexture ) data.roughnessMap = this.roughnessMap.toJSON( meta ).uuid;
 		if ( this.metalnessMap && this.metalnessMap.isTexture ) data.metalnessMap = this.metalnessMap.toJSON( meta ).uuid;