Pārlūkot izejas kodu

Material: Add missing map properties to `toJSON()`. (#31578)

Michael Herzog 5 mēneši atpakaļ
vecāks
revīzija
4aa10f4939
1 mainītis faili ar 12 papildinājumiem un 0 dzēšanām
  1. 12 0
      src/materials/Material.js

+ 12 - 0
src/materials/Material.js

@@ -664,6 +664,18 @@ class Material extends EventDispatcher {
 
 		}
 
+		if ( this.sheenColorMap && this.sheenColorMap.isTexture ) {
+
+			data.sheenColorMap = this.sheenColorMap.toJSON( meta ).uuid;
+
+		}
+
+		if ( this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture ) {
+
+			data.sheenRoughnessMap = this.sheenRoughnessMap.toJSON( meta ).uuid;
+
+		}
+
 		if ( this.dispersion !== undefined ) data.dispersion = this.dispersion;
 
 		if ( this.iridescence !== undefined ) data.iridescence = this.iridescence;

粤ICP备19079148号