@onerjs/loaders 8.27.12 → 8.27.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,25 +43,21 @@ export class KHR_materials_iridescence {
43
43
  const adapter = this._loader._getOrCreateMaterialAdapter(babylonMaterial);
44
44
  const promises = new Array();
45
45
  // Set non-texture properties immediately
46
- const iridescenceWeight = properties.iridescenceFactor ?? 0;
47
- const iridescenceIor = properties.iridescenceIor ?? properties.iridescenceIOR ?? 1.3;
48
- const iridescenceThicknessMinimum = properties.iridescenceThicknessMinimum ?? 100;
49
- const iridescenceThicknessMaximum = properties.iridescenceThicknessMaximum ?? 400;
50
- adapter.iridescenceWeight = iridescenceWeight;
51
- adapter.iridescenceIor = iridescenceIor;
52
- adapter.iridescenceThicknessMinimum = iridescenceThicknessMinimum;
53
- adapter.iridescenceThicknessMaximum = iridescenceThicknessMaximum;
46
+ adapter.thinFilmWeight = properties.iridescenceFactor ?? 0;
47
+ adapter.thinFilmIor = properties.iridescenceIor ?? properties.iridescenceIOR ?? 1.3;
48
+ adapter.thinFilmThicknessMinimum = properties.iridescenceThicknessMinimum ?? 100;
49
+ adapter.thinFilmThicknessMaximum = properties.iridescenceThicknessMaximum ?? 400;
54
50
  // Load textures
55
51
  if (properties.iridescenceTexture) {
56
52
  promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceTexture`, properties.iridescenceTexture, (texture) => {
57
53
  texture.name = `${babylonMaterial.name} (Iridescence)`;
58
- adapter.iridescenceTexture = texture;
54
+ adapter.thinFilmWeightTexture = texture;
59
55
  }));
60
56
  }
61
57
  if (properties.iridescenceThicknessTexture) {
62
58
  promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceThicknessTexture`, properties.iridescenceThicknessTexture, (texture) => {
63
59
  texture.name = `${babylonMaterial.name} (Iridescence Thickness)`;
64
- adapter.iridescenceThicknessTexture = texture;
60
+ adapter.thinFilmThicknessTexture = texture;
65
61
  }));
66
62
  }
67
63
  // eslint-disable-next-line github/no-then
@@ -1 +1 @@
1
- {"version":3,"file":"KHR_materials_iridescence.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_materials_iridescence.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,MAAM,IAAI,GAAG,2BAA2B,CAAC;AAazC;;GAEG;AACH,gEAAgE;AAChE,MAAM,OAAO,yBAAyB;IAkBlC;;OAEG;IACH,YAAY,MAAkB;QApB9B;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAO5B;;WAEG;QACI,UAAK,GAAG,GAAG,CAAC;QAQf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAED,gBAAgB;IACT,OAAO;QACT,IAAI,CAAC,OAAe,GAAG,IAAI,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,gDAAgD;IACzC,2BAA2B,CAAC,OAAe,EAAE,QAAmB,EAAE,eAAyB;QAC9F,OAAO,UAAU,CAAC,kBAAkB,CAA2B,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE;YAC/H,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAgB,CAAC;YAC3C,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;YAC5F,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,gBAAgB,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC;YAClG,0CAA0C;YAC1C,OAAO,MAAM,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AAI,CACT,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,8BAA8B,EAAE,UAAU,CAAC,2BAA2B,EAAE,CAAC,OAAO,EAAE,EAAE;gBAC5H,OAAO,CAAC,IAAI,GAAG,GAAG,eAAe,CAAC,IAAI,0BAA0B,CAAC;gBACjE,OAAO,CAAC,2BAA2B,GAAG,OAAO,CAAC;YAClD,CAAC,CAAC,CACL,CAAC;QACN,CAAC;QAED,0CAA0C;QAC1C,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAChD,CAAC;CACJ;AAED,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { IMaterial } from \"../glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader } from \"../glTFLoader\";\r\nimport type { IKHRMaterialsIridescence } from \"babylonjs-gltf2interface\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"KHR_materials_iridescence\";\r\n\r\ndeclare module \"../../glTFFileLoader\" {\r\n // eslint-disable-next-line jsdoc/require-jsdoc, @typescript-eslint/naming-convention\r\n export interface GLTFLoaderExtensionOptions {\r\n /**\r\n * Defines options for the KHR_materials_iridescence extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"KHR_materials_iridescence\"]: {};\r\n }\r\n}\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_iridescence/README.md)\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class KHR_materials_iridescence implements IGLTFLoaderExtension {\r\n /**\r\n * The name of this extension.\r\n */\r\n public readonly name = NAME;\r\n\r\n /**\r\n * Defines whether this extension is enabled.\r\n */\r\n public enabled: boolean;\r\n\r\n /**\r\n * Defines a number that determines the order the extensions are applied.\r\n */\r\n public order = 195;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n this.enabled = this._loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {\r\n return GLTFLoader.LoadExtensionAsync<IKHRMaterialsIridescence>(context, material, this.name, async (extensionContext, extension) => {\r\n const promises = new Array<Promise<any>>();\r\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\r\n promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\r\n // eslint-disable-next-line github/no-then\r\n return await Promise.all(promises).then(() => {});\r\n });\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n private _loadIridescencePropertiesAsync(context: string, properties: IKHRMaterialsIridescence, babylonMaterial: Material): Promise<void> {\r\n const adapter = this._loader._getOrCreateMaterialAdapter(babylonMaterial);\r\n const promises = new Array<Promise<any>>();\r\n\r\n // Set non-texture properties immediately\r\n const iridescenceWeight = properties.iridescenceFactor ?? 0;\r\n const iridescenceIor = properties.iridescenceIor ?? (properties as any).iridescenceIOR ?? 1.3;\r\n const iridescenceThicknessMinimum = properties.iridescenceThicknessMinimum ?? 100;\r\n const iridescenceThicknessMaximum = properties.iridescenceThicknessMaximum ?? 400;\r\n\r\n adapter.iridescenceWeight = iridescenceWeight;\r\n adapter.iridescenceIor = iridescenceIor;\r\n adapter.iridescenceThicknessMinimum = iridescenceThicknessMinimum;\r\n adapter.iridescenceThicknessMaximum = iridescenceThicknessMaximum;\r\n\r\n // Load textures\r\n if (properties.iridescenceTexture) {\r\n promises.push(\r\n this._loader.loadTextureInfoAsync(`${context}/iridescenceTexture`, properties.iridescenceTexture, (texture) => {\r\n texture.name = `${babylonMaterial.name} (Iridescence)`;\r\n adapter.iridescenceTexture = texture;\r\n })\r\n );\r\n }\r\n\r\n if (properties.iridescenceThicknessTexture) {\r\n promises.push(\r\n this._loader.loadTextureInfoAsync(`${context}/iridescenceThicknessTexture`, properties.iridescenceThicknessTexture, (texture) => {\r\n texture.name = `${babylonMaterial.name} (Iridescence Thickness)`;\r\n adapter.iridescenceThicknessTexture = texture;\r\n })\r\n );\r\n }\r\n\r\n // eslint-disable-next-line github/no-then\r\n return Promise.all(promises).then(() => {});\r\n }\r\n}\r\n\r\nunregisterGLTFExtension(NAME);\r\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_iridescence(loader));\r\n"]}
1
+ {"version":3,"file":"KHR_materials_iridescence.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/KHR_materials_iridescence.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,MAAM,IAAI,GAAG,2BAA2B,CAAC;AAazC;;GAEG;AACH,gEAAgE;AAChE,MAAM,OAAO,yBAAyB;IAkBlC;;OAEG;IACH,YAAY,MAAkB;QApB9B;;WAEG;QACa,SAAI,GAAG,IAAI,CAAC;QAO5B;;WAEG;QACI,UAAK,GAAG,GAAG,CAAC;QAQf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,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AU,CAAC,2BAA2B,IAAI,GAAG,CAAC;QAEjF,gBAAgB;QAChB,IAAI,UAAU,CAAC,kBAAkB,EAAE,CAAC;YAChC,QAAQ,CAAC,IAAI,CACT,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,qBAAqB,EAAE,UAAU,CAAC,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;gBAC1G,OAAO,CAAC,IAAI,GAAG,GAAG,eAAe,CAAC,IAAI,gBAAgB,CAAC;gBACvD,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC;YAC5C,CAAC,CAAC,CACL,CAAC;QACN,CAAC;QAED,IAAI,UAAU,CAAC,2BAA2B,EAAE,CAAC;YACzC,QAAQ,CAAC,IAAI,CACT,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,8BAA8B,EAAE,UAAU,CAAC,2BAA2B,EAAE,CAAC,OAAO,EAAE,EAAE;gBAC5H,OAAO,CAAC,IAAI,GAAG,GAAG,eAAe,CAAC,IAAI,0BAA0B,CAAC;gBACjE,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC;YAC/C,CAAC,CAAC,CACL,CAAC;QACN,CAAC;QAED,0CAA0C;QAC1C,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAChD,CAAC;CACJ;AAED,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { IMaterial } from \"../glTFLoaderInterfaces\";\r\nimport type { IGLTFLoaderExtension } from \"../glTFLoaderExtension\";\r\nimport { GLTFLoader } from \"../glTFLoader\";\r\nimport type { IKHRMaterialsIridescence } from \"babylonjs-gltf2interface\";\r\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\r\n\r\nconst NAME = \"KHR_materials_iridescence\";\r\n\r\ndeclare module \"../../glTFFileLoader\" {\r\n // eslint-disable-next-line jsdoc/require-jsdoc, @typescript-eslint/naming-convention\r\n export interface GLTFLoaderExtensionOptions {\r\n /**\r\n * Defines options for the KHR_materials_iridescence extension.\r\n */\r\n // NOTE: Don't use NAME here as it will break the UMD type declarations.\r\n [\"KHR_materials_iridescence\"]: {};\r\n }\r\n}\r\n\r\n/**\r\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_iridescence/README.md)\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport class KHR_materials_iridescence implements IGLTFLoaderExtension {\r\n /**\r\n * The name of this extension.\r\n */\r\n public readonly name = NAME;\r\n\r\n /**\r\n * Defines whether this extension is enabled.\r\n */\r\n public enabled: boolean;\r\n\r\n /**\r\n * Defines a number that determines the order the extensions are applied.\r\n */\r\n public order = 195;\r\n\r\n private _loader: GLTFLoader;\r\n\r\n /**\r\n * @internal\r\n */\r\n constructor(loader: GLTFLoader) {\r\n this._loader = loader;\r\n this.enabled = this._loader.isExtensionUsed(NAME);\r\n }\r\n\r\n /** @internal */\r\n public dispose() {\r\n (this._loader as any) = null;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n // eslint-disable-next-line no-restricted-syntax\r\n public loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>> {\r\n return GLTFLoader.LoadExtensionAsync<IKHRMaterialsIridescence>(context, material, this.name, async (extensionContext, extension) => {\r\n const promises = new Array<Promise<any>>();\r\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\r\n promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\r\n // eslint-disable-next-line github/no-then\r\n return await Promise.all(promises).then(() => {});\r\n });\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/promise-function-async, no-restricted-syntax\r\n private _loadIridescencePropertiesAsync(context: string, properties: IKHRMaterialsIridescence, babylonMaterial: Material): Promise<void> {\r\n const adapter = this._loader._getOrCreateMaterialAdapter(babylonMaterial);\r\n const promises = new Array<Promise<any>>();\r\n\r\n // Set non-texture properties immediately\r\n adapter.thinFilmWeight = properties.iridescenceFactor ?? 0;\r\n adapter.thinFilmIor = properties.iridescenceIor ?? (properties as any).iridescenceIOR ?? 1.3;\r\n adapter.thinFilmThicknessMinimum = properties.iridescenceThicknessMinimum ?? 100;\r\n adapter.thinFilmThicknessMaximum = properties.iridescenceThicknessMaximum ?? 400;\r\n\r\n // Load textures\r\n if (properties.iridescenceTexture) {\r\n promises.push(\r\n this._loader.loadTextureInfoAsync(`${context}/iridescenceTexture`, properties.iridescenceTexture, (texture) => {\r\n texture.name = `${babylonMaterial.name} (Iridescence)`;\r\n adapter.thinFilmWeightTexture = texture;\r\n })\r\n );\r\n }\r\n\r\n if (properties.iridescenceThicknessTexture) {\r\n promises.push(\r\n this._loader.loadTextureInfoAsync(`${context}/iridescenceThicknessTexture`, properties.iridescenceThicknessTexture, (texture) => {\r\n texture.name = `${babylonMaterial.name} (Iridescence Thickness)`;\r\n adapter.thinFilmThicknessTexture = texture;\r\n })\r\n );\r\n }\r\n\r\n // eslint-disable-next-line github/no-then\r\n return Promise.all(promises).then(() => {});\r\n }\r\n}\r\n\r\nunregisterGLTFExtension(NAME);\r\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_iridescence(loader));\r\n"]}
@@ -266,29 +266,29 @@ export interface IMaterialLoadingAdapter {
266
266
  */
267
267
  configureGltfStyleAnisotropy(useGltfStyle?: boolean): void;
268
268
  /**
269
- * Sets the iridescence weight (OpenPBR: iridescenceWeight, PBR: iridescence.intensity)
269
+ * Sets the thin film weight
270
270
  */
271
- iridescenceWeight: number;
271
+ thinFilmWeight: number;
272
272
  /**
273
- * Sets the iridescence IOR (OpenPBR: iridescenceIor, PBR: iridescence.indexOfRefraction)
273
+ * Sets the thin film IOR
274
274
  */
275
- iridescenceIor: number;
275
+ thinFilmIor: number;
276
276
  /**
277
- * Sets the iridescence thickness minimum (OpenPBR: iridescenceThicknessMinimum, PBR: iridescence.minimumThickness)
277
+ * Sets the thin film thickness minimum
278
278
  */
279
- iridescenceThicknessMinimum: number;
279
+ thinFilmThicknessMinimum: number;
280
280
  /**
281
- * Sets the iridescence thickness maximum (OpenPBR: iridescenceThicknessMaximum, PBR: iridescence.maximumThickness)
281
+ * Sets the thin film thickness maximum
282
282
  */
283
- iridescenceThicknessMaximum: number;
283
+ thinFilmThicknessMaximum: number;
284
284
  /**
285
- * Sets the iridescence texture (OpenPBR: iridescenceTexture, PBR: iridescence.intensityTexture)
285
+ * Sets the thin film iridescence texture
286
286
  */
287
- iridescenceTexture: Nullable<BaseTexture>;
287
+ thinFilmWeightTexture: Nullable<BaseTexture>;
288
288
  /**
289
- * Sets the iridescence thickness texture (OpenPBR: iridescenceThicknessTexture, PBR: iridescence.thicknessTexture)
289
+ * Sets the thin film thickness texture
290
290
  */
291
- iridescenceThicknessTexture: Nullable<BaseTexture>;
291
+ thinFilmThicknessTexture: Nullable<BaseTexture>;
292
292
  /**
293
293
  * Sets the unlit flag (OpenPBR: unlit, PBR: unlit)
294
294
  */
@@ -1 +1 @@
1
- {"version":3,"file":"materialLoadingAdapter.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/materialLoadingAdapter.ts"],"names":[],"mappings":"","sourcesContent":["import type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { Color3 } from \"core/Maths/math.color\";\r\n\r\n/**\r\n * Interface for material loading adapters that provides a unified OpenPBR-like interface\r\n * for both OpenPBR and PBR materials, eliminating conditional branches in extensions.\r\n */\r\nexport interface IMaterialLoadingAdapter {\r\n /**\r\n * Gets the underlying material\r\n */\r\n readonly material: Material;\r\n\r\n /**\r\n * Whether the material should be treated as unlit\r\n */\r\n isUnlit: boolean;\r\n\r\n // ========================================\r\n // CULLING PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the back face culling\r\n */\r\n backFaceCulling: boolean;\r\n\r\n /**\r\n * Sets/gets the two sided lighting\r\n */\r\n twoSidedLighting: boolean;\r\n\r\n // ========================================\r\n // ALPHA PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the alpha cutoff value (used for alpha test mode)\r\n */\r\n alphaCutOff: number;\r\n\r\n /**\r\n * Sets/gets whether to use alpha from albedo/base color texture\r\n */\r\n useAlphaFromBaseColorTexture: boolean;\r\n\r\n /**\r\n * Sets/Gets whether the transparency is treated as alpha coverage\r\n */\r\n transparencyAsAlphaCoverage: boolean;\r\n\r\n // ========================================\r\n // BASE PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the base color (OpenPBR: baseColor, PBR: albedoColor)\r\n */\r\n baseColor: Color3;\r\n\r\n /**\r\n * Sets/gets the base color texture (OpenPBR: baseColorTexture, PBR: albedoTexture)\r\n */\r\n baseColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the base diffuse roughness (OpenPBR: baseDiffuseRoughness, PBR: baseDiffuseRoughness)\r\n */\r\n baseDiffuseRoughness: number;\r\n\r\n /**\r\n * Sets/gets the base diffuse roughness texture (OpenPBR: baseDiffuseRoughnessTexture, PBR: baseDiffuseRoughnessTexture)\r\n */\r\n baseDiffuseRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the base metalness (OpenPBR: baseMetalness, PBR: metallic)\r\n */\r\n baseMetalness: number;\r\n\r\n /**\r\n * Sets/gets the base metalness texture (OpenPBR: baseMetalnessTexture, PBR: metallicTexture)\r\n */\r\n baseMetalnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets whether to use roughness from metallic texture green channel\r\n */\r\n useRoughnessFromMetallicTextureGreen: boolean;\r\n\r\n /**\r\n * Sets whether to use metallic from metallic texture blue channel\r\n */\r\n useMetallicFromMetallicTextureBlue: boolean;\r\n\r\n // ========================================\r\n // SPECULAR PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures specular properties and enables OpenPBR BRDF model for edge color support\r\n * @param enableEdgeColor - Whether to enable edge color support\r\n */\r\n enableSpecularEdgeColor(enableEdgeColor?: boolean): void;\r\n\r\n /**\r\n * Sets/gets the specular weight (OpenPBR: specularWeight, PBR: metallicF0Factor)\r\n */\r\n specularWeight: number;\r\n\r\n /**\r\n * Sets/gets the specular weight texture (OpenPBR: specularWeightTexture, PBR: metallicReflectanceTexture)\r\n */\r\n specularWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the specular color (OpenPBR: specularColor, PBR: reflectance)\r\n */\r\n specularColor: Color3;\r\n\r\n /**\r\n * Sets/gets the specular color texture (OpenPBR: specularColorTexture, PBR: reflectanceTexture)\r\n */\r\n specularColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the specular roughness (OpenPBR: specularRoughness, PBR: roughness)\r\n */\r\n specularRoughness: number;\r\n\r\n /**\r\n * Sets/gets the specular roughness texture\r\n */\r\n specularRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the specular IOR (OpenPBR: specularIor, PBR: indexOfRefraction)\r\n */\r\n specularIor: number;\r\n\r\n // ========================================\r\n // EMISSION PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the emissive color (OpenPBR: emissionColor, PBR: emissiveColor)\r\n */\r\n emissionColor: Color3;\r\n\r\n /**\r\n * Sets/gets the emissive luminance (OpenPBR: emissionLuminance, PBR: emissiveIntensity)\r\n */\r\n emissionLuminance: number;\r\n\r\n /**\r\n * Sets/gets the emissive texture\r\n */\r\n emissionColorTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // AMBIENT OCCLUSION\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the ambient occlusion texture (OpenPBR: ambientOcclusionTexture, PBR: ambientTexture)\r\n */\r\n ambientOcclusionTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the ambient occlusion texture strength/level\r\n */\r\n ambientOcclusionTextureStrength: number;\r\n\r\n // ========================================\r\n // COAT PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures clear coat for PBR material\r\n */\r\n configureCoat(): void;\r\n\r\n /**\r\n * Sets/gets the coat weight (OpenPBR: coatWeight, PBR: clearCoat.intensity)\r\n */\r\n coatWeight: number;\r\n\r\n /**\r\n * Sets/gets the coat weight texture (OpenPBR: coatWeightTexture, PBR: clearCoat.texture)\r\n */\r\n coatWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the coat color (OpenPBR: coatColor, no PBR equivalent)\r\n */\r\n coatColor: Color3;\r\n\r\n /**\r\n * Sets the coat color texture (OpenPBR: coatColorTexture, no PBR equivalent)\r\n */\r\n coatColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the coat roughness (OpenPBR: coatRoughness, PBR: clearCoat.roughness)\r\n */\r\n coatRoughness: number;\r\n\r\n /**\r\n * Sets/gets the coat roughness texture (OpenPBR: coatRoughnessTexture, PBR: clearCoat.textureRoughness)\r\n */\r\n coatRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the coat index of refraction (IOR)\r\n */\r\n coatIor: number;\r\n\r\n /**\r\n * Sets the coat darkening (OpenPBR: coatDarkening, no PBR equivalent)\r\n */\r\n coatDarkening: number;\r\n\r\n /**\r\n * Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)\r\n */\r\n coatDarkeningTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the coat roughness anisotropy (OpenPBR: coatRoughnessAnisotropy, PBR: clearCoat.anisotropy.intensity)\r\n */\r\n coatRoughnessAnisotropy: number;\r\n\r\n /**\r\n * Sets the coat tangent angle for anisotropy (OpenPBR: geometryCoatTangentAngle, PBR: clearCoat.anisotropy.angle)\r\n */\r\n geometryCoatTangentAngle: number;\r\n\r\n /**\r\n * Sets the coat tangent texture for anisotropy (OpenPBR: geometryCoatTangentTexture, PBR: clearCoat.anisotropy.texture)\r\n */\r\n geometryCoatTangentTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // TRANSMISSION LAYER\r\n // ========================================\r\n\r\n /**\r\n * Sets the transmission weight (OpenPBR: transmissionWeight, PBR: subSurface.refractionIntensity)\r\n */\r\n transmissionWeight: number;\r\n\r\n /**\r\n * Sets the transmission weight texture (OpenPBR: transmissionWeightTexture, PBR: subSurface.refractionIntensityTexture)\r\n */\r\n transmissionWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the attenuation distance (OpenPBR: attenuationDistance, PBR: subSurface.volumeIndexOfRefraction)\r\n */\r\n transmissionDepth: number;\r\n\r\n /**\r\n * Sets the attenuation color (OpenPBR: attenuationColor, PBR: subSurface.tintColor)\r\n */\r\n transmissionColor: Color3;\r\n\r\n /**\r\n * Sets the dispersion Abbe number\r\n */\r\n transmissionDispersionAbbeNumber: number;\r\n\r\n /**\r\n * Configures transmission for thin-surface transmission (KHR_materials_transmission)\r\n */\r\n configureTransmission(): void;\r\n\r\n // ========================================\r\n // VOLUME PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets the thickness texture (OpenPBR: thicknessTexture, PBR: subSurface.thicknessTexture)\r\n */\r\n volumeThicknessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the thickness factor (OpenPBR: thickness, PBR: subSurface.maximumThickness)\r\n */\r\n volumeThickness: number;\r\n\r\n // ========================================\r\n // SUBSURFACE PROPERTIES (Subsurface Scattering)\r\n // ========================================\r\n\r\n /**\r\n * Configures subsurface properties for PBR material\r\n */\r\n configureSubsurface(): void;\r\n\r\n /**\r\n * Sets/gets the subsurface weight\r\n */\r\n subsurfaceWeight: number;\r\n\r\n /**\r\n * Sets/gets the subsurface weight texture\r\n */\r\n subsurfaceWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the subsurface color (OpenPBR: subsurfaceColor, PBR: subSurface.tintColor)\r\n */\r\n subsurfaceColor: Color3;\r\n\r\n /**\r\n * Sets/gets the subsurface color texture (OpenPBR: subsurfaceColorTexture, PBR: subSurface.tintColorTexture)\r\n */\r\n subsurfaceColorTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // FUZZ LAYER (Sheen)\r\n // ========================================\r\n\r\n /**\r\n * Configures initial settings for fuzz for material.\r\n */\r\n configureFuzz(): void;\r\n\r\n /**\r\n * Sets the fuzz weight (OpenPBR: fuzzWeight, PBR: fuzz.intensity)\r\n */\r\n fuzzWeight: number;\r\n\r\n /**\r\n * Sets the fuzz color (OpenPBR: fuzzColor, PBR: fuzz.color)\r\n */\r\n fuzzColor: Color3;\r\n\r\n /**\r\n * Sets the fuzz color texture (OpenPBR: fuzzColorTexture, PBR: fuzz.texture)\r\n */\r\n fuzzColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the fuzz roughness (OpenPBR: fuzzRoughness, PBR: fuzz.roughness)\r\n */\r\n fuzzRoughness: number;\r\n\r\n /**\r\n * Sets the fuzz roughness texture (OpenPBR: fuzzRoughnessTexture, PBR: fuzz.textureRoughness)\r\n */\r\n fuzzRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // ANISOTROPY\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the specular roughness anisotropy (OpenPBR: specularRoughnessAnisotropy, PBR: anisotropy.intensity)\r\n */\r\n specularRoughnessAnisotropy: number;\r\n\r\n /**\r\n * Sets the anisotropy rotation (OpenPBR: anisotropyRotation, PBR: anisotropy.angle)\r\n */\r\n geometryTangentAngle: number;\r\n\r\n /**\r\n * Sets/gets the anisotropy texture (OpenPBR: geometryTangentTexture, PBR: anisotropy.texture)\r\n */\r\n geometryTangentTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Configures glTF-style anisotropy for OpenPBR materials\r\n * @param useGltfStyle - Whether to use glTF-style anisotropy (default: true)\r\n */\r\n configureGltfStyleAnisotropy(useGltfStyle?: boolean): void;\r\n\r\n // ========================================\r\n // THIN FILM IRIDESCENCE\r\n // ========================================\r\n\r\n /**\r\n * Sets the iridescence weight (OpenPBR: iridescenceWeight, PBR: iridescence.intensity)\r\n */\r\n iridescenceWeight: number;\r\n\r\n /**\r\n * Sets the iridescence IOR (OpenPBR: iridescenceIor, PBR: iridescence.indexOfRefraction)\r\n */\r\n iridescenceIor: number;\r\n\r\n /**\r\n * Sets the iridescence thickness minimum (OpenPBR: iridescenceThicknessMinimum, PBR: iridescence.minimumThickness)\r\n */\r\n iridescenceThicknessMinimum: number;\r\n\r\n /**\r\n * Sets the iridescence thickness maximum (OpenPBR: iridescenceThicknessMaximum, PBR: iridescence.maximumThickness)\r\n */\r\n iridescenceThicknessMaximum: number;\r\n\r\n /**\r\n * Sets the iridescence texture (OpenPBR: iridescenceTexture, PBR: iridescence.intensityTexture)\r\n */\r\n iridescenceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the iridescence thickness texture (OpenPBR: iridescenceThicknessTexture, PBR: iridescence.thicknessTexture)\r\n */\r\n iridescenceThicknessTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // UNLIT MATERIALS\r\n // ========================================\r\n\r\n /**\r\n * Sets the unlit flag (OpenPBR: unlit, PBR: unlit)\r\n */\r\n unlit: boolean;\r\n\r\n // ========================================\r\n // GEOMETRY PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the geometry opacity (OpenPBR: geometryOpacity, PBR: alpha)\r\n */\r\n geometryOpacity: number;\r\n\r\n /**\r\n * Sets/gets the geometry normal texture (OpenPBR: geometryNormalTexture, PBR: bumpTexture)\r\n */\r\n geometryNormalTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the normal map inversions for PBR material only\r\n * @param invertX - Whether to invert the normal map on the X axis\r\n * @param invertY - Whether to invert the normal map on the Y axis\r\n */\r\n setNormalMapInversions(invertX: boolean, invertY: boolean): void;\r\n\r\n /**\r\n * Sets/gets the coat normal texture (OpenPBR: geometryCoatNormalTexture, PBR: clearCoat.bumpTexture)\r\n */\r\n geometryCoatNormalTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the coat normal texture scale\r\n */\r\n geometryCoatNormalTextureScale: number;\r\n}\r\n"]}
1
+ {"version":3,"file":"materialLoadingAdapter.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/materialLoadingAdapter.ts"],"names":[],"mappings":"","sourcesContent":["import type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { Color3 } from \"core/Maths/math.color\";\r\n\r\n/**\r\n * Interface for material loading adapters that provides a unified OpenPBR-like interface\r\n * for both OpenPBR and PBR materials, eliminating conditional branches in extensions.\r\n */\r\nexport interface IMaterialLoadingAdapter {\r\n /**\r\n * Gets the underlying material\r\n */\r\n readonly material: Material;\r\n\r\n /**\r\n * Whether the material should be treated as unlit\r\n */\r\n isUnlit: boolean;\r\n\r\n // ========================================\r\n // CULLING PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the back face culling\r\n */\r\n backFaceCulling: boolean;\r\n\r\n /**\r\n * Sets/gets the two sided lighting\r\n */\r\n twoSidedLighting: boolean;\r\n\r\n // ========================================\r\n // ALPHA PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the alpha cutoff value (used for alpha test mode)\r\n */\r\n alphaCutOff: number;\r\n\r\n /**\r\n * Sets/gets whether to use alpha from albedo/base color texture\r\n */\r\n useAlphaFromBaseColorTexture: boolean;\r\n\r\n /**\r\n * Sets/Gets whether the transparency is treated as alpha coverage\r\n */\r\n transparencyAsAlphaCoverage: boolean;\r\n\r\n // ========================================\r\n // BASE PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the base color (OpenPBR: baseColor, PBR: albedoColor)\r\n */\r\n baseColor: Color3;\r\n\r\n /**\r\n * Sets/gets the base color texture (OpenPBR: baseColorTexture, PBR: albedoTexture)\r\n */\r\n baseColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the base diffuse roughness (OpenPBR: baseDiffuseRoughness, PBR: baseDiffuseRoughness)\r\n */\r\n baseDiffuseRoughness: number;\r\n\r\n /**\r\n * Sets/gets the base diffuse roughness texture (OpenPBR: baseDiffuseRoughnessTexture, PBR: baseDiffuseRoughnessTexture)\r\n */\r\n baseDiffuseRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the base metalness (OpenPBR: baseMetalness, PBR: metallic)\r\n */\r\n baseMetalness: number;\r\n\r\n /**\r\n * Sets/gets the base metalness texture (OpenPBR: baseMetalnessTexture, PBR: metallicTexture)\r\n */\r\n baseMetalnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets whether to use roughness from metallic texture green channel\r\n */\r\n useRoughnessFromMetallicTextureGreen: boolean;\r\n\r\n /**\r\n * Sets whether to use metallic from metallic texture blue channel\r\n */\r\n useMetallicFromMetallicTextureBlue: boolean;\r\n\r\n // ========================================\r\n // SPECULAR PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures specular properties and enables OpenPBR BRDF model for edge color support\r\n * @param enableEdgeColor - Whether to enable edge color support\r\n */\r\n enableSpecularEdgeColor(enableEdgeColor?: boolean): void;\r\n\r\n /**\r\n * Sets/gets the specular weight (OpenPBR: specularWeight, PBR: metallicF0Factor)\r\n */\r\n specularWeight: number;\r\n\r\n /**\r\n * Sets/gets the specular weight texture (OpenPBR: specularWeightTexture, PBR: metallicReflectanceTexture)\r\n */\r\n specularWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the specular color (OpenPBR: specularColor, PBR: reflectance)\r\n */\r\n specularColor: Color3;\r\n\r\n /**\r\n * Sets/gets the specular color texture (OpenPBR: specularColorTexture, PBR: reflectanceTexture)\r\n */\r\n specularColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the specular roughness (OpenPBR: specularRoughness, PBR: roughness)\r\n */\r\n specularRoughness: number;\r\n\r\n /**\r\n * Sets/gets the specular roughness texture\r\n */\r\n specularRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the specular IOR (OpenPBR: specularIor, PBR: indexOfRefraction)\r\n */\r\n specularIor: number;\r\n\r\n // ========================================\r\n // EMISSION PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the emissive color (OpenPBR: emissionColor, PBR: emissiveColor)\r\n */\r\n emissionColor: Color3;\r\n\r\n /**\r\n * Sets/gets the emissive luminance (OpenPBR: emissionLuminance, PBR: emissiveIntensity)\r\n */\r\n emissionLuminance: number;\r\n\r\n /**\r\n * Sets/gets the emissive texture\r\n */\r\n emissionColorTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // AMBIENT OCCLUSION\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the ambient occlusion texture (OpenPBR: ambientOcclusionTexture, PBR: ambientTexture)\r\n */\r\n ambientOcclusionTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the ambient occlusion texture strength/level\r\n */\r\n ambientOcclusionTextureStrength: number;\r\n\r\n // ========================================\r\n // COAT PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures clear coat for PBR material\r\n */\r\n configureCoat(): void;\r\n\r\n /**\r\n * Sets/gets the coat weight (OpenPBR: coatWeight, PBR: clearCoat.intensity)\r\n */\r\n coatWeight: number;\r\n\r\n /**\r\n * Sets/gets the coat weight texture (OpenPBR: coatWeightTexture, PBR: clearCoat.texture)\r\n */\r\n coatWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the coat color (OpenPBR: coatColor, no PBR equivalent)\r\n */\r\n coatColor: Color3;\r\n\r\n /**\r\n * Sets the coat color texture (OpenPBR: coatColorTexture, no PBR equivalent)\r\n */\r\n coatColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the coat roughness (OpenPBR: coatRoughness, PBR: clearCoat.roughness)\r\n */\r\n coatRoughness: number;\r\n\r\n /**\r\n * Sets/gets the coat roughness texture (OpenPBR: coatRoughnessTexture, PBR: clearCoat.textureRoughness)\r\n */\r\n coatRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the coat index of refraction (IOR)\r\n */\r\n coatIor: number;\r\n\r\n /**\r\n * Sets the coat darkening (OpenPBR: coatDarkening, no PBR equivalent)\r\n */\r\n coatDarkening: number;\r\n\r\n /**\r\n * Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)\r\n */\r\n coatDarkeningTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the coat roughness anisotropy (OpenPBR: coatRoughnessAnisotropy, PBR: clearCoat.anisotropy.intensity)\r\n */\r\n coatRoughnessAnisotropy: number;\r\n\r\n /**\r\n * Sets the coat tangent angle for anisotropy (OpenPBR: geometryCoatTangentAngle, PBR: clearCoat.anisotropy.angle)\r\n */\r\n geometryCoatTangentAngle: number;\r\n\r\n /**\r\n * Sets the coat tangent texture for anisotropy (OpenPBR: geometryCoatTangentTexture, PBR: clearCoat.anisotropy.texture)\r\n */\r\n geometryCoatTangentTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // TRANSMISSION LAYER\r\n // ========================================\r\n\r\n /**\r\n * Sets the transmission weight (OpenPBR: transmissionWeight, PBR: subSurface.refractionIntensity)\r\n */\r\n transmissionWeight: number;\r\n\r\n /**\r\n * Sets the transmission weight texture (OpenPBR: transmissionWeightTexture, PBR: subSurface.refractionIntensityTexture)\r\n */\r\n transmissionWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the attenuation distance (OpenPBR: attenuationDistance, PBR: subSurface.volumeIndexOfRefraction)\r\n */\r\n transmissionDepth: number;\r\n\r\n /**\r\n * Sets the attenuation color (OpenPBR: attenuationColor, PBR: subSurface.tintColor)\r\n */\r\n transmissionColor: Color3;\r\n\r\n /**\r\n * Sets the dispersion Abbe number\r\n */\r\n transmissionDispersionAbbeNumber: number;\r\n\r\n /**\r\n * Configures transmission for thin-surface transmission (KHR_materials_transmission)\r\n */\r\n configureTransmission(): void;\r\n\r\n // ========================================\r\n // VOLUME PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets the thickness texture (OpenPBR: thicknessTexture, PBR: subSurface.thicknessTexture)\r\n */\r\n volumeThicknessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the thickness factor (OpenPBR: thickness, PBR: subSurface.maximumThickness)\r\n */\r\n volumeThickness: number;\r\n\r\n // ========================================\r\n // SUBSURFACE PROPERTIES (Subsurface Scattering)\r\n // ========================================\r\n\r\n /**\r\n * Configures subsurface properties for PBR material\r\n */\r\n configureSubsurface(): void;\r\n\r\n /**\r\n * Sets/gets the subsurface weight\r\n */\r\n subsurfaceWeight: number;\r\n\r\n /**\r\n * Sets/gets the subsurface weight texture\r\n */\r\n subsurfaceWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets/gets the subsurface color (OpenPBR: subsurfaceColor, PBR: subSurface.tintColor)\r\n */\r\n subsurfaceColor: Color3;\r\n\r\n /**\r\n * Sets/gets the subsurface color texture (OpenPBR: subsurfaceColorTexture, PBR: subSurface.tintColorTexture)\r\n */\r\n subsurfaceColorTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // FUZZ LAYER (Sheen)\r\n // ========================================\r\n\r\n /**\r\n * Configures initial settings for fuzz for material.\r\n */\r\n configureFuzz(): void;\r\n\r\n /**\r\n * Sets the fuzz weight (OpenPBR: fuzzWeight, PBR: fuzz.intensity)\r\n */\r\n fuzzWeight: number;\r\n\r\n /**\r\n * Sets the fuzz color (OpenPBR: fuzzColor, PBR: fuzz.color)\r\n */\r\n fuzzColor: Color3;\r\n\r\n /**\r\n * Sets the fuzz color texture (OpenPBR: fuzzColorTexture, PBR: fuzz.texture)\r\n */\r\n fuzzColorTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the fuzz roughness (OpenPBR: fuzzRoughness, PBR: fuzz.roughness)\r\n */\r\n fuzzRoughness: number;\r\n\r\n /**\r\n * Sets the fuzz roughness texture (OpenPBR: fuzzRoughnessTexture, PBR: fuzz.textureRoughness)\r\n */\r\n fuzzRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // ANISOTROPY\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the specular roughness anisotropy (OpenPBR: specularRoughnessAnisotropy, PBR: anisotropy.intensity)\r\n */\r\n specularRoughnessAnisotropy: number;\r\n\r\n /**\r\n * Sets the anisotropy rotation (OpenPBR: anisotropyRotation, PBR: anisotropy.angle)\r\n */\r\n geometryTangentAngle: number;\r\n\r\n /**\r\n * Sets/gets the anisotropy texture (OpenPBR: geometryTangentTexture, PBR: anisotropy.texture)\r\n */\r\n geometryTangentTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Configures glTF-style anisotropy for OpenPBR materials\r\n * @param useGltfStyle - Whether to use glTF-style anisotropy (default: true)\r\n */\r\n configureGltfStyleAnisotropy(useGltfStyle?: boolean): void;\r\n\r\n // ========================================\r\n // THIN FILM IRIDESCENCE\r\n // ========================================\r\n\r\n /**\r\n * Sets the thin film weight\r\n */\r\n thinFilmWeight: number;\r\n\r\n /**\r\n * Sets the thin film IOR\r\n */\r\n thinFilmIor: number;\r\n\r\n /**\r\n * Sets the thin film thickness minimum\r\n */\r\n thinFilmThicknessMinimum: number;\r\n\r\n /**\r\n * Sets the thin film thickness maximum\r\n */\r\n thinFilmThicknessMaximum: number;\r\n\r\n /**\r\n * Sets the thin film iridescence texture\r\n */\r\n thinFilmWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the thin film thickness texture\r\n */\r\n thinFilmThicknessTexture: Nullable<BaseTexture>;\r\n\r\n // ========================================\r\n // UNLIT MATERIALS\r\n // ========================================\r\n\r\n /**\r\n * Sets the unlit flag (OpenPBR: unlit, PBR: unlit)\r\n */\r\n unlit: boolean;\r\n\r\n // ========================================\r\n // GEOMETRY PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets/gets the geometry opacity (OpenPBR: geometryOpacity, PBR: alpha)\r\n */\r\n geometryOpacity: number;\r\n\r\n /**\r\n * Sets/gets the geometry normal texture (OpenPBR: geometryNormalTexture, PBR: bumpTexture)\r\n */\r\n geometryNormalTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the normal map inversions for PBR material only\r\n * @param invertX - Whether to invert the normal map on the X axis\r\n * @param invertY - Whether to invert the normal map on the Y axis\r\n */\r\n setNormalMapInversions(invertX: boolean, invertY: boolean): void;\r\n\r\n /**\r\n * Sets/gets the coat normal texture (OpenPBR: geometryCoatNormalTexture, PBR: clearCoat.bumpTexture)\r\n */\r\n geometryCoatNormalTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Sets the coat normal texture scale\r\n */\r\n geometryCoatNormalTextureScale: number;\r\n}\r\n"]}
@@ -513,41 +513,35 @@ export declare class OpenPBRMaterialLoadingAdapter implements IMaterialLoadingAd
513
513
  */
514
514
  configureGltfStyleAnisotropy(useGltfStyle?: boolean): void;
515
515
  /**
516
- * Sets the iridescence weight.
517
- * TODO: Implementation pending OpenPBR iridescence feature availability.
518
- * @param value The iridescence intensity value
516
+ * Sets the thin film weight.
517
+ * @param value The thin film weight value
519
518
  */
520
- set iridescenceWeight(value: number);
519
+ set thinFilmWeight(value: number);
521
520
  /**
522
- * Sets the iridescence IOR.
523
- * TODO: Implementation pending OpenPBR iridescence feature availability.
524
- * @param value The iridescence IOR value
521
+ * Sets the thin film IOR.
522
+ * @param value The thin film IOR value
525
523
  */
526
- set iridescenceIor(value: number);
524
+ set thinFilmIor(value: number);
527
525
  /**
528
- * Sets the iridescence thickness minimum.
529
- * TODO: Implementation pending OpenPBR iridescence feature availability.
526
+ * Sets the thin film thickness minimum.
530
527
  * @param value The minimum thickness value in nanometers
531
528
  */
532
- set iridescenceThicknessMinimum(value: number);
529
+ set thinFilmThicknessMinimum(value: number);
533
530
  /**
534
- * Sets the iridescence thickness maximum.
535
- * TODO: Implementation pending OpenPBR iridescence feature availability.
531
+ * Sets the thin film thickness maximum.
536
532
  * @param value The maximum thickness value in nanometers
537
533
  */
538
- set iridescenceThicknessMaximum(value: number);
534
+ set thinFilmThicknessMaximum(value: number);
539
535
  /**
540
- * Sets the iridescence texture.
541
- * TODO: Implementation pending OpenPBR iridescence feature availability.
542
- * @param value The iridescence intensity texture or null
536
+ * Sets the thin film weight texture.
537
+ * @param value The thin film weight texture or null
543
538
  */
544
- set iridescenceTexture(value: Nullable<BaseTexture>);
539
+ set thinFilmWeightTexture(value: Nullable<BaseTexture>);
545
540
  /**
546
- * Sets the iridescence thickness texture.
547
- * TODO: Implementation pending OpenPBR iridescence feature availability.
548
- * @param value The iridescence thickness texture or null
541
+ * Sets the thin film thickness texture.
542
+ * @param value The thin film thickness texture or null
549
543
  */
550
- set iridescenceThicknessTexture(value: Nullable<BaseTexture>);
544
+ set thinFilmThicknessTexture(value: Nullable<BaseTexture>);
551
545
  /**
552
546
  * Sets whether the OpenPBR material is unlit.
553
547
  * @param value True to make the material unlit
@@ -778,58 +778,47 @@ export class OpenPBRMaterialLoadingAdapter {
778
778
  // THIN FILM IRIDESCENCE
779
779
  // ========================================
780
780
  /**
781
- * Sets the iridescence weight.
782
- * TODO: Implementation pending OpenPBR iridescence feature availability.
783
- * @param value The iridescence intensity value
781
+ * Sets the thin film weight.
782
+ * @param value The thin film weight value
784
783
  */
785
- set iridescenceWeight(value) {
786
- // TODO: Implement when OpenPBR iridescence is available
787
- // this._material.iridescenceWeight = value;
784
+ set thinFilmWeight(value) {
785
+ this._material.thinFilmWeight = value;
788
786
  }
789
787
  /**
790
- * Sets the iridescence IOR.
791
- * TODO: Implementation pending OpenPBR iridescence feature availability.
792
- * @param value The iridescence IOR value
788
+ * Sets the thin film IOR.
789
+ * @param value The thin film IOR value
793
790
  */
794
- set iridescenceIor(value) {
795
- // TODO: Implement when OpenPBR iridescence is available
796
- // this._material.iridescenceIor = value;
791
+ set thinFilmIor(value) {
792
+ this._material.thinFilmIor = value;
797
793
  }
798
794
  /**
799
- * Sets the iridescence thickness minimum.
800
- * TODO: Implementation pending OpenPBR iridescence feature availability.
795
+ * Sets the thin film thickness minimum.
801
796
  * @param value The minimum thickness value in nanometers
802
797
  */
803
- set iridescenceThicknessMinimum(value) {
804
- // TODO: Implement when OpenPBR iridescence is available
805
- // this._material.iridescenceThicknessMinimum = value;
798
+ set thinFilmThicknessMinimum(value) {
799
+ this._material.thinFilmThicknessMin = value / 1000.0; // Convert to micrometers for OpenPBR
806
800
  }
807
801
  /**
808
- * Sets the iridescence thickness maximum.
809
- * TODO: Implementation pending OpenPBR iridescence feature availability.
802
+ * Sets the thin film thickness maximum.
810
803
  * @param value The maximum thickness value in nanometers
811
804
  */
812
- set iridescenceThicknessMaximum(value) {
813
- // TODO: Implement when OpenPBR iridescence is available
814
- // this._material.iridescenceThicknessMaximum = value;
805
+ set thinFilmThicknessMaximum(value) {
806
+ this._material.thinFilmThickness = value / 1000.0; // Convert to micrometers for OpenPBR
815
807
  }
816
808
  /**
817
- * Sets the iridescence texture.
818
- * TODO: Implementation pending OpenPBR iridescence feature availability.
819
- * @param value The iridescence intensity texture or null
809
+ * Sets the thin film weight texture.
810
+ * @param value The thin film weight texture or null
820
811
  */
821
- set iridescenceTexture(value) {
822
- // TODO: Implement when OpenPBR iridescence is available
823
- // this._material.iridescenceTexture = value;
812
+ set thinFilmWeightTexture(value) {
813
+ this._material.thinFilmWeightTexture = value;
824
814
  }
825
815
  /**
826
- * Sets the iridescence thickness texture.
827
- * TODO: Implementation pending OpenPBR iridescence feature availability.
828
- * @param value The iridescence thickness texture or null
816
+ * Sets the thin film thickness texture.
817
+ * @param value The thin film thickness texture or null
829
818
  */
830
- set iridescenceThicknessTexture(value) {
831
- // TODO: Implement when OpenPBR iridescence is available
832
- // this._material.iridescenceThicknessTexture = value;
819
+ set thinFilmThicknessTexture(value) {
820
+ this._material.thinFilmThicknessTexture = value;
821
+ this._material._useThinFilmThicknessFromTextureGreen = true;
833
822
  }
834
823
  // ========================================
835
824
  // UNLIT MATERIALS
@@ -1 +1 @@
1
- {"version":3,"file":"openPbrMaterialLoadingAdapter.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/openPbrMaterialLoadingAdapter.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,OAAO,6BAA6B;IAGtC;;;OAGG;IACH,YAAY,QAAkB;QAC1B,IAAI,CAAC,SAAS,GAAG,QAA2B,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,OAAO,CAAC,KAAc;QAC7B,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,2CAA2C;IAC3C,qBAAqB;IACrB,2CAA2C;IAE3C;;;OAGG;IACH,IAAW,eAAe,CAAC,KAAc;QACrC,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,KAAK,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACH,IAAW,eAAe;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,IAAW,gBAAgB,CAAC,KAAc;QACtC,IAAI,CAAC,SAAS,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAC5C,CAAC;IAED;;;OAGG;IACH,IAAW,gBAAgB;QACvB,OAAO,IAAI,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,CAAC,SAAS,CAAC,eAAe,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,IAAW,qBAAqB,CAAC,KAA4B;QACzD,IAAI,CAAC,SAAS,CAAC,qBAAqB,GAAG,KAAK,CAAC;IACjD,CAAC;IAED;;;OAGG;IACH,IAAW,qBAAqB;QAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC;IAChD,CAAC;IAED;;;;;OAKG;IACI,sBAAsB,CAAC,OAAgB,EAAE,OAAgB;QAC5D,yEAAyE;IAC7E,CAAC;IAED;;;OAGG;IACH,IAAW,yBAAyB,CAAC,KAA4B;QAC7D,IAAI,CAAC,SAAS,CAAC,yBAAyB,GAAG,KAAK,CAAC;IACrD,CAAC;IAED;;;OAGG;IACH,IAAW,yBAAyB;QAChC,OAAO,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC;IACpD,CAAC;IAED;;;OAGG;IACH,IAAW,8BAA8B,CAAC,KAAa;QACnD,IAAI,IAAI,CAAC,SAAS,CAAC,yBAAyB,EAAE,CAAC;YAC3C,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC,KAAK,GAAG,KAAK,CAAC;QAC3D,CAAC;IACL,CAAC;CACJ","sourcesContent":["import type { OpenPBRMaterial } from \"core/Materials/PBR/openPbrMaterial\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { Color3 } from \"core/Maths/math.color\";\r\nimport type { IMaterialLoadingAdapter } from \"./materialLoadingAdapter\";\r\n\r\n/**\r\n * Material Loading Adapter for OpenPBR materials that provides a unified OpenPBR-like interface.\r\n */\r\nexport class OpenPBRMaterialLoadingAdapter implements IMaterialLoadingAdapter {\r\n private _material: OpenPBRMaterial;\r\n\r\n /**\r\n * Creates a new instance of the OpenPBRMaterialLoadingAdapter.\r\n * @param material - The OpenPBR material to adapt.\r\n */\r\n constructor(material: Material) {\r\n this._material = material as OpenPBRMaterial;\r\n }\r\n\r\n /**\r\n * Gets the underlying material\r\n */\r\n public get material(): OpenPBRMaterial {\r\n return this._material;\r\n }\r\n\r\n /**\r\n * Whether the material should be treated as unlit\r\n */\r\n public get isUnlit(): boolean {\r\n return this._material.unlit;\r\n }\r\n\r\n /**\r\n * Sets whether the material should be treated as unlit\r\n */\r\n public set isUnlit(value: boolean) {\r\n this._material.unlit = value;\r\n }\r\n\r\n // ========================================\r\n // CULLING PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets whether back face culling is enabled.\r\n * @param value True to enable back face culling\r\n */\r\n public set backFaceCulling(value: boolean) {\r\n this._material.backFaceCulling = value;\r\n }\r\n\r\n /**\r\n * Gets whether back face culling is enabled.\r\n * @returns True if back face culling is enabled\r\n */\r\n public get backFaceCulling(): boolean {\r\n return this._material.backFaceCulling;\r\n }\r\n\r\n /**\r\n * Sets whether two-sided lighting is enabled.\r\n * @param value True to enable two-sided lighting\r\n */\r\n public set twoSidedLighting(value: boolean) {\r\n this._material.twoSidedLighting = value;\r\n }\r\n\r\n /**\r\n * Gets whether two-sided lighting is enabled.\r\n * @returns True if two-sided lighting is enabled\r\n */\r\n public get twoSidedLighting(): boolean {\r\n return this._material.twoSidedLighting;\r\n }\r\n\r\n // ========================================\r\n // ALPHA PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets the alpha cutoff value for alpha testing.\r\n * Note: OpenPBR doesn't have a direct equivalent, so this is a no-op.\r\n * @param value The alpha cutoff threshold (ignored for OpenPBR)\r\n */\r\n public set alphaCutOff(value: number) {\r\n // OpenPBR doesn't have a direct equivalent, but could be implemented if needed\r\n }\r\n\r\n /**\r\n * Gets the alpha cutoff value.\r\n * @returns Default value of 0.5 (OpenPBR doesn't support this directly)\r\n */\r\n public get alphaCutOff(): number {\r\n return 0.5; // Default value\r\n }\r\n\r\n /**\r\n * Sets whether to use alpha from the base color texture.\r\n * Note: OpenPBR handles this differently through the baseColorTexture alpha channel.\r\n * @param value True to use alpha from base color texture (handled automatically in OpenPBR)\r\n */\r\n public set useAlphaFromBaseColorTexture(value: boolean) {\r\n this._material._useAlphaFromBaseColorTexture = value;\r\n }\r\n\r\n /**\r\n * Gets whether alpha is used from the base color texture.\r\n * @returns Always false for OpenPBR as it's handled automatically\r\n */\r\n public get useAlphaFromBaseColorTexture(): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets whether the transparency is treated as alpha coverage.\r\n */\r\n public get transparencyAsAlphaCoverage(): boolean {\r\n // OpenPBR doesn't support treating transparency as alpha coverage.\r\n return false;\r\n }\r\n\r\n /**\r\n * Sets/Gets whether the transparency is treated as alpha coverage\r\n */\r\n public set transparencyAsAlphaCoverage(value: boolean) {\r\n // OpenPBR doesn't support treating transparency as alpha coverage.\r\n }\r\n\r\n // ========================================\r\n // BASE PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the base color of the OpenPBR material.\r\n * @param value The base color as a Color3\r\n */\r\n public set baseColor(value: Color3) {\r\n this._material.baseColor = value;\r\n }\r\n\r\n /**\r\n * Gets the base color of the OpenPBR material.\r\n * @returns The base color as a Color3\r\n */\r\n public get baseColor(): Color3 {\r\n return this._material.baseColor;\r\n }\r\n\r\n /**\r\n * Sets the base color texture of the OpenPBR material.\r\n * @param value The base color texture or null\r\n */\r\n public set baseColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.baseColorTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base color texture of the OpenPBR material.\r\n * @returns The base color texture or null\r\n */\r\n public get baseColorTexture(): Nullable<BaseTexture> {\r\n return this._material.baseColorTexture;\r\n }\r\n\r\n /**\r\n * Sets the base diffuse roughness of the OpenPBR material.\r\n * @param value The diffuse roughness value (0-1)\r\n */\r\n public set baseDiffuseRoughness(value: number) {\r\n this._material.baseDiffuseRoughness = value;\r\n }\r\n\r\n /**\r\n * Gets the base diffuse roughness of the OpenPBR material.\r\n * @returns The diffuse roughness value (0-1)\r\n */\r\n public get baseDiffuseRoughness(): number {\r\n return this._material.baseDiffuseRoughness;\r\n }\r\n\r\n /**\r\n * Sets the base diffuse roughness texture of the OpenPBR material.\r\n * @param value The diffuse roughness texture or null\r\n */\r\n public set baseDiffuseRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.baseDiffuseRoughnessTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base diffuse roughness texture of the OpenPBR material.\r\n * @returns The diffuse roughness texture or null\r\n */\r\n public get baseDiffuseRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.baseDiffuseRoughnessTexture;\r\n }\r\n\r\n /**\r\n * Sets the base metalness value of the OpenPBR material.\r\n * @param value The metalness value (0-1)\r\n */\r\n public set baseMetalness(value: number) {\r\n this._material.baseMetalness = value;\r\n }\r\n\r\n /**\r\n * Gets the base metalness value of the OpenPBR material.\r\n * @returns The metalness value (0-1)\r\n */\r\n public get baseMetalness(): number {\r\n return this._material.baseMetalness;\r\n }\r\n\r\n /**\r\n * Sets the base metalness texture of the OpenPBR material.\r\n * @param value The metalness texture or null\r\n */\r\n public set baseMetalnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.baseMetalnessTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base metalness texture of the OpenPBR material.\r\n * @returns The metalness texture or null\r\n */\r\n public get baseMetalnessTexture(): Nullable<BaseTexture> {\r\n return this._material.baseMetalnessTexture;\r\n }\r\n\r\n /**\r\n * Sets whether to use roughness from the metallic texture's green channel.\r\n * @param value True to use green channel for roughness\r\n */\r\n public set useRoughnessFromMetallicTextureGreen(value: boolean) {\r\n this._material._useRoughnessFromMetallicTextureGreen = value;\r\n }\r\n\r\n /**\r\n * Sets whether to use metalness from the metallic texture's blue channel.\r\n * @param value True to use blue channel for metalness\r\n */\r\n public set useMetallicFromMetallicTextureBlue(value: boolean) {\r\n this._material._useMetallicFromMetallicTextureBlue = value;\r\n }\r\n\r\n // ========================================\r\n // SPECULAR PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures specular properties for OpenPBR material.\r\n * @param _enableEdgeColor Whether to enable edge color support (ignored for OpenPBR)\r\n */\r\n public enableSpecularEdgeColor(_enableEdgeColor: boolean = false): void {\r\n // OpenPBR already supports edge color natively, no configuration needed\r\n }\r\n\r\n /**\r\n * Sets the specular weight of the OpenPBR material.\r\n * @param value The specular weight value (0-1)\r\n */\r\n public set specularWeight(value: number) {\r\n this._material.specularWeight = value;\r\n }\r\n\r\n /**\r\n * Gets the specular weight of the OpenPBR material.\r\n * @returns The specular weight value (0-1)\r\n */\r\n public get specularWeight(): number {\r\n return this._material.specularWeight;\r\n }\r\n\r\n /**\r\n * Sets the specular weight texture of the OpenPBR material.\r\n * If the same texture is used for specular color, optimizes by using alpha channel for weight.\r\n * @param value The specular weight texture or null\r\n */\r\n public set specularWeightTexture(value: Nullable<BaseTexture>) {\r\n if (this._material.specularColorTexture === value) {\r\n this._material.specularWeightTexture = null;\r\n this._material._useSpecularWeightFromSpecularColorTexture = true;\r\n this._material._useSpecularWeightFromAlpha = true;\r\n } else {\r\n this._material.specularWeightTexture = value;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the specular weight texture of the OpenPBR material.\r\n * @returns The specular weight texture or null\r\n */\r\n public get specularWeightTexture(): Nullable<BaseTexture> {\r\n return this._material.specularWeightTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular color of the OpenPBR material.\r\n * @param value The specular color as a Color3\r\n */\r\n public set specularColor(value: Color3) {\r\n this._material.specularColor = value;\r\n }\r\n\r\n /**\r\n * Gets the specular color of the OpenPBR material.\r\n * @returns The specular color as a Color3\r\n */\r\n public get specularColor(): Color3 {\r\n return this._material.specularColor;\r\n }\r\n\r\n /**\r\n * Sets the specular color texture of the OpenPBR material.\r\n * If the same texture is used for specular weight, optimizes by using alpha channel for weight.\r\n * @param value The specular color texture or null\r\n */\r\n public set specularColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.specularColorTexture = value;\r\n if (this._material.specularWeightTexture === this._material.specularColorTexture) {\r\n this._material.specularWeightTexture = null;\r\n this._material._useSpecularWeightFromSpecularColorTexture = true;\r\n this._material._useSpecularWeightFromAlpha = true;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the specular color texture of the OpenPBR material.\r\n * @returns The specular color texture or null\r\n */\r\n public get specularColorTexture(): Nullable<BaseTexture> {\r\n return this._material.specularColorTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular roughness of the OpenPBR material.\r\n * @param value The roughness value (0-1)\r\n */\r\n public set specularRoughness(value: number) {\r\n this._material.specularRoughness = value;\r\n }\r\n\r\n /**\r\n * Gets the specular roughness of the OpenPBR material.\r\n * @returns The roughness value (0-1)\r\n */\r\n public get specularRoughness(): number {\r\n return this._material.specularRoughness;\r\n }\r\n\r\n /**\r\n * Sets the specular roughness texture of the OpenPBR material.\r\n * @param value The roughness texture or null\r\n */\r\n public set specularRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.specularRoughnessTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the specular roughness texture of the OpenPBR material.\r\n * @returns The roughness texture or null\r\n */\r\n public get specularRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.specularRoughnessTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular index of refraction (IOR) of the OpenPBR material.\r\n * @param value The IOR value\r\n */\r\n public set specularIor(value: number) {\r\n this._material.specularIor = value;\r\n }\r\n\r\n /**\r\n * Gets the specular index of refraction (IOR) of the OpenPBR material.\r\n * @returns The IOR value\r\n */\r\n public get specularIor(): number {\r\n return this._material.specularIor;\r\n }\r\n\r\n // ========================================\r\n // EMISSION PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the emission color of the OpenPBR material.\r\n * @param value The emission color as a Color3\r\n */\r\n public set emissionColor(value: Color3) {\r\n this._material.emissionColor = value;\r\n }\r\n\r\n /**\r\n * Gets the emission color of the OpenPBR material.\r\n * @returns The emission color as a Color3\r\n */\r\n public get emissionColor(): Color3 {\r\n return this._material.emissionColor;\r\n }\r\n\r\n /**\r\n * Sets the emission luminance of the OpenPBR material.\r\n * @param value The emission luminance value\r\n */\r\n public set emissionLuminance(value: number) {\r\n this._material.emissionLuminance = value;\r\n }\r\n\r\n /**\r\n * Gets the emission luminance of the OpenPBR material.\r\n * @returns The emission luminance value\r\n */\r\n public get emissionLuminance(): number {\r\n return this._material.emissionLuminance;\r\n }\r\n\r\n /**\r\n * Sets the emission color texture of the OpenPBR material.\r\n * @param value The emission texture or null\r\n */\r\n public set emissionColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.emissionColorTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the emission color texture of the OpenPBR material.\r\n * @returns The emission texture or null\r\n */\r\n public get emissionColorTexture(): Nullable<BaseTexture> {\r\n return this._material.emissionColorTexture;\r\n }\r\n\r\n // ========================================\r\n // AMBIENT OCCLUSION\r\n // ========================================\r\n\r\n /**\r\n * Sets the ambient occlusion texture of the OpenPBR material.\r\n * @param value The ambient occlusion texture or null\r\n */\r\n public set ambientOcclusionTexture(value: Nullable<BaseTexture>) {\r\n this._material.ambientOcclusionTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the ambient occlusion texture of the OpenPBR material.\r\n * @returns The ambient occlusion texture or null\r\n */\r\n public get ambientOcclusionTexture(): Nullable<BaseTexture> {\r\n return this._material.ambientOcclusionTexture;\r\n }\r\n\r\n /**\r\n * Sets the ambient occlusion texture strength by modifying the texture's level.\r\n * @param value The strength value (typically 0-1)\r\n */\r\n public set ambientOcclusionTextureStrength(value: number) {\r\n const texture = this._material.ambientOcclusionTexture;\r\n if (texture) {\r\n texture.level = value;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the ambient occlusion texture strength from the texture's level property.\r\n * @returns The strength value, defaults to 1.0 if no texture or level is set\r\n */\r\n public get ambientOcclusionTextureStrength(): number {\r\n const texture = this._material.ambientOcclusionTexture;\r\n return texture?.level ?? 1.0;\r\n }\r\n\r\n // ========================================\r\n // COAT PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures coat parameters for OpenPBR material.\r\n * OpenPBR coat is already built-in, so no configuration is needed.\r\n */\r\n public configureCoat(): void {\r\n // OpenPBR coat is already built-in, no configuration needed\r\n }\r\n\r\n /**\r\n * Sets the coat weight of the OpenPBR material.\r\n * @param value The coat weight value (0-1)\r\n */\r\n public set coatWeight(value: number) {\r\n this._material.coatWeight = value;\r\n }\r\n\r\n /**\r\n * Gets the coat weight of the OpenPBR material.\r\n * @returns The coat weight value (0-1)\r\n */\r\n public get coatWeight(): number {\r\n return this._material.coatWeight;\r\n }\r\n\r\n /**\r\n * Sets the coat weight texture of the OpenPBR material.\r\n * @param value The coat weight texture or null\r\n */\r\n public set coatWeightTexture(value: Nullable<BaseTexture>) {\r\n this._material.coatWeightTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the coat weight texture of the OpenPBR material.\r\n * @returns The coat weight texture or null\r\n */\r\n public get coatWeightTexture(): Nullable<BaseTexture> {\r\n return this._material.coatWeightTexture;\r\n }\r\n\r\n /**\r\n * Sets the coat color of the OpenPBR material.\r\n * @param value The coat color as a Color3\r\n */\r\n public set coatColor(value: Color3) {\r\n this._material.coatColor = value;\r\n }\r\n\r\n /**\r\n * Sets the coat color texture of the OpenPBR material.\r\n * @param value The coat color texture or null\r\n */\r\n public set coatColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.coatColorTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the coat roughness of the OpenPBR material.\r\n * @param value The coat roughness value (0-1)\r\n */\r\n public set coatRoughness(value: number) {\r\n this._material.coatRoughness = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness of the OpenPBR material.\r\n * @returns The coat roughness value (0-1)\r\n */\r\n public get coatRoughness(): number {\r\n return this._material.coatRoughness;\r\n }\r\n\r\n /**\r\n * Sets the coat roughness texture of the OpenPBR material.\r\n * @param value The coat roughness texture or null\r\n */\r\n public set coatRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.coatRoughnessTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness texture of the OpenPBR material.\r\n * @returns The coat roughness texture or null\r\n */\r\n public get coatRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.coatRoughnessTexture;\r\n }\r\n\r\n /**\r\n * Sets the coat index of refraction (IOR) of the OpenPBR material.\r\n */\r\n public set coatIor(value: number) {\r\n this._material.coatIor = value;\r\n }\r\n\r\n /**\r\n * Sets the coat darkening value of the OpenPBR material.\r\n * @param value The coat darkening value\r\n */\r\n public set coatDarkening(value: number) {\r\n this._material.coatDarkening = value;\r\n }\r\n\r\n /**\r\n * Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)\r\n */\r\n public set coatDarkeningTexture(value: Nullable<BaseTexture>) {\r\n this._material.coatDarkeningTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the coat roughness anisotropy.\r\n * TODO: Implementation pending OpenPBR coat anisotropy feature availability.\r\n * @param value The coat anisotropy intensity value\r\n */\r\n public set coatRoughnessAnisotropy(value: number) {\r\n this._material.coatRoughnessAnisotropy = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness anisotropy.\r\n * TODO: Implementation pending OpenPBR coat anisotropy feature availability.\r\n * @returns Currently returns 0 as coat anisotropy is not yet available\r\n */\r\n public get coatRoughnessAnisotropy(): number {\r\n return this._material.coatRoughnessAnisotropy;\r\n }\r\n\r\n /**\r\n * Sets the coat tangent angle for anisotropy.\r\n * TODO: Implementation pending OpenPBR coat anisotropy feature availability.\r\n * @param value The coat anisotropy rotation angle in radians\r\n */\r\n public set geometryCoatTangentAngle(value: number) {\r\n this._material.geometryCoatTangentAngle = value;\r\n }\r\n\r\n /**\r\n * Sets the coat tangent texture for anisotropy.\r\n * TODO: Implementation pending OpenPBR coat anisotropy feature availability.\r\n * @param value The coat anisotropy texture or null\r\n */\r\n public set geometryCoatTangentTexture(value: Nullable<BaseTexture>) {\r\n this._material.geometryCoatTangentTexture = value;\r\n if (value) {\r\n this._material._useCoatRoughnessAnisotropyFromTangentTexture = true;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the coat tangent texture for anisotropy.\r\n * TODO: Implementation pending OpenPBR coat anisotropy feature availability.\r\n * @returns Currently returns null as coat anisotropy is not yet available\r\n */\r\n public get geometryCoatTangentTexture(): Nullable<BaseTexture> {\r\n return this._material.geometryCoatTangentTexture;\r\n }\r\n\r\n // ========================================\r\n // TRANSMISSION LAYER\r\n // ========================================\r\n\r\n /**\r\n * Sets the transmission weight.\r\n * TODO: Implementation pending OpenPBR transmission feature availability.\r\n * @param value The transmission weight value (0-1)\r\n */\r\n public set transmissionWeight(value: number) {\r\n // TODO: Implement when OpenPBR transmission is available\r\n // this._material.transmissionWeight = value;\r\n }\r\n\r\n /**\r\n * Sets the transmission weight texture.\r\n * TODO: Implementation pending OpenPBR transmission feature availability.\r\n * @param value The transmission weight texture or null\r\n */\r\n public set transmissionWeightTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when OpenPBR transmission is available\r\n // this._material.transmissionWeightTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the transmission weight.\r\n * TODO: Implementation pending OpenPBR transmission feature availability.\r\n * @returns Currently returns 0 as transmission is not yet available\r\n */\r\n public get transmissionWeight(): number {\r\n // TODO: Implement when OpenPBR transmission is available\r\n // return this._material.transmissionWeight;\r\n return 0;\r\n }\r\n\r\n /**\r\n * Gets the transmission dispersion Abbe number.\r\n * @param value The Abbe number value\r\n */\r\n public set transmissionDispersionAbbeNumber(value: number) {\r\n // TODO: Implement when OpenPBR transmission dispersion is available\r\n }\r\n\r\n /**\r\n * Configures transmission for OpenPBR material.\r\n * TODO: Implementation pending OpenPBR transmission feature availability.\r\n */\r\n public configureTransmission(): void {\r\n // OpenPBR transmission will be configured differently when available\r\n }\r\n\r\n // ========================================\r\n // VOLUME PROPERTIES (Subsurface Scattering)\r\n // ========================================\r\n\r\n /**\r\n * Sets the attenuation distance for volume scattering.\r\n * TODO: Implementation pending OpenPBR volume feature availability.\r\n * @param value The attenuation distance value\r\n */\r\n public set transmissionDepth(value: number) {\r\n // TODO: Implement when OpenPBR volume properties are available\r\n // this._material.attenuationDistance = value;\r\n }\r\n\r\n /**\r\n * Sets the attenuation color for volume scattering.\r\n * TODO: Implementation pending OpenPBR volume feature availability.\r\n * @param value The attenuation color as a Color3\r\n */\r\n public set transmissionColor(value: Color3) {\r\n // TODO: Implement when OpenPBR volume properties are available\r\n // this._material.attenuationColor = value;\r\n }\r\n\r\n /**\r\n * Sets the thickness texture for volume scattering.\r\n * TODO: Implementation pending OpenPBR volume feature availability.\r\n * @param value The thickness texture or null\r\n */\r\n public set volumeThicknessTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when OpenPBR volume properties are available\r\n // this._material.thicknessTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the thickness factor for volume scattering.\r\n * TODO: Implementation pending OpenPBR volume feature availability.\r\n * @param value The thickness value\r\n */\r\n public set volumeThickness(value: number) {\r\n // TODO: Implement when OpenPBR volume properties are available\r\n // this._material.thickness = value;\r\n }\r\n\r\n // ========================================\r\n // SUBSURFACE PROPERTIES (Subsurface Scattering)\r\n // ========================================\r\n\r\n /**\r\n * Configures subsurface properties for PBR material\r\n */\r\n public configureSubsurface(): void {\r\n // TODO\r\n }\r\n\r\n /**\r\n * Sets the subsurface weight\r\n */\r\n public set subsurfaceWeight(value: number) {\r\n // TODO\r\n }\r\n\r\n public get subsurfaceWeight(): number {\r\n // TODO\r\n return 0;\r\n }\r\n\r\n /**\r\n * Sets the subsurface weight texture\r\n */\r\n public set subsurfaceWeightTexture(value: Nullable<BaseTexture>) {\r\n // TODO\r\n }\r\n\r\n /**\r\n * Sets the subsurface color.\r\n * @param value The subsurface tint color as a Color3\r\n */\r\n public set subsurfaceColor(value: Color3) {\r\n // TODO\r\n }\r\n\r\n /**\r\n * Sets the subsurface color texture.\r\n * @param value The subsurface tint texture or null\r\n */\r\n public set subsurfaceColorTexture(value: Nullable<BaseTexture>) {\r\n // TODO\r\n }\r\n\r\n // ========================================\r\n // FUZZ LAYER (Sheen)\r\n // ========================================\r\n\r\n /**\r\n * Configures fuzz for OpenPBR.\r\n * Enables fuzz and sets up proper configuration.\r\n */\r\n public configureFuzz(): void {\r\n // Currently no setup to do for OpenPBR\r\n }\r\n\r\n /**\r\n * Sets the fuzz weight.\r\n * TODO: Implementation pending OpenPBR fuzz feature availability.\r\n * @param value The fuzz weight value\r\n */\r\n public set fuzzWeight(value: number) {\r\n // TODO: Implement when OpenPBR fuzz is available\r\n // this._material.fuzzWeight = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz color.\r\n * TODO: Implementation pending OpenPBR fuzz feature availability.\r\n * @param value The fuzz color as a Color3\r\n */\r\n public set fuzzColor(value: Color3) {\r\n // TODO: Implement when OpenPBR fuzz is available\r\n // this._material.fuzzColor = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz color texture.\r\n * TODO: Implementation pending OpenPBR fuzz feature availability.\r\n * @param value The fuzz color texture or null\r\n */\r\n public set fuzzColorTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when OpenPBR fuzz is available\r\n // this._material.fuzzColorTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz roughness.\r\n * TODO: Implementation pending OpenPBR fuzz feature availability.\r\n * @param value The fuzz roughness value (0-1)\r\n */\r\n public set fuzzRoughness(value: number) {\r\n // TODO: Implement when OpenPBR fuzz is available\r\n // this._material.fuzzRoughness = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz roughness texture.\r\n * TODO: Implementation pending OpenPBR fuzz feature availability.\r\n * @param value The fuzz roughness texture or null\r\n */\r\n public set fuzzRoughnessTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when OpenPBR fuzz is available\r\n // this._material.fuzzRoughnessTexture = value;\r\n }\r\n\r\n // ========================================\r\n // ANISOTROPY\r\n // ========================================\r\n\r\n /**\r\n * Sets the specular roughness anisotropy of the OpenPBR material.\r\n * @param value The anisotropy intensity value\r\n */\r\n public set specularRoughnessAnisotropy(value: number) {\r\n this._material.specularRoughnessAnisotropy = value;\r\n }\r\n\r\n /**\r\n * Gets the specular roughness anisotropy of the OpenPBR material.\r\n * @returns The anisotropy intensity value\r\n */\r\n public get specularRoughnessAnisotropy(): number {\r\n return this._material.specularRoughnessAnisotropy;\r\n }\r\n\r\n /**\r\n * Sets the anisotropy rotation angle.\r\n * @param value The anisotropy rotation angle in radians\r\n */\r\n public set geometryTangentAngle(value: number) {\r\n this._material.geometryTangentAngle = value;\r\n }\r\n\r\n /**\r\n * Sets the geometry tangent texture for anisotropy.\r\n * Automatically enables using anisotropy from the tangent texture.\r\n * @param value The anisotropy texture or null\r\n */\r\n public set geometryTangentTexture(value: Nullable<BaseTexture>) {\r\n this._material.geometryTangentTexture = value;\r\n this._material._useSpecularRoughnessAnisotropyFromTangentTexture = true;\r\n }\r\n\r\n /**\r\n * Gets the geometry tangent texture for anisotropy.\r\n * @returns The anisotropy texture or null\r\n */\r\n public get geometryTangentTexture(): Nullable<BaseTexture> {\r\n return this._material.geometryTangentTexture;\r\n }\r\n\r\n /**\r\n * Configures glTF-style anisotropy for the OpenPBR material.\r\n * @param useGltfStyle Whether to use glTF-style anisotropy\r\n */\r\n public configureGltfStyleAnisotropy(useGltfStyle: boolean = true): void {\r\n this._material._useGltfStyleAnisotropy = useGltfStyle;\r\n }\r\n\r\n // ========================================\r\n // THIN FILM IRIDESCENCE\r\n // ========================================\r\n\r\n /**\r\n * Sets the iridescence weight.\r\n * TODO: Implementation pending OpenPBR iridescence feature availability.\r\n * @param value The iridescence intensity value\r\n */\r\n public set iridescenceWeight(value: number) {\r\n // TODO: Implement when OpenPBR iridescence is available\r\n // this._material.iridescenceWeight = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence IOR.\r\n * TODO: Implementation pending OpenPBR iridescence feature availability.\r\n * @param value The iridescence IOR value\r\n */\r\n public set iridescenceIor(value: number) {\r\n // TODO: Implement when OpenPBR iridescence is available\r\n // this._material.iridescenceIor = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence thickness minimum.\r\n * TODO: Implementation pending OpenPBR iridescence feature availability.\r\n * @param value The minimum thickness value in nanometers\r\n */\r\n public set iridescenceThicknessMinimum(value: number) {\r\n // TODO: Implement when OpenPBR iridescence is available\r\n // this._material.iridescenceThicknessMinimum = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence thickness maximum.\r\n * TODO: Implementation pending OpenPBR iridescence feature availability.\r\n * @param value The maximum thickness value in nanometers\r\n */\r\n public set iridescenceThicknessMaximum(value: number) {\r\n // TODO: Implement when OpenPBR iridescence is available\r\n // this._material.iridescenceThicknessMaximum = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence texture.\r\n * TODO: Implementation pending OpenPBR iridescence feature availability.\r\n * @param value The iridescence intensity texture or null\r\n */\r\n public set iridescenceTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when OpenPBR iridescence is available\r\n // this._material.iridescenceTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence thickness texture.\r\n * TODO: Implementation pending OpenPBR iridescence feature availability.\r\n * @param value The iridescence thickness texture or null\r\n */\r\n public set iridescenceThicknessTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when OpenPBR iridescence is available\r\n // this._material.iridescenceThicknessTexture = value;\r\n }\r\n\r\n // ========================================\r\n // UNLIT MATERIALS\r\n // ========================================\r\n\r\n /**\r\n * Sets whether the OpenPBR material is unlit.\r\n * @param value True to make the material unlit\r\n */\r\n public set unlit(value: boolean) {\r\n this._material.unlit = value;\r\n }\r\n\r\n // ========================================\r\n // GEOMETRY PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the geometry opacity of the OpenPBR material.\r\n * @param value The opacity value (0-1)\r\n */\r\n public set geometryOpacity(value: number) {\r\n this._material.geometryOpacity = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry opacity of the OpenPBR material.\r\n * @returns The opacity value (0-1)\r\n */\r\n public get geometryOpacity(): number {\r\n return this._material.geometryOpacity;\r\n }\r\n\r\n /**\r\n * Sets the geometry normal texture of the OpenPBR material.\r\n * @param value The normal texture or null\r\n */\r\n public set geometryNormalTexture(value: Nullable<BaseTexture>) {\r\n this._material.geometryNormalTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry normal texture of the OpenPBR material.\r\n * @returns The normal texture or null\r\n */\r\n public get geometryNormalTexture(): Nullable<BaseTexture> {\r\n return this._material.geometryNormalTexture;\r\n }\r\n\r\n /**\r\n * Sets the normal map inversions for the OpenPBR material.\r\n * Note: OpenPBR may handle normal map inversions differently or may not need them.\r\n * @param invertX Whether to invert the normal map on the X axis (may be ignored)\r\n * @param invertY Whether to invert the normal map on the Y axis (may be ignored)\r\n */\r\n public setNormalMapInversions(invertX: boolean, invertY: boolean): void {\r\n // OpenPBR handles normal map inversions differently or may not need them\r\n }\r\n\r\n /**\r\n * Sets the geometry coat normal texture of the OpenPBR material.\r\n * @param value The coat normal texture or null\r\n */\r\n public set geometryCoatNormalTexture(value: Nullable<BaseTexture>) {\r\n this._material.geometryCoatNormalTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry coat normal texture of the OpenPBR material.\r\n * @returns The coat normal texture or null\r\n */\r\n public get geometryCoatNormalTexture(): Nullable<BaseTexture> {\r\n return this._material.geometryCoatNormalTexture;\r\n }\r\n\r\n /**\r\n * Sets the geometry coat normal texture scale.\r\n * @param value The scale value for the coat normal texture\r\n */\r\n public set geometryCoatNormalTextureScale(value: number) {\r\n if (this._material.geometryCoatNormalTexture) {\r\n this._material.geometryCoatNormalTexture.level = value;\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"openPbrMaterialLoadingAdapter.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/openPbrMaterialLoadingAdapter.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,OAAO,6BAA6B;IAGtC;;;OAGG;IACH,YAAY,QAAkB;QAC1B,IAAI,CAAC,SAAS,GAAG,QAA2B,CAAC;IACjD,CAAC;I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AAC,OAAgB,EAAE,OAAgB;QAC5D,yEAAyE;IAC7E,CAAC;IAED;;;OAGG;IACH,IAAW,yBAAyB,CAAC,KAA4B;QAC7D,IAAI,CAAC,SAAS,CAAC,yBAAyB,GAAG,KAAK,CAAC;IACrD,CAAC;IAED;;;OAGG;IACH,IAAW,yBAAyB;QAChC,OAAO,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC;IACpD,CAAC;IAED;;;OAGG;IACH,IAAW,8BAA8B,CAAC,KAAa;QACnD,IAAI,IAAI,CAAC,SAAS,CAAC,yBAAyB,EAAE,CAAC;YAC3C,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAAC,KAAK,GAAG,KAAK,CAAC;QAC3D,CAAC;IACL,CAAC;CACJ","sourcesContent":["import type { OpenPBRMaterial } from \"core/Materials/PBR/openPbrMaterial\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { Color3 } from \"core/Maths/math.color\";\r\nimport type { IMaterialLoadingAdapter } from \"./materialLoadingAdapter\";\r\n\r\n/**\r\n * Material Loading Adapter for OpenPBR materials that provides a unified OpenPBR-like interface.\r\n */\r\nexport class OpenPBRMaterialLoadingAdapter implements IMaterialLoadingAdapter {\r\n private _material: OpenPBRMaterial;\r\n\r\n /**\r\n * Creates a new instance of the OpenPBRMaterialLoadingAdapter.\r\n * @param material - The OpenPBR material to adapt.\r\n */\r\n constructor(material: Material) {\r\n this._material = material as OpenPBRMaterial;\r\n }\r\n\r\n /**\r\n * Gets the underlying material\r\n */\r\n public get material(): OpenPBRMaterial {\r\n return this._material;\r\n }\r\n\r\n /**\r\n * Whether the material should be treated as unlit\r\n */\r\n public get isUnlit(): boolean {\r\n return this._material.unlit;\r\n }\r\n\r\n /**\r\n * Sets whether the material should be treated as unlit\r\n */\r\n public set isUnlit(value: boolean) {\r\n this._material.unlit = value;\r\n }\r\n\r\n // ========================================\r\n // CULLING PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets whether back face culling is enabled.\r\n * @param value True to enable back face culling\r\n */\r\n public set backFaceCulling(value: boolean) {\r\n this._material.backFaceCulling = value;\r\n }\r\n\r\n /**\r\n * Gets whether back face culling is enabled.\r\n * @returns True if back face culling is enabled\r\n */\r\n public get backFaceCulling(): boolean {\r\n return this._material.backFaceCulling;\r\n }\r\n\r\n /**\r\n * Sets whether two-sided lighting is enabled.\r\n * @param value True to enable two-sided lighting\r\n */\r\n public set twoSidedLighting(value: boolean) {\r\n this._material.twoSidedLighting = value;\r\n }\r\n\r\n /**\r\n * Gets whether two-sided lighting is enabled.\r\n * @returns True if two-sided lighting is enabled\r\n */\r\n public get twoSidedLighting(): boolean {\r\n return this._material.twoSidedLighting;\r\n }\r\n\r\n // ========================================\r\n // ALPHA PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets the alpha cutoff value for alpha testing.\r\n * Note: OpenPBR doesn't have a direct equivalent, so this is a no-op.\r\n * @param value The alpha cutoff threshold (ignored for OpenPBR)\r\n */\r\n public set alphaCutOff(value: number) {\r\n // OpenPBR doesn't have a direct equivalent, but could be implemented if needed\r\n }\r\n\r\n /**\r\n * Gets the alpha cutoff value.\r\n * @returns Default value of 0.5 (OpenPBR doesn't support this directly)\r\n */\r\n public get alphaCutOff(): number {\r\n return 0.5; // Default value\r\n }\r\n\r\n /**\r\n * Sets whether to use alpha from the base color texture.\r\n * Note: OpenPBR handles this differently through the baseColorTexture alpha channel.\r\n * @param value True to use alpha from base color texture (handled automatically in OpenPBR)\r\n */\r\n public set useAlphaFromBaseColorTexture(value: boolean) {\r\n this._material._useAlphaFromBaseColorTexture = value;\r\n }\r\n\r\n /**\r\n * Gets whether alpha is used from the base color texture.\r\n * @returns Always false for OpenPBR as it's handled automatically\r\n */\r\n public get useAlphaFromBaseColorTexture(): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets whether the transparency is treated as alpha coverage.\r\n */\r\n public get transparencyAsAlphaCoverage(): boolean {\r\n // OpenPBR doesn't support treating transparency as alpha coverage.\r\n return false;\r\n }\r\n\r\n /**\r\n * Sets/Gets whether the transparency is treated as alpha coverage\r\n */\r\n public set transparencyAsAlphaCoverage(value: boolean) {\r\n // OpenPBR doesn't support treating transparency as alpha coverage.\r\n }\r\n\r\n // ========================================\r\n // BASE PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the base color of the OpenPBR material.\r\n * @param value The base color as a Color3\r\n */\r\n public set baseColor(value: Color3) {\r\n this._material.baseColor = value;\r\n }\r\n\r\n /**\r\n * Gets the base color of the OpenPBR material.\r\n * @returns The base color as a Color3\r\n */\r\n public get baseColor(): Color3 {\r\n return this._material.baseColor;\r\n }\r\n\r\n /**\r\n * Sets the base color texture of the OpenPBR material.\r\n * @param value The base color texture or null\r\n */\r\n public set baseColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.baseColorTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base color texture of the OpenPBR material.\r\n * @returns The base color texture or null\r\n */\r\n public get baseColorTexture(): Nullable<BaseTexture> {\r\n return this._material.baseColorTexture;\r\n }\r\n\r\n /**\r\n * Sets the base diffuse roughness of the OpenPBR material.\r\n * @param value The diffuse roughness value (0-1)\r\n */\r\n public set baseDiffuseRoughness(value: number) {\r\n this._material.baseDiffuseRoughness = value;\r\n }\r\n\r\n /**\r\n * Gets the base diffuse roughness of the OpenPBR material.\r\n * @returns The diffuse roughness value (0-1)\r\n */\r\n public get baseDiffuseRoughness(): number {\r\n return this._material.baseDiffuseRoughness;\r\n }\r\n\r\n /**\r\n * Sets the base diffuse roughness texture of the OpenPBR material.\r\n * @param value The diffuse roughness texture or null\r\n */\r\n public set baseDiffuseRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.baseDiffuseRoughnessTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base diffuse roughness texture of the OpenPBR material.\r\n * @returns The diffuse roughness texture or null\r\n */\r\n public get baseDiffuseRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.baseDiffuseRoughnessTexture;\r\n }\r\n\r\n /**\r\n * Sets the base metalness value of the OpenPBR material.\r\n * @param value The metalness value (0-1)\r\n */\r\n public set baseMetalness(value: number) {\r\n this._material.baseMetalness = value;\r\n }\r\n\r\n /**\r\n * Gets the base metalness value of the OpenPBR material.\r\n * @returns The metalness value (0-1)\r\n */\r\n public get baseMetalness(): number {\r\n return this._material.baseMetalness;\r\n }\r\n\r\n /**\r\n * Sets the base metalness texture of the OpenPBR material.\r\n * @param value The metalness texture or null\r\n */\r\n public set baseMetalnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.baseMetalnessTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base metalness texture of the OpenPBR material.\r\n * @returns The metalness texture or null\r\n */\r\n public get baseMetalnessTexture(): Nullable<BaseTexture> {\r\n return this._material.baseMetalnessTexture;\r\n }\r\n\r\n /**\r\n * Sets whether to use roughness from the metallic texture's green channel.\r\n * @param value True to use green channel for roughness\r\n */\r\n public set useRoughnessFromMetallicTextureGreen(value: boolean) {\r\n this._material._useRoughnessFromMetallicTextureGreen = value;\r\n }\r\n\r\n /**\r\n * Sets whether to use metalness from the metallic texture's blue channel.\r\n * @param value True to use blue channel for metalness\r\n */\r\n public set useMetallicFromMetallicTextureBlue(value: boolean) {\r\n this._material._useMetallicFromMetallicTextureBlue = value;\r\n }\r\n\r\n // ========================================\r\n // SPECULAR PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures specular properties for OpenPBR material.\r\n * @param _enableEdgeColor Whether to enable edge color support (ignored for OpenPBR)\r\n */\r\n public enableSpecularEdgeColor(_enableEdgeColor: boolean = false): void {\r\n // OpenPBR already supports edge color natively, no configuration needed\r\n }\r\n\r\n /**\r\n * Sets the specular weight of the OpenPBR material.\r\n * @param value The specular weight value (0-1)\r\n */\r\n public set specularWeight(value: number) {\r\n this._material.specularWeight = value;\r\n }\r\n\r\n /**\r\n * Gets the specular weight of the OpenPBR material.\r\n * @returns The specular weight value (0-1)\r\n */\r\n public get specularWeight(): number {\r\n return this._material.specularWeight;\r\n }\r\n\r\n /**\r\n * Sets the specular weight texture of the OpenPBR material.\r\n * If the same texture is used for specular color, optimizes by using alpha channel for weight.\r\n * @param value The specular weight texture or null\r\n */\r\n public set specularWeightTexture(value: Nullable<BaseTexture>) {\r\n if (this._material.specularColorTexture === value) {\r\n this._material.specularWeightTexture = null;\r\n this._material._useSpecularWeightFromSpecularColorTexture = true;\r\n this._material._useSpecularWeightFromAlpha = true;\r\n } else {\r\n this._material.specularWeightTexture = value;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the specular weight texture of the OpenPBR material.\r\n * @returns The specular weight texture or null\r\n */\r\n public get specularWeightTexture(): Nullable<BaseTexture> {\r\n return this._material.specularWeightTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular color of the OpenPBR material.\r\n * @param value The specular color as a Color3\r\n */\r\n public set specularColor(value: Color3) {\r\n this._material.specularColor = value;\r\n }\r\n\r\n /**\r\n * Gets the specular color of the OpenPBR material.\r\n * @returns The specular color as a Color3\r\n */\r\n public get specularColor(): Color3 {\r\n return this._material.specularColor;\r\n }\r\n\r\n /**\r\n * Sets the specular color texture of the OpenPBR material.\r\n * If the same texture is used for specular weight, optimizes by using alpha channel for weight.\r\n * @param value The specular color texture or null\r\n */\r\n public set specularColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.specularColorTexture = value;\r\n if (this._material.specularWeightTexture === this._material.specularColorTexture) {\r\n this._material.specularWeightTexture = null;\r\n this._material._useSpecularWeightFromSpecularColorTexture = true;\r\n this._material._useSpecularWeightFromAlpha = true;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the specular color texture of the OpenPBR material.\r\n * @returns The specular color texture or null\r\n */\r\n public get specularColorTexture(): Nullable<BaseTexture> {\r\n return this._material.specularColorTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular roughness of the OpenPBR material.\r\n * @param value The roughness value (0-1)\r\n */\r\n public set specularRoughness(value: number) {\r\n this._material.specularRoughness = value;\r\n }\r\n\r\n /**\r\n * Gets the specular roughness of the OpenPBR material.\r\n * @returns The roughness value (0-1)\r\n */\r\n public get specularRoughness(): number {\r\n return this._material.specularRoughness;\r\n }\r\n\r\n /**\r\n * Sets the specular roughness texture of the OpenPBR material.\r\n * @param value The roughness texture or null\r\n */\r\n public set specularRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.specularRoughnessTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the specular roughness texture of the OpenPBR material.\r\n * @returns The roughness texture or null\r\n */\r\n public get specularRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.specularRoughnessTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular index of refraction (IOR) of the OpenPBR material.\r\n * @param value The IOR value\r\n */\r\n public set specularIor(value: number) {\r\n this._material.specularIor = value;\r\n }\r\n\r\n /**\r\n * Gets the specular index of refraction (IOR) of the OpenPBR material.\r\n * @returns The IOR value\r\n */\r\n public get specularIor(): number {\r\n return this._material.specularIor;\r\n }\r\n\r\n // ========================================\r\n // EMISSION PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the emission color of the OpenPBR material.\r\n * @param value The emission color as a Color3\r\n */\r\n public set emissionColor(value: Color3) {\r\n this._material.emissionColor = value;\r\n }\r\n\r\n /**\r\n * Gets the emission color of the OpenPBR material.\r\n * @returns The emission color as a Color3\r\n */\r\n public get emissionColor(): Color3 {\r\n return this._material.emissionColor;\r\n }\r\n\r\n /**\r\n * Sets the emission luminance of the OpenPBR material.\r\n * @param value The emission luminance value\r\n */\r\n public set emissionLuminance(value: number) {\r\n this._material.emissionLuminance = value;\r\n }\r\n\r\n /**\r\n * Gets the emission luminance of the OpenPBR material.\r\n * @returns The emission luminance value\r\n */\r\n public get emissionLuminance(): number {\r\n return this._material.emissionLuminance;\r\n }\r\n\r\n /**\r\n * Sets the emission color texture of the OpenPBR material.\r\n * @param value The emission texture or null\r\n */\r\n public set emissionColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.emissionColorTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the emission color texture of the OpenPBR material.\r\n * @returns The emission texture or null\r\n */\r\n public get emissionColorTexture(): Nullable<BaseTexture> {\r\n return this._material.emissionColorTexture;\r\n }\r\n\r\n // ========================================\r\n // AMBIENT OCCLUSION\r\n // ========================================\r\n\r\n /**\r\n * Sets the ambient occlusion texture of the OpenPBR material.\r\n * @param value The ambient occlusion texture or null\r\n */\r\n public set ambientOcclusionTexture(value: Nullable<BaseTexture>) {\r\n this._material.ambientOcclusionTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the ambient occlusion texture of the OpenPBR material.\r\n * @returns The ambient occlusion texture or null\r\n */\r\n public get ambientOcclusionTexture(): Nullable<BaseTexture> {\r\n return this._material.ambientOcclusionTexture;\r\n }\r\n\r\n /**\r\n * Sets the ambient occlusion texture strength by modifying the texture's level.\r\n * @param value The strength value (typically 0-1)\r\n */\r\n public set ambientOcclusionTextureStrength(value: number) {\r\n const texture = this._material.ambientOcclusionTexture;\r\n if (texture) {\r\n texture.level = value;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the ambient occlusion texture strength from the texture's level property.\r\n * @returns The strength value, defaults to 1.0 if no texture or level is set\r\n */\r\n public get ambientOcclusionTextureStrength(): number {\r\n const texture = this._material.ambientOcclusionTexture;\r\n return texture?.level ?? 1.0;\r\n }\r\n\r\n // ========================================\r\n // COAT PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures coat parameters for OpenPBR material.\r\n * OpenPBR coat is already built-in, so no configuration is needed.\r\n */\r\n public configureCoat(): void {\r\n // OpenPBR coat is already built-in, no configuration needed\r\n }\r\n\r\n /**\r\n * Sets the coat weight of the OpenPBR material.\r\n * @param value The coat weight value (0-1)\r\n */\r\n public set coatWeight(value: number) {\r\n this._material.coatWeight = value;\r\n }\r\n\r\n /**\r\n * Gets the coat weight of the OpenPBR material.\r\n * @returns The coat weight value (0-1)\r\n */\r\n public get coatWeight(): number {\r\n return this._material.coatWeight;\r\n }\r\n\r\n /**\r\n * Sets the coat weight texture of the OpenPBR material.\r\n * @param value The coat weight texture or null\r\n */\r\n public set coatWeightTexture(value: Nullable<BaseTexture>) {\r\n this._material.coatWeightTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the coat weight texture of the OpenPBR material.\r\n * @returns The coat weight texture or null\r\n */\r\n public get coatWeightTexture(): Nullable<BaseTexture> {\r\n return this._material.coatWeightTexture;\r\n }\r\n\r\n /**\r\n * Sets the coat color of the OpenPBR material.\r\n * @param value The coat color as a Color3\r\n */\r\n public set coatColor(value: Color3) {\r\n this._material.coatColor = value;\r\n }\r\n\r\n /**\r\n * Sets the coat color texture of the OpenPBR material.\r\n * @param value The coat color texture or null\r\n */\r\n public set coatColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.coatColorTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the coat roughness of the OpenPBR material.\r\n * @param value The coat roughness value (0-1)\r\n */\r\n public set coatRoughness(value: number) {\r\n this._material.coatRoughness = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness of the OpenPBR material.\r\n * @returns The coat roughness value (0-1)\r\n */\r\n public get coatRoughness(): number {\r\n return this._material.coatRoughness;\r\n }\r\n\r\n /**\r\n * Sets the coat roughness texture of the OpenPBR material.\r\n * @param value The coat roughness texture or null\r\n */\r\n public set coatRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.coatRoughnessTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness texture of the OpenPBR material.\r\n * @returns The coat roughness texture or null\r\n */\r\n public get coatRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.coatRoughnessTexture;\r\n }\r\n\r\n /**\r\n * Sets the coat index of refraction (IOR) of the OpenPBR material.\r\n */\r\n public set coatIor(value: number) {\r\n this._material.coatIor = value;\r\n }\r\n\r\n /**\r\n * Sets the coat darkening value of the OpenPBR material.\r\n * @param value The coat darkening value\r\n */\r\n public set coatDarkening(value: number) {\r\n this._material.coatDarkening = value;\r\n }\r\n\r\n /**\r\n * Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)\r\n */\r\n public set coatDarkeningTexture(value: Nullable<BaseTexture>) {\r\n this._material.coatDarkeningTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the coat roughness anisotropy.\r\n * TODO: Implementation pending OpenPBR coat anisotropy feature availability.\r\n * @param value The coat anisotropy intensity value\r\n */\r\n public set coatRoughnessAnisotropy(value: number) {\r\n this._material.coatRoughnessAnisotropy = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness anisotropy.\r\n * TODO: Implementation pending OpenPBR coat anisotropy feature availability.\r\n * @returns Currently returns 0 as coat anisotropy is not yet available\r\n */\r\n public get coatRoughnessAnisotropy(): number {\r\n return this._material.coatRoughnessAnisotropy;\r\n }\r\n\r\n /**\r\n * Sets the coat tangent angle for anisotropy.\r\n * TODO: Implementation pending OpenPBR coat anisotropy feature availability.\r\n * @param value The coat anisotropy rotation angle in radians\r\n */\r\n public set geometryCoatTangentAngle(value: number) {\r\n this._material.geometryCoatTangentAngle = value;\r\n }\r\n\r\n /**\r\n * Sets the coat tangent texture for anisotropy.\r\n * TODO: Implementation pending OpenPBR coat anisotropy feature availability.\r\n * @param value The coat anisotropy texture or null\r\n */\r\n public set geometryCoatTangentTexture(value: Nullable<BaseTexture>) {\r\n this._material.geometryCoatTangentTexture = value;\r\n if (value) {\r\n this._material._useCoatRoughnessAnisotropyFromTangentTexture = true;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the coat tangent texture for anisotropy.\r\n * TODO: Implementation pending OpenPBR coat anisotropy feature availability.\r\n * @returns Currently returns null as coat anisotropy is not yet available\r\n */\r\n public get geometryCoatTangentTexture(): Nullable<BaseTexture> {\r\n return this._material.geometryCoatTangentTexture;\r\n }\r\n\r\n // ========================================\r\n // TRANSMISSION LAYER\r\n // ========================================\r\n\r\n /**\r\n * Sets the transmission weight.\r\n * TODO: Implementation pending OpenPBR transmission feature availability.\r\n * @param value The transmission weight value (0-1)\r\n */\r\n public set transmissionWeight(value: number) {\r\n // TODO: Implement when OpenPBR transmission is available\r\n // this._material.transmissionWeight = value;\r\n }\r\n\r\n /**\r\n * Sets the transmission weight texture.\r\n * TODO: Implementation pending OpenPBR transmission feature availability.\r\n * @param value The transmission weight texture or null\r\n */\r\n public set transmissionWeightTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when OpenPBR transmission is available\r\n // this._material.transmissionWeightTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the transmission weight.\r\n * TODO: Implementation pending OpenPBR transmission feature availability.\r\n * @returns Currently returns 0 as transmission is not yet available\r\n */\r\n public get transmissionWeight(): number {\r\n // TODO: Implement when OpenPBR transmission is available\r\n // return this._material.transmissionWeight;\r\n return 0;\r\n }\r\n\r\n /**\r\n * Gets the transmission dispersion Abbe number.\r\n * @param value The Abbe number value\r\n */\r\n public set transmissionDispersionAbbeNumber(value: number) {\r\n // TODO: Implement when OpenPBR transmission dispersion is available\r\n }\r\n\r\n /**\r\n * Configures transmission for OpenPBR material.\r\n * TODO: Implementation pending OpenPBR transmission feature availability.\r\n */\r\n public configureTransmission(): void {\r\n // OpenPBR transmission will be configured differently when available\r\n }\r\n\r\n // ========================================\r\n // VOLUME PROPERTIES (Subsurface Scattering)\r\n // ========================================\r\n\r\n /**\r\n * Sets the attenuation distance for volume scattering.\r\n * TODO: Implementation pending OpenPBR volume feature availability.\r\n * @param value The attenuation distance value\r\n */\r\n public set transmissionDepth(value: number) {\r\n // TODO: Implement when OpenPBR volume properties are available\r\n // this._material.attenuationDistance = value;\r\n }\r\n\r\n /**\r\n * Sets the attenuation color for volume scattering.\r\n * TODO: Implementation pending OpenPBR volume feature availability.\r\n * @param value The attenuation color as a Color3\r\n */\r\n public set transmissionColor(value: Color3) {\r\n // TODO: Implement when OpenPBR volume properties are available\r\n // this._material.attenuationColor = value;\r\n }\r\n\r\n /**\r\n * Sets the thickness texture for volume scattering.\r\n * TODO: Implementation pending OpenPBR volume feature availability.\r\n * @param value The thickness texture or null\r\n */\r\n public set volumeThicknessTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when OpenPBR volume properties are available\r\n // this._material.thicknessTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the thickness factor for volume scattering.\r\n * TODO: Implementation pending OpenPBR volume feature availability.\r\n * @param value The thickness value\r\n */\r\n public set volumeThickness(value: number) {\r\n // TODO: Implement when OpenPBR volume properties are available\r\n // this._material.thickness = value;\r\n }\r\n\r\n // ========================================\r\n // SUBSURFACE PROPERTIES (Subsurface Scattering)\r\n // ========================================\r\n\r\n /**\r\n * Configures subsurface properties for PBR material\r\n */\r\n public configureSubsurface(): void {\r\n // TODO\r\n }\r\n\r\n /**\r\n * Sets the subsurface weight\r\n */\r\n public set subsurfaceWeight(value: number) {\r\n // TODO\r\n }\r\n\r\n public get subsurfaceWeight(): number {\r\n // TODO\r\n return 0;\r\n }\r\n\r\n /**\r\n * Sets the subsurface weight texture\r\n */\r\n public set subsurfaceWeightTexture(value: Nullable<BaseTexture>) {\r\n // TODO\r\n }\r\n\r\n /**\r\n * Sets the subsurface color.\r\n * @param value The subsurface tint color as a Color3\r\n */\r\n public set subsurfaceColor(value: Color3) {\r\n // TODO\r\n }\r\n\r\n /**\r\n * Sets the subsurface color texture.\r\n * @param value The subsurface tint texture or null\r\n */\r\n public set subsurfaceColorTexture(value: Nullable<BaseTexture>) {\r\n // TODO\r\n }\r\n\r\n // ========================================\r\n // FUZZ LAYER (Sheen)\r\n // ========================================\r\n\r\n /**\r\n * Configures fuzz for OpenPBR.\r\n * Enables fuzz and sets up proper configuration.\r\n */\r\n public configureFuzz(): void {\r\n // Currently no setup to do for OpenPBR\r\n }\r\n\r\n /**\r\n * Sets the fuzz weight.\r\n * TODO: Implementation pending OpenPBR fuzz feature availability.\r\n * @param value The fuzz weight value\r\n */\r\n public set fuzzWeight(value: number) {\r\n // TODO: Implement when OpenPBR fuzz is available\r\n // this._material.fuzzWeight = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz color.\r\n * TODO: Implementation pending OpenPBR fuzz feature availability.\r\n * @param value The fuzz color as a Color3\r\n */\r\n public set fuzzColor(value: Color3) {\r\n // TODO: Implement when OpenPBR fuzz is available\r\n // this._material.fuzzColor = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz color texture.\r\n * TODO: Implementation pending OpenPBR fuzz feature availability.\r\n * @param value The fuzz color texture or null\r\n */\r\n public set fuzzColorTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when OpenPBR fuzz is available\r\n // this._material.fuzzColorTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz roughness.\r\n * TODO: Implementation pending OpenPBR fuzz feature availability.\r\n * @param value The fuzz roughness value (0-1)\r\n */\r\n public set fuzzRoughness(value: number) {\r\n // TODO: Implement when OpenPBR fuzz is available\r\n // this._material.fuzzRoughness = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz roughness texture.\r\n * TODO: Implementation pending OpenPBR fuzz feature availability.\r\n * @param value The fuzz roughness texture or null\r\n */\r\n public set fuzzRoughnessTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when OpenPBR fuzz is available\r\n // this._material.fuzzRoughnessTexture = value;\r\n }\r\n\r\n // ========================================\r\n // ANISOTROPY\r\n // ========================================\r\n\r\n /**\r\n * Sets the specular roughness anisotropy of the OpenPBR material.\r\n * @param value The anisotropy intensity value\r\n */\r\n public set specularRoughnessAnisotropy(value: number) {\r\n this._material.specularRoughnessAnisotropy = value;\r\n }\r\n\r\n /**\r\n * Gets the specular roughness anisotropy of the OpenPBR material.\r\n * @returns The anisotropy intensity value\r\n */\r\n public get specularRoughnessAnisotropy(): number {\r\n return this._material.specularRoughnessAnisotropy;\r\n }\r\n\r\n /**\r\n * Sets the anisotropy rotation angle.\r\n * @param value The anisotropy rotation angle in radians\r\n */\r\n public set geometryTangentAngle(value: number) {\r\n this._material.geometryTangentAngle = value;\r\n }\r\n\r\n /**\r\n * Sets the geometry tangent texture for anisotropy.\r\n * Automatically enables using anisotropy from the tangent texture.\r\n * @param value The anisotropy texture or null\r\n */\r\n public set geometryTangentTexture(value: Nullable<BaseTexture>) {\r\n this._material.geometryTangentTexture = value;\r\n this._material._useSpecularRoughnessAnisotropyFromTangentTexture = true;\r\n }\r\n\r\n /**\r\n * Gets the geometry tangent texture for anisotropy.\r\n * @returns The anisotropy texture or null\r\n */\r\n public get geometryTangentTexture(): Nullable<BaseTexture> {\r\n return this._material.geometryTangentTexture;\r\n }\r\n\r\n /**\r\n * Configures glTF-style anisotropy for the OpenPBR material.\r\n * @param useGltfStyle Whether to use glTF-style anisotropy\r\n */\r\n public configureGltfStyleAnisotropy(useGltfStyle: boolean = true): void {\r\n this._material._useGltfStyleAnisotropy = useGltfStyle;\r\n }\r\n\r\n // ========================================\r\n // THIN FILM IRIDESCENCE\r\n // ========================================\r\n\r\n /**\r\n * Sets the thin film weight.\r\n * @param value The thin film weight value\r\n */\r\n public set thinFilmWeight(value: number) {\r\n this._material.thinFilmWeight = value;\r\n }\r\n\r\n /**\r\n * Sets the thin film IOR.\r\n * @param value The thin film IOR value\r\n */\r\n public set thinFilmIor(value: number) {\r\n this._material.thinFilmIor = value;\r\n }\r\n\r\n /**\r\n * Sets the thin film thickness minimum.\r\n * @param value The minimum thickness value in nanometers\r\n */\r\n public set thinFilmThicknessMinimum(value: number) {\r\n this._material.thinFilmThicknessMin = value / 1000.0; // Convert to micrometers for OpenPBR\r\n }\r\n\r\n /**\r\n * Sets the thin film thickness maximum.\r\n * @param value The maximum thickness value in nanometers\r\n */\r\n public set thinFilmThicknessMaximum(value: number) {\r\n this._material.thinFilmThickness = value / 1000.0; // Convert to micrometers for OpenPBR\r\n }\r\n\r\n /**\r\n * Sets the thin film weight texture.\r\n * @param value The thin film weight texture or null\r\n */\r\n public set thinFilmWeightTexture(value: Nullable<BaseTexture>) {\r\n this._material.thinFilmWeightTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the thin film thickness texture.\r\n * @param value The thin film thickness texture or null\r\n */\r\n public set thinFilmThicknessTexture(value: Nullable<BaseTexture>) {\r\n this._material.thinFilmThicknessTexture = value;\r\n this._material._useThinFilmThicknessFromTextureGreen = true;\r\n }\r\n\r\n // ========================================\r\n // UNLIT MATERIALS\r\n // ========================================\r\n\r\n /**\r\n * Sets whether the OpenPBR material is unlit.\r\n * @param value True to make the material unlit\r\n */\r\n public set unlit(value: boolean) {\r\n this._material.unlit = value;\r\n }\r\n\r\n // ========================================\r\n // GEOMETRY PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the geometry opacity of the OpenPBR material.\r\n * @param value The opacity value (0-1)\r\n */\r\n public set geometryOpacity(value: number) {\r\n this._material.geometryOpacity = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry opacity of the OpenPBR material.\r\n * @returns The opacity value (0-1)\r\n */\r\n public get geometryOpacity(): number {\r\n return this._material.geometryOpacity;\r\n }\r\n\r\n /**\r\n * Sets the geometry normal texture of the OpenPBR material.\r\n * @param value The normal texture or null\r\n */\r\n public set geometryNormalTexture(value: Nullable<BaseTexture>) {\r\n this._material.geometryNormalTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry normal texture of the OpenPBR material.\r\n * @returns The normal texture or null\r\n */\r\n public get geometryNormalTexture(): Nullable<BaseTexture> {\r\n return this._material.geometryNormalTexture;\r\n }\r\n\r\n /**\r\n * Sets the normal map inversions for the OpenPBR material.\r\n * Note: OpenPBR may handle normal map inversions differently or may not need them.\r\n * @param invertX Whether to invert the normal map on the X axis (may be ignored)\r\n * @param invertY Whether to invert the normal map on the Y axis (may be ignored)\r\n */\r\n public setNormalMapInversions(invertX: boolean, invertY: boolean): void {\r\n // OpenPBR handles normal map inversions differently or may not need them\r\n }\r\n\r\n /**\r\n * Sets the geometry coat normal texture of the OpenPBR material.\r\n * @param value The coat normal texture or null\r\n */\r\n public set geometryCoatNormalTexture(value: Nullable<BaseTexture>) {\r\n this._material.geometryCoatNormalTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry coat normal texture of the OpenPBR material.\r\n * @returns The coat normal texture or null\r\n */\r\n public get geometryCoatNormalTexture(): Nullable<BaseTexture> {\r\n return this._material.geometryCoatNormalTexture;\r\n }\r\n\r\n /**\r\n * Sets the geometry coat normal texture scale.\r\n * @param value The scale value for the coat normal texture\r\n */\r\n public set geometryCoatNormalTextureScale(value: number) {\r\n if (this._material.geometryCoatNormalTexture) {\r\n this._material.geometryCoatNormalTexture.level = value;\r\n }\r\n }\r\n}\r\n"]}
@@ -528,37 +528,32 @@ export declare class PBRMaterialLoadingAdapter implements IMaterialLoadingAdapte
528
528
  * Automatically enables iridescence.
529
529
  * @param value The iridescence intensity value
530
530
  */
531
- set iridescenceWeight(value: number);
531
+ set thinFilmWeight(value: number);
532
532
  /**
533
533
  * Sets the iridescence IOR (mapped to PBR iridescence.indexOfRefraction).
534
- * Automatically enables iridescence.
535
534
  * @param value The iridescence IOR value
536
535
  */
537
- set iridescenceIor(value: number);
536
+ set thinFilmIor(value: number);
538
537
  /**
539
538
  * Sets the iridescence thickness minimum (mapped to PBR iridescence.minimumThickness).
540
- * Automatically enables iridescence.
541
539
  * @param value The minimum thickness value in nanometers
542
540
  */
543
- set iridescenceThicknessMinimum(value: number);
541
+ set thinFilmThicknessMinimum(value: number);
544
542
  /**
545
543
  * Sets the iridescence thickness maximum (mapped to PBR iridescence.maximumThickness).
546
- * Automatically enables iridescence.
547
544
  * @param value The maximum thickness value in nanometers
548
545
  */
549
- set iridescenceThicknessMaximum(value: number);
546
+ set thinFilmThicknessMaximum(value: number);
550
547
  /**
551
- * Sets the iridescence texture (mapped to PBR iridescence.texture).
552
- * Automatically enables iridescence.
553
- * @param value The iridescence intensity texture or null
548
+ * Sets the thin film weight texture (mapped to PBR iridescence.texture).
549
+ * @param value The thin film weight texture or null
554
550
  */
555
- set iridescenceTexture(value: Nullable<BaseTexture>);
551
+ set thinFilmWeightTexture(value: Nullable<BaseTexture>);
556
552
  /**
557
553
  * Sets the iridescence thickness texture (mapped to PBR iridescence.thicknessTexture).
558
- * Automatically enables iridescence.
559
554
  * @param value The iridescence thickness texture or null
560
555
  */
561
- set iridescenceThicknessTexture(value: Nullable<BaseTexture>);
556
+ set thinFilmThicknessTexture(value: Nullable<BaseTexture>);
562
557
  /**
563
558
  * Sets the transmission dispersion value.
564
559
  * Note: PBR doesn't have direct dispersion support, so this stores it as metadata.
@@ -836,53 +836,43 @@ export class PBRMaterialLoadingAdapter {
836
836
  * Automatically enables iridescence.
837
837
  * @param value The iridescence intensity value
838
838
  */
839
- set iridescenceWeight(value) {
840
- this._material.iridescence.isEnabled = true;
839
+ set thinFilmWeight(value) {
840
+ this._material.iridescence.isEnabled = value > 0;
841
841
  this._material.iridescence.intensity = value;
842
842
  }
843
843
  /**
844
844
  * Sets the iridescence IOR (mapped to PBR iridescence.indexOfRefraction).
845
- * Automatically enables iridescence.
846
845
  * @param value The iridescence IOR value
847
846
  */
848
- set iridescenceIor(value) {
849
- this._material.iridescence.isEnabled = true;
847
+ set thinFilmIor(value) {
850
848
  this._material.iridescence.indexOfRefraction = value;
851
849
  }
852
850
  /**
853
851
  * Sets the iridescence thickness minimum (mapped to PBR iridescence.minimumThickness).
854
- * Automatically enables iridescence.
855
852
  * @param value The minimum thickness value in nanometers
856
853
  */
857
- set iridescenceThicknessMinimum(value) {
858
- this._material.iridescence.isEnabled = true;
854
+ set thinFilmThicknessMinimum(value) {
859
855
  this._material.iridescence.minimumThickness = value;
860
856
  }
861
857
  /**
862
858
  * Sets the iridescence thickness maximum (mapped to PBR iridescence.maximumThickness).
863
- * Automatically enables iridescence.
864
859
  * @param value The maximum thickness value in nanometers
865
860
  */
866
- set iridescenceThicknessMaximum(value) {
867
- this._material.iridescence.isEnabled = true;
861
+ set thinFilmThicknessMaximum(value) {
868
862
  this._material.iridescence.maximumThickness = value;
869
863
  }
870
864
  /**
871
- * Sets the iridescence texture (mapped to PBR iridescence.texture).
872
- * Automatically enables iridescence.
873
- * @param value The iridescence intensity texture or null
865
+ * Sets the thin film weight texture (mapped to PBR iridescence.texture).
866
+ * @param value The thin film weight texture or null
874
867
  */
875
- set iridescenceTexture(value) {
876
- this._material.iridescence.isEnabled = true;
868
+ set thinFilmWeightTexture(value) {
877
869
  this._material.iridescence.texture = value;
878
870
  }
879
871
  /**
880
872
  * Sets the iridescence thickness texture (mapped to PBR iridescence.thicknessTexture).
881
- * Automatically enables iridescence.
882
873
  * @param value The iridescence thickness texture or null
883
874
  */
884
- set iridescenceThicknessTexture(value) {
885
- this._material.iridescence.isEnabled = true;
875
+ set thinFilmThicknessTexture(value) {
886
876
  this._material.iridescence.thicknessTexture = value;
887
877
  }
888
878
  // ========================================
@@ -1 +1 @@
1
- {"version":3,"file":"pbrMaterialLoadingAdapter.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/pbrMaterialLoadingAdapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,yCAA8B;AAC/C,OAAO,EAAE,SAAS,EAAE,0CAA+B;AAGnD;;GAEG;AACH,MAAM,OAAO,yBAAyB;IAGlC;;;OAGG;IACH,YAAY,QAAkB;QAC1B,IAAI,CAAC,SAAS,GAAG,QAAuB,CAAC;QACzC,IAAI,CAAC,SAAS,CAAC,0BAA0B,GAAG,IAAI,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,OAAO,CAAC,KAAc;QAC7B,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,2CAA2C;IAC3C,qBAAqB;IACrB,2CAA2C;IAE3C;;;OAGG;IACH,IAAW,eAAe,CAAC,KAAc;QACrC,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AAC;IACL,CAAC;CACJ","sourcesContent":["import type { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Nullable } from \"core/types\";\r\nimport { Color3 } from \"core/Maths/math.color\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport type { IMaterialLoadingAdapter } from \"./materialLoadingAdapter\";\r\n\r\n/**\r\n * Material Loading Adapter for PBR materials that provides a unified OpenPBR-like interface.\r\n */\r\nexport class PBRMaterialLoadingAdapter implements IMaterialLoadingAdapter {\r\n private _material: PBRMaterial;\r\n\r\n /**\r\n * Creates a new instance of the PBRMaterialLoadingAdapter.\r\n * @param material - The PBR material to adapt.\r\n */\r\n constructor(material: Material) {\r\n this._material = material as PBRMaterial;\r\n this._material.enableSpecularAntiAliasing = true;\r\n }\r\n\r\n /**\r\n * Gets the underlying material\r\n */\r\n public get material(): PBRMaterial {\r\n return this._material;\r\n }\r\n\r\n /**\r\n * Whether the material should be treated as unlit\r\n */\r\n public get isUnlit(): boolean {\r\n return this._material.unlit;\r\n }\r\n\r\n /**\r\n * Sets whether the material should be treated as unlit\r\n */\r\n public set isUnlit(value: boolean) {\r\n this._material.unlit = value;\r\n }\r\n\r\n // ========================================\r\n // CULLING PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets whether back face culling is enabled.\r\n * @param value True to enable back face culling\r\n */\r\n public set backFaceCulling(value: boolean) {\r\n this._material.backFaceCulling = value;\r\n }\r\n\r\n /**\r\n * Gets whether back face culling is enabled.\r\n * @returns True if back face culling is enabled\r\n */\r\n public get backFaceCulling(): boolean {\r\n return this._material.backFaceCulling;\r\n }\r\n\r\n /**\r\n * Sets whether two-sided lighting is enabled.\r\n * @param value True to enable two-sided lighting\r\n */\r\n public set twoSidedLighting(value: boolean) {\r\n this._material.twoSidedLighting = value;\r\n }\r\n\r\n /**\r\n * Gets whether two-sided lighting is enabled.\r\n * @returns True if two-sided lighting is enabled\r\n */\r\n public get twoSidedLighting(): boolean {\r\n return this._material.twoSidedLighting;\r\n }\r\n\r\n // ========================================\r\n // ALPHA PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets the alpha cutoff value for alpha testing.\r\n * @param value The alpha cutoff threshold (0-1)\r\n */\r\n public set alphaCutOff(value: number) {\r\n this._material.alphaCutOff = value;\r\n }\r\n\r\n /**\r\n * Gets the alpha cutoff value.\r\n * @returns The alpha cutoff threshold (0-1)\r\n */\r\n public get alphaCutOff(): number {\r\n return this._material.alphaCutOff;\r\n }\r\n\r\n /**\r\n * Sets whether to use alpha from the albedo texture.\r\n * @param value True to use alpha from albedo texture\r\n */\r\n public set useAlphaFromBaseColorTexture(value: boolean) {\r\n this._material.useAlphaFromAlbedoTexture = value;\r\n }\r\n\r\n /**\r\n * Gets whether alpha is used from the albedo texture.\r\n * @returns True if using alpha from albedo texture\r\n */\r\n public get useAlphaFromBaseColorTexture(): boolean {\r\n return this._material.useAlphaFromAlbedoTexture;\r\n }\r\n\r\n /**\r\n * Gets whether the transparency is treated as alpha coverage.\r\n */\r\n public get transparencyAsAlphaCoverage(): boolean {\r\n return this._material.useRadianceOverAlpha || this._material.useSpecularOverAlpha;\r\n }\r\n\r\n /**\r\n * Sets/Gets whether the transparency is treated as alpha coverage\r\n */\r\n public set transparencyAsAlphaCoverage(value: boolean) {\r\n this._material.useRadianceOverAlpha = !value;\r\n this._material.useSpecularOverAlpha = !value;\r\n }\r\n\r\n // ========================================\r\n // BASE PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the base color of the material (mapped to PBR albedoColor).\r\n * @param value The base color as a Color3\r\n */\r\n public set baseColor(value: Color3) {\r\n this._material.albedoColor = value;\r\n }\r\n\r\n /**\r\n * Gets the base color of the material.\r\n * @returns The base color as a Color3\r\n */\r\n public get baseColor(): Color3 {\r\n return this._material.albedoColor;\r\n }\r\n\r\n /**\r\n * Sets the base color texture of the material (mapped to PBR albedoTexture).\r\n * @param value The base color texture or null\r\n */\r\n public set baseColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.albedoTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base color texture of the material.\r\n * @returns The base color texture or null\r\n */\r\n public get baseColorTexture(): Nullable<BaseTexture> {\r\n return this._material.albedoTexture;\r\n }\r\n\r\n /**\r\n * Sets the base diffuse roughness of the material.\r\n * @param value The diffuse roughness value (0-1)\r\n */\r\n public set baseDiffuseRoughness(value: number) {\r\n this._material.baseDiffuseRoughness = value;\r\n if (value > 0) {\r\n this._material.brdf.baseDiffuseModel = Constants.MATERIAL_DIFFUSE_MODEL_E_OREN_NAYAR;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the base diffuse roughness of the material.\r\n * @returns The diffuse roughness value (0-1), defaults to 0 if not set\r\n */\r\n public get baseDiffuseRoughness(): number {\r\n return this._material.baseDiffuseRoughness ?? 0;\r\n }\r\n\r\n /**\r\n * Sets the base diffuse roughness texture of the material.\r\n * @param value The diffuse roughness texture or null\r\n */\r\n public set baseDiffuseRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.baseDiffuseRoughnessTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base diffuse roughness texture of the material.\r\n * @returns The diffuse roughness texture or null\r\n */\r\n public get baseDiffuseRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.baseDiffuseRoughnessTexture;\r\n }\r\n\r\n /**\r\n * Sets the base metalness value of the material (mapped to PBR metallic).\r\n * @param value The metalness value (0-1)\r\n */\r\n public set baseMetalness(value: number) {\r\n this._material.metallic = value;\r\n }\r\n\r\n /**\r\n * Gets the base metalness value of the material.\r\n * @returns The metalness value (0-1), defaults to 1 if not set\r\n */\r\n public get baseMetalness(): number {\r\n return this._material.metallic ?? 1;\r\n }\r\n\r\n /**\r\n * Sets the base metalness texture of the material (mapped to PBR metallicTexture).\r\n * @param value The metalness texture or null\r\n */\r\n public set baseMetalnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.metallicTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base metalness texture of the material.\r\n * @returns The metalness texture or null\r\n */\r\n public get baseMetalnessTexture(): Nullable<BaseTexture> {\r\n return this._material.metallicTexture;\r\n }\r\n\r\n /**\r\n * Sets whether to use roughness from the metallic texture's green channel.\r\n * Also disables using roughness from the alpha channel when enabled.\r\n * @param value True to use green channel for roughness\r\n */\r\n public set useRoughnessFromMetallicTextureGreen(value: boolean) {\r\n this._material.useRoughnessFromMetallicTextureGreen = value;\r\n this._material.useRoughnessFromMetallicTextureAlpha = !value;\r\n }\r\n\r\n /**\r\n * Sets whether to use metalness from the metallic texture's blue channel.\r\n * @param value True to use blue channel for metalness\r\n */\r\n public set useMetallicFromMetallicTextureBlue(value: boolean) {\r\n this._material.useMetallnessFromMetallicTextureBlue = value;\r\n }\r\n\r\n // ========================================\r\n // SPECULAR PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures specular properties and optionally enables OpenPBR BRDF model for edge color support.\r\n * @param enableEdgeColor Whether to enable OpenPBR BRDF models for edge color support\r\n */\r\n public enableSpecularEdgeColor(enableEdgeColor: boolean = false): void {\r\n if (enableEdgeColor) {\r\n this._material.brdf.dielectricSpecularModel = Constants.MATERIAL_DIELECTRIC_SPECULAR_MODEL_OPENPBR;\r\n this._material.brdf.conductorSpecularModel = Constants.MATERIAL_CONDUCTOR_SPECULAR_MODEL_OPENPBR;\r\n }\r\n }\r\n\r\n /**\r\n * Sets the specular weight (mapped to PBR metallicF0Factor).\r\n * @param value The specular weight value\r\n */\r\n public set specularWeight(value: number) {\r\n this._material.metallicF0Factor = value;\r\n }\r\n\r\n /**\r\n * Gets the specular weight.\r\n * @returns The specular weight value, defaults to 1 if not set\r\n */\r\n public get specularWeight(): number {\r\n return this._material.metallicF0Factor ?? 1;\r\n }\r\n\r\n /**\r\n * Sets the specular weight texture (mapped to PBR metallicReflectanceTexture).\r\n * Configures the material to use only metalness from this texture when set.\r\n * @param value The specular weight texture or null\r\n */\r\n public set specularWeightTexture(value: Nullable<BaseTexture>) {\r\n if (value) {\r\n this._material.metallicReflectanceTexture = value;\r\n this._material.useOnlyMetallicFromMetallicReflectanceTexture = true;\r\n } else {\r\n this._material.metallicReflectanceTexture = null;\r\n this._material.useOnlyMetallicFromMetallicReflectanceTexture = false;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the specular weight texture.\r\n * @returns The specular weight texture or null\r\n */\r\n public get specularWeightTexture(): Nullable<BaseTexture> {\r\n return this._material.metallicReflectanceTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular color (mapped to PBR metallicReflectanceColor).\r\n * @param value The specular color as a Color3\r\n */\r\n public set specularColor(value: Color3) {\r\n this._material.metallicReflectanceColor = value;\r\n }\r\n\r\n /**\r\n * Gets the specular color.\r\n * @returns The specular color as a Color3\r\n */\r\n public get specularColor(): Color3 {\r\n return this._material.metallicReflectanceColor;\r\n }\r\n\r\n /**\r\n * Sets the specular color texture (mapped to PBR reflectanceTexture).\r\n * @param value The specular color texture or null\r\n */\r\n public set specularColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.reflectanceTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the specular color texture.\r\n * @returns The specular color texture or null\r\n */\r\n public get specularColorTexture(): Nullable<BaseTexture> {\r\n return this._material.reflectanceTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular roughness (mapped to PBR roughness).\r\n * @param value The roughness value (0-1)\r\n */\r\n public set specularRoughness(value: number) {\r\n this._material.roughness = value;\r\n }\r\n\r\n /**\r\n * Gets the specular roughness.\r\n * @returns The roughness value (0-1), defaults to 1 if not set\r\n */\r\n public get specularRoughness(): number {\r\n return this._material.roughness ?? 1;\r\n }\r\n\r\n /**\r\n * Sets the specular roughness texture.\r\n * Note: PBR uses the same texture for both metallic and roughness,\r\n * so this only sets the texture if no base metalness texture exists.\r\n * @param value The roughness texture or null\r\n */\r\n public set specularRoughnessTexture(value: Nullable<BaseTexture>) {\r\n // PBR uses the same texture for both metallic and roughness\r\n if (!this.baseMetalnessTexture) {\r\n this._material.metallicTexture = value;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the specular roughness texture.\r\n * @returns The roughness texture (same as metallic texture for PBR) or null\r\n */\r\n public get specularRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.metallicTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular index of refraction (mapped to PBR indexOfRefraction).\r\n * @param value The IOR value\r\n */\r\n public set specularIor(value: number) {\r\n this._material.indexOfRefraction = value;\r\n }\r\n\r\n /**\r\n * Gets the specular index of refraction.\r\n * @returns The IOR value\r\n */\r\n public get specularIor(): number {\r\n return this._material.indexOfRefraction;\r\n }\r\n\r\n // ========================================\r\n // EMISSION PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the emission color (mapped to PBR emissiveColor).\r\n * @param value The emission color as a Color3\r\n */\r\n public set emissionColor(value: Color3) {\r\n this._material.emissiveColor = value;\r\n }\r\n\r\n /**\r\n * Gets the emission color.\r\n * @returns The emission color as a Color3\r\n */\r\n public get emissionColor(): Color3 {\r\n return this._material.emissiveColor;\r\n }\r\n\r\n /**\r\n * Sets the emission luminance/intensity (mapped to PBR emissiveIntensity).\r\n * @param value The emission intensity value\r\n */\r\n public set emissionLuminance(value: number) {\r\n this._material.emissiveIntensity = value;\r\n }\r\n\r\n /**\r\n * Gets the emission luminance/intensity.\r\n * @returns The emission intensity value\r\n */\r\n public get emissionLuminance(): number {\r\n return this._material.emissiveIntensity;\r\n }\r\n\r\n /**\r\n * Sets the emission color texture (mapped to PBR emissiveTexture).\r\n * @param value The emission texture or null\r\n */\r\n public set emissionColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.emissiveTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the emission color texture.\r\n * @returns The emission texture or null\r\n */\r\n public get emissionColorTexture(): Nullable<BaseTexture> {\r\n return this._material.emissiveTexture;\r\n }\r\n\r\n // ========================================\r\n // AMBIENT OCCLUSION\r\n // ========================================\r\n\r\n /**\r\n * Sets the ambient occlusion texture (mapped to PBR ambientTexture).\r\n * Automatically enables grayscale mode when set.\r\n * @param value The ambient occlusion texture or null\r\n */\r\n public set ambientOcclusionTexture(value: Nullable<BaseTexture>) {\r\n this._material.ambientTexture = value;\r\n if (value) {\r\n this._material.useAmbientInGrayScale = true;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the ambient occlusion texture.\r\n * @returns The ambient occlusion texture or null\r\n */\r\n public get ambientOcclusionTexture(): Nullable<BaseTexture> {\r\n return this._material.ambientTexture;\r\n }\r\n\r\n /**\r\n * Sets the ambient occlusion texture strength.\r\n * @param value The strength value (typically 0-1)\r\n */\r\n public set ambientOcclusionTextureStrength(value: number) {\r\n this._material.ambientTextureStrength = value;\r\n }\r\n\r\n /**\r\n * Gets the ambient occlusion texture strength.\r\n * @returns The strength value, defaults to 1.0 if not set\r\n */\r\n public get ambientOcclusionTextureStrength(): number {\r\n return this._material.ambientTextureStrength ?? 1.0;\r\n }\r\n\r\n // ========================================\r\n // COAT PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures clear coat for PBR material.\r\n * Enables clear coat and sets up proper configuration.\r\n */\r\n public configureCoat(): void {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.useRoughnessFromMainTexture = false;\r\n this._material.clearCoat.remapF0OnInterfaceChange = false;\r\n }\r\n\r\n /**\r\n * Sets the coat weight (mapped to PBR clearCoat.intensity).\r\n * Automatically enables clear coat.\r\n * @param value The coat weight value (0-1)\r\n */\r\n public set coatWeight(value: number) {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.intensity = value;\r\n }\r\n\r\n /**\r\n * Gets the coat weight.\r\n * @returns The coat weight value\r\n */\r\n public get coatWeight(): number {\r\n return this._material.clearCoat.intensity;\r\n }\r\n\r\n /**\r\n * Sets the coat weight texture (mapped to PBR clearCoat.texture).\r\n * Automatically enables clear coat.\r\n * @param value The coat weight texture or null\r\n */\r\n public set coatWeightTexture(value: Nullable<BaseTexture>) {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.texture = value;\r\n }\r\n\r\n /**\r\n * Gets the coat weight texture.\r\n * @returns The coat weight texture or null\r\n */\r\n public get coatWeightTexture(): Nullable<BaseTexture> {\r\n return this._material.clearCoat.texture;\r\n }\r\n\r\n /**\r\n * Sets the coat color (mapped to PBR clearCoat.tintColor).\r\n * @param value The coat tint color as a Color3\r\n */\r\n public set coatColor(value: Color3) {\r\n this._material.clearCoat.isTintEnabled = value != Color3.White();\r\n this._material.clearCoat.tintColor = value;\r\n }\r\n\r\n /**\r\n * Sets the coat color texture (mapped to PBR clearCoat.tintTexture).\r\n * @param value The coat color texture or null\r\n */\r\n public set coatColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.clearCoat.tintTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the coat roughness (mapped to PBR clearCoat.roughness).\r\n * Automatically enables clear coat.\r\n * @param value The coat roughness value (0-1)\r\n */\r\n public set coatRoughness(value: number) {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.roughness = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness.\r\n * @returns The coat roughness value, defaults to 0 if not set\r\n */\r\n public get coatRoughness(): number {\r\n return this._material.clearCoat.roughness ?? 0;\r\n }\r\n\r\n /**\r\n * Sets the coat roughness texture (mapped to PBR clearCoat.textureRoughness).\r\n * Automatically enables clear coat and disables using roughness from main texture.\r\n * @param value The coat roughness texture or null\r\n */\r\n public set coatRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.useRoughnessFromMainTexture = false;\r\n this._material.clearCoat.textureRoughness = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness texture.\r\n * @returns The coat roughness texture or null\r\n */\r\n public get coatRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.clearCoat.textureRoughness;\r\n }\r\n\r\n /**\r\n * Sets the coat index of refraction (IOR).\r\n */\r\n public set coatIor(value: number) {\r\n this._material.clearCoat.indexOfRefraction = value;\r\n }\r\n\r\n /**\r\n * Sets the coat darkening value.\r\n * Note: PBR doesn't have a direct coat darkening property, so this is a no-op.\r\n * @param value The coat darkening value (ignored for PBR)\r\n */\r\n public set coatDarkening(value: number) {\r\n // PBR doesn't have a coat darkening property\r\n }\r\n\r\n /**\r\n * Sets the coat darkening texture\r\n * @param value The coat darkening texture or null\r\n */\r\n public set coatDarkeningTexture(value: Nullable<BaseTexture>) {\r\n // PBR doesn't have a coat darkening property\r\n }\r\n\r\n /**\r\n * Sets the coat roughness anisotropy.\r\n * Note: PBR clearCoat doesn't support anisotropy yet, so this is a placeholder.\r\n * @param value The coat anisotropy intensity value (currently ignored)\r\n */\r\n public set coatRoughnessAnisotropy(value: number) {\r\n // TODO: Implement when PBR clearCoat anisotropy becomes available\r\n // this._material.clearCoat.anisotropy = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness anisotropy.\r\n * Note: PBR clearCoat doesn't support anisotropy yet, so this returns 0.\r\n * @returns Currently returns 0 as clearCoat anisotropy is not yet available\r\n */\r\n public get coatRoughnessAnisotropy(): number {\r\n // TODO: Implement when PBR clearCoat anisotropy becomes available\r\n // return this._material.clearCoat.anisotropy ?? 0;\r\n return 0;\r\n }\r\n\r\n /**\r\n * Sets the coat tangent angle for anisotropy.\r\n * Note: PBR clearCoat doesn't support anisotropy yet, so this is a placeholder.\r\n * @param value The coat anisotropy rotation angle in radians (currently ignored)\r\n */\r\n public set geometryCoatTangentAngle(value: number) {\r\n // TODO: Implement when PBR clearCoat anisotropy becomes available\r\n // this._material.clearCoat.anisotropyAngle = value;\r\n }\r\n\r\n /**\r\n * Sets the coat tangent texture for anisotropy.\r\n * Note: PBR clearCoat doesn't support anisotropy textures yet, so this is a placeholder.\r\n * @param value The coat anisotropy texture (currently ignored)\r\n */\r\n public set geometryCoatTangentTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when PBR clearCoat anisotropy becomes available\r\n // this._material.clearCoat.anisotropyTangentTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the coat tangent texture for anisotropy.\r\n * Note: PBR clearCoat doesn't support anisotropy textures yet, so this returns null.\r\n * @returns Currently returns null as clearCoat anisotropy is not yet available\r\n */\r\n public get geometryCoatTangentTexture(): Nullable<BaseTexture> {\r\n // TODO: Implement when PBR clearCoat anisotropy becomes available\r\n // return this._material.clearCoat.anisotropyTangentTexture;\r\n return null;\r\n }\r\n\r\n // ========================================\r\n // TRANSMISSION LAYER\r\n // ========================================\r\n\r\n /**\r\n * Sets the transmission weight (mapped to PBR subSurface.refractionIntensity).\r\n * Enables refraction when value \\> 0.\r\n * @param value The transmission weight value (0-1)\r\n */\r\n public set transmissionWeight(value: number) {\r\n this._material.subSurface.isRefractionEnabled = value > 0;\r\n this._material.subSurface.refractionIntensity = value;\r\n }\r\n\r\n /**\r\n * Gets the transmission weight.\r\n * @returns The transmission weight value\r\n */\r\n public get transmissionWeight(): number {\r\n return this._material.subSurface.refractionIntensity;\r\n }\r\n\r\n /**\r\n * Sets the transmission weight texture (mapped to PBR subSurface.refractionIntensityTexture).\r\n * Automatically enables refraction and glTF-style textures.\r\n * @param value The transmission weight texture or null\r\n */\r\n public set transmissionWeightTexture(value: Nullable<BaseTexture>) {\r\n this._material.subSurface.isRefractionEnabled = true;\r\n this._material.subSurface.refractionIntensityTexture = value;\r\n this._material.subSurface.useGltfStyleTextures = true;\r\n }\r\n\r\n /**\r\n * Sets the attenuation distance for volume scattering.\r\n * @param value The attenuation distance value\r\n */\r\n public set transmissionDepth(value: number) {\r\n this._material.subSurface.tintColorAtDistance = value;\r\n }\r\n\r\n /**\r\n * Sets the attenuation color (mapped to PBR subSurface.tintColor).\r\n * @param value The attenuation color as a Color3\r\n */\r\n public set transmissionColor(value: Color3) {\r\n this._material.subSurface.tintColor = value;\r\n }\r\n\r\n /**\r\n * Gets the transmission dispersion Abbe number.\r\n * @param value The Abbe number value\r\n */\r\n public set transmissionDispersionAbbeNumber(value: number) {\r\n if (value > 0) {\r\n this._material.subSurface.isDispersionEnabled = true;\r\n this._material.subSurface.dispersion = 20.0 / value;\r\n } else {\r\n this._material.subSurface.isDispersionEnabled = false;\r\n this._material.subSurface.dispersion = 0;\r\n }\r\n }\r\n\r\n /**\r\n * Configures transmission for thin-surface transmission (KHR_materials_transmission).\r\n * Sets up the material for proper thin-surface transmission behavior.\r\n */\r\n public configureTransmission(): void {\r\n // Since this extension models thin-surface transmission only, we must make IOR = 1.0\r\n this._material.subSurface.volumeIndexOfRefraction = 1.0;\r\n // Albedo colour will tint transmission.\r\n this._material.subSurface.useAlbedoToTintRefraction = true;\r\n this._material.subSurface.minimumThickness = 0.0;\r\n this._material.subSurface.maximumThickness = 0.0;\r\n }\r\n\r\n // ========================================\r\n // VOLUME PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets the thickness texture (mapped to PBR subSurface.thicknessTexture).\r\n * Automatically enables refraction.\r\n * @param value The thickness texture or null\r\n */\r\n public set volumeThicknessTexture(value: Nullable<BaseTexture>) {\r\n this._material.subSurface.thicknessTexture = value;\r\n this._material.subSurface.useGltfStyleTextures = true;\r\n }\r\n\r\n /**\r\n * Sets the thickness factor (mapped to PBR subSurface.maximumThickness).\r\n * Automatically enables refraction.\r\n * @param value The thickness value\r\n */\r\n public set volumeThickness(value: number) {\r\n this._material.subSurface.minimumThickness = 0.0;\r\n this._material.subSurface.maximumThickness = value;\r\n this._material.subSurface.useThicknessAsDepth = true;\r\n if (value > 0) {\r\n this._material.subSurface.volumeIndexOfRefraction = this._material.indexOfRefraction;\r\n }\r\n }\r\n\r\n // ========================================\r\n // SUBSURFACE PROPERTIES (Subsurface Scattering)\r\n // ========================================\r\n\r\n /**\r\n * Configures subsurface properties for PBR material\r\n */\r\n public configureSubsurface(): void {\r\n this._material.subSurface.useGltfStyleTextures = true;\r\n\r\n // Since this extension models thin-surface transmission only, we must make the\r\n // internal IOR == 1.0 and set the thickness to 0.\r\n this._material.subSurface.volumeIndexOfRefraction = 1.0;\r\n this._material.subSurface.minimumThickness = 0.0;\r\n this._material.subSurface.maximumThickness = 0.0;\r\n\r\n // Tint color will be used for transmission.\r\n this._material.subSurface.useAlbedoToTintTranslucency = false;\r\n }\r\n\r\n /**\r\n * Sets the subsurface weight\r\n */\r\n public set subsurfaceWeight(value: number) {\r\n this._material.subSurface.isTranslucencyEnabled = value > 0;\r\n this._material.subSurface.translucencyIntensity = value;\r\n }\r\n\r\n /**\r\n * Gets the subsurface weight\r\n * @returns The subsurface weight value\r\n */\r\n public get subsurfaceWeight(): number {\r\n return this._material.subSurface.isTranslucencyEnabled ? this._material.subSurface.translucencyIntensity : 0;\r\n }\r\n\r\n /**\r\n * Sets the subsurface weight texture\r\n */\r\n public set subsurfaceWeightTexture(value: Nullable<BaseTexture>) {\r\n this._material.subSurface.translucencyIntensityTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the subsurface color.\r\n * @param value The subsurface tint color as a Color3\r\n */\r\n public set subsurfaceColor(value: Color3) {\r\n this._material.subSurface.tintColor = value;\r\n }\r\n\r\n /**\r\n * Sets the subsurface color texture.\r\n * @param value The subsurface tint texture or null\r\n */\r\n public set subsurfaceColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.subSurface.translucencyColorTexture = value;\r\n }\r\n\r\n // ========================================\r\n // FUZZ LAYER (Sheen)\r\n // ========================================\r\n\r\n /**\r\n * Configures sheen for PBR material.\r\n * Enables sheen and sets up proper configuration.\r\n */\r\n public configureFuzz(): void {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.useRoughnessFromMainTexture = false;\r\n this._material.sheen.albedoScaling = true;\r\n }\r\n\r\n /**\r\n * Sets the sheen weight (mapped to PBR sheen.intensity).\r\n * Automatically enables sheen.\r\n * @param value The sheen weight value\r\n */\r\n public set fuzzWeight(value: number) {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.intensity = value;\r\n }\r\n\r\n /**\r\n * Sets the sheen color (mapped to PBR sheen.color).\r\n * Automatically enables sheen.\r\n * @param value The sheen color as a Color3\r\n */\r\n public set fuzzColor(value: Color3) {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.color = value;\r\n }\r\n\r\n /**\r\n * Sets the sheen color texture (mapped to PBR sheen.texture).\r\n * Automatically enables sheen.\r\n * @param value The sheen color texture or null\r\n */\r\n public set fuzzColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.texture = value;\r\n }\r\n\r\n /**\r\n * Sets the sheen roughness (mapped to PBR sheen.roughness).\r\n * Automatically enables sheen.\r\n * @param value The sheen roughness value (0-1)\r\n */\r\n public set fuzzRoughness(value: number) {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.roughness = value;\r\n }\r\n\r\n /**\r\n * Sets the sheen roughness texture (mapped to PBR sheen.textureRoughness).\r\n * Automatically enables sheen.\r\n * @param value The sheen roughness texture or null\r\n */\r\n public set fuzzRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.textureRoughness = value;\r\n }\r\n\r\n // ========================================\r\n // ANISOTROPY\r\n // ========================================\r\n\r\n /**\r\n * Sets the specular roughness anisotropy (mapped to PBR anisotropy.intensity).\r\n * Automatically enables anisotropy.\r\n * @param value The anisotropy intensity value\r\n */\r\n public set specularRoughnessAnisotropy(value: number) {\r\n this._material.anisotropy.isEnabled = true;\r\n this._material.anisotropy.intensity = value;\r\n }\r\n\r\n /**\r\n * Gets the specular roughness anisotropy.\r\n * @returns The anisotropy intensity value\r\n */\r\n public get specularRoughnessAnisotropy(): number {\r\n return this._material.anisotropy.intensity;\r\n }\r\n\r\n /**\r\n * Sets the anisotropy rotation (mapped to PBR anisotropy.angle).\r\n * Automatically enables anisotropy.\r\n * @param value The anisotropy rotation angle in radians\r\n */\r\n public set geometryTangentAngle(value: number) {\r\n this._material.anisotropy.isEnabled = true;\r\n this._material.anisotropy.angle = value;\r\n }\r\n\r\n /**\r\n * Sets the geometry tangent texture (mapped to PBR anisotropy.texture).\r\n * Automatically enables anisotropy.\r\n * @param value The anisotropy texture or null\r\n */\r\n public set geometryTangentTexture(value: Nullable<BaseTexture>) {\r\n this._material.anisotropy.isEnabled = true;\r\n this._material.anisotropy.texture = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry tangent texture.\r\n * @returns The anisotropy texture or null\r\n */\r\n public get geometryTangentTexture(): Nullable<BaseTexture> {\r\n return this._material.anisotropy.texture;\r\n }\r\n\r\n /**\r\n * Configures glTF-style anisotropy for the material.\r\n * Note: PBR materials don't need this configuration, so this is a no-op.\r\n * @param useGltfStyle Whether to use glTF-style anisotropy (ignored for PBR)\r\n */\r\n public configureGltfStyleAnisotropy(useGltfStyle: boolean = true): void {\r\n // PBR materials don't need this configuration\r\n }\r\n\r\n // ========================================\r\n // THIN FILM IRIDESCENCE\r\n // ========================================\r\n\r\n /**\r\n * Sets the iridescence weight (mapped to PBR iridescence.intensity).\r\n * Automatically enables iridescence.\r\n * @param value The iridescence intensity value\r\n */\r\n public set iridescenceWeight(value: number) {\r\n this._material.iridescence.isEnabled = true;\r\n this._material.iridescence.intensity = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence IOR (mapped to PBR iridescence.indexOfRefraction).\r\n * Automatically enables iridescence.\r\n * @param value The iridescence IOR value\r\n */\r\n public set iridescenceIor(value: number) {\r\n this._material.iridescence.isEnabled = true;\r\n this._material.iridescence.indexOfRefraction = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence thickness minimum (mapped to PBR iridescence.minimumThickness).\r\n * Automatically enables iridescence.\r\n * @param value The minimum thickness value in nanometers\r\n */\r\n public set iridescenceThicknessMinimum(value: number) {\r\n this._material.iridescence.isEnabled = true;\r\n this._material.iridescence.minimumThickness = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence thickness maximum (mapped to PBR iridescence.maximumThickness).\r\n * Automatically enables iridescence.\r\n * @param value The maximum thickness value in nanometers\r\n */\r\n public set iridescenceThicknessMaximum(value: number) {\r\n this._material.iridescence.isEnabled = true;\r\n this._material.iridescence.maximumThickness = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence texture (mapped to PBR iridescence.texture).\r\n * Automatically enables iridescence.\r\n * @param value The iridescence intensity texture or null\r\n */\r\n public set iridescenceTexture(value: Nullable<BaseTexture>) {\r\n this._material.iridescence.isEnabled = true;\r\n this._material.iridescence.texture = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence thickness texture (mapped to PBR iridescence.thicknessTexture).\r\n * Automatically enables iridescence.\r\n * @param value The iridescence thickness texture or null\r\n */\r\n public set iridescenceThicknessTexture(value: Nullable<BaseTexture>) {\r\n this._material.iridescence.isEnabled = true;\r\n this._material.iridescence.thicknessTexture = value;\r\n }\r\n\r\n // ========================================\r\n // DISPERSION\r\n // ========================================\r\n\r\n /**\r\n * Sets the transmission dispersion value.\r\n * Note: PBR doesn't have direct dispersion support, so this stores it as metadata.\r\n * @param value The dispersion value (stored as metadata)\r\n */\r\n public set transmissionDispersion(value: number) {\r\n // PBR doesn't have a direct dispersion property, this would need custom shader modification\r\n // For now, we'll store it as metadata\r\n (this._material as any)._dispersion = value;\r\n }\r\n\r\n // ========================================\r\n // UNLIT MATERIALS\r\n // ========================================\r\n\r\n /**\r\n * Sets whether the material is unlit.\r\n * @param value True to make the material unlit\r\n */\r\n public set unlit(value: boolean) {\r\n this._material.unlit = value;\r\n }\r\n\r\n // ========================================\r\n // GEOMETRY PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the geometry opacity (mapped to PBR alpha).\r\n * @param value The opacity value (0-1)\r\n */\r\n public set geometryOpacity(value: number) {\r\n this._material.alpha = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry opacity.\r\n * @returns The opacity value (0-1)\r\n */\r\n public get geometryOpacity(): number {\r\n return this._material.alpha;\r\n }\r\n\r\n /**\r\n * Sets the geometry normal texture (mapped to PBR bumpTexture).\r\n * Also forces irradiance computation in fragment shader for better lighting.\r\n * @param value The normal texture or null\r\n */\r\n public set geometryNormalTexture(value: Nullable<BaseTexture>) {\r\n this._material.bumpTexture = value;\r\n this._material.forceIrradianceInFragment = true;\r\n }\r\n\r\n /**\r\n * Gets the geometry normal texture.\r\n * @returns The normal texture or null\r\n */\r\n public get geometryNormalTexture(): Nullable<BaseTexture> {\r\n return this._material.bumpTexture;\r\n }\r\n\r\n /**\r\n * Sets the normal map inversions for the material.\r\n * @param invertX Whether to invert the normal map on the X axis\r\n * @param invertY Whether to invert the normal map on the Y axis\r\n */\r\n public setNormalMapInversions(invertX: boolean, invertY: boolean): void {\r\n this._material.invertNormalMapX = invertX;\r\n this._material.invertNormalMapY = invertY;\r\n }\r\n\r\n /**\r\n * Sets the geometry coat normal texture (mapped to PBR clearCoat.bumpTexture).\r\n * Automatically enables clear coat.\r\n * @param value The coat normal texture or null\r\n */\r\n public set geometryCoatNormalTexture(value: Nullable<BaseTexture>) {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.bumpTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry coat normal texture.\r\n * @returns The coat normal texture or null\r\n */\r\n public get geometryCoatNormalTexture(): Nullable<BaseTexture> {\r\n return this._material.clearCoat.bumpTexture;\r\n }\r\n\r\n /**\r\n * Sets the geometry coat normal texture scale.\r\n * @param value The scale value for the coat normal texture\r\n */\r\n public set geometryCoatNormalTextureScale(value: number) {\r\n if (this._material.clearCoat.bumpTexture) {\r\n this._material.clearCoat.bumpTexture.level = value;\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"pbrMaterialLoadingAdapter.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/pbrMaterialLoadingAdapter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,yCAA8B;AAC/C,OAAO,EAAE,SAAS,EAAE,0CAA+B;AAGnD;;GAEG;AACH,MAAM,OAAO,yBAAyB;IAGlC;;;OAGG;IACH,YAAY,QAAkB;QAC1B,IAAI,CAAC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AC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;YACvC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;QACvD,CAAC;IACL,CAAC;CACJ","sourcesContent":["import type { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { Nullable } from \"core/types\";\r\nimport { Color3 } from \"core/Maths/math.color\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport type { IMaterialLoadingAdapter } from \"./materialLoadingAdapter\";\r\n\r\n/**\r\n * Material Loading Adapter for PBR materials that provides a unified OpenPBR-like interface.\r\n */\r\nexport class PBRMaterialLoadingAdapter implements IMaterialLoadingAdapter {\r\n private _material: PBRMaterial;\r\n\r\n /**\r\n * Creates a new instance of the PBRMaterialLoadingAdapter.\r\n * @param material - The PBR material to adapt.\r\n */\r\n constructor(material: Material) {\r\n this._material = material as PBRMaterial;\r\n this._material.enableSpecularAntiAliasing = true;\r\n }\r\n\r\n /**\r\n * Gets the underlying material\r\n */\r\n public get material(): PBRMaterial {\r\n return this._material;\r\n }\r\n\r\n /**\r\n * Whether the material should be treated as unlit\r\n */\r\n public get isUnlit(): boolean {\r\n return this._material.unlit;\r\n }\r\n\r\n /**\r\n * Sets whether the material should be treated as unlit\r\n */\r\n public set isUnlit(value: boolean) {\r\n this._material.unlit = value;\r\n }\r\n\r\n // ========================================\r\n // CULLING PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets whether back face culling is enabled.\r\n * @param value True to enable back face culling\r\n */\r\n public set backFaceCulling(value: boolean) {\r\n this._material.backFaceCulling = value;\r\n }\r\n\r\n /**\r\n * Gets whether back face culling is enabled.\r\n * @returns True if back face culling is enabled\r\n */\r\n public get backFaceCulling(): boolean {\r\n return this._material.backFaceCulling;\r\n }\r\n\r\n /**\r\n * Sets whether two-sided lighting is enabled.\r\n * @param value True to enable two-sided lighting\r\n */\r\n public set twoSidedLighting(value: boolean) {\r\n this._material.twoSidedLighting = value;\r\n }\r\n\r\n /**\r\n * Gets whether two-sided lighting is enabled.\r\n * @returns True if two-sided lighting is enabled\r\n */\r\n public get twoSidedLighting(): boolean {\r\n return this._material.twoSidedLighting;\r\n }\r\n\r\n // ========================================\r\n // ALPHA PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets the alpha cutoff value for alpha testing.\r\n * @param value The alpha cutoff threshold (0-1)\r\n */\r\n public set alphaCutOff(value: number) {\r\n this._material.alphaCutOff = value;\r\n }\r\n\r\n /**\r\n * Gets the alpha cutoff value.\r\n * @returns The alpha cutoff threshold (0-1)\r\n */\r\n public get alphaCutOff(): number {\r\n return this._material.alphaCutOff;\r\n }\r\n\r\n /**\r\n * Sets whether to use alpha from the albedo texture.\r\n * @param value True to use alpha from albedo texture\r\n */\r\n public set useAlphaFromBaseColorTexture(value: boolean) {\r\n this._material.useAlphaFromAlbedoTexture = value;\r\n }\r\n\r\n /**\r\n * Gets whether alpha is used from the albedo texture.\r\n * @returns True if using alpha from albedo texture\r\n */\r\n public get useAlphaFromBaseColorTexture(): boolean {\r\n return this._material.useAlphaFromAlbedoTexture;\r\n }\r\n\r\n /**\r\n * Gets whether the transparency is treated as alpha coverage.\r\n */\r\n public get transparencyAsAlphaCoverage(): boolean {\r\n return this._material.useRadianceOverAlpha || this._material.useSpecularOverAlpha;\r\n }\r\n\r\n /**\r\n * Sets/Gets whether the transparency is treated as alpha coverage\r\n */\r\n public set transparencyAsAlphaCoverage(value: boolean) {\r\n this._material.useRadianceOverAlpha = !value;\r\n this._material.useSpecularOverAlpha = !value;\r\n }\r\n\r\n // ========================================\r\n // BASE PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the base color of the material (mapped to PBR albedoColor).\r\n * @param value The base color as a Color3\r\n */\r\n public set baseColor(value: Color3) {\r\n this._material.albedoColor = value;\r\n }\r\n\r\n /**\r\n * Gets the base color of the material.\r\n * @returns The base color as a Color3\r\n */\r\n public get baseColor(): Color3 {\r\n return this._material.albedoColor;\r\n }\r\n\r\n /**\r\n * Sets the base color texture of the material (mapped to PBR albedoTexture).\r\n * @param value The base color texture or null\r\n */\r\n public set baseColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.albedoTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base color texture of the material.\r\n * @returns The base color texture or null\r\n */\r\n public get baseColorTexture(): Nullable<BaseTexture> {\r\n return this._material.albedoTexture;\r\n }\r\n\r\n /**\r\n * Sets the base diffuse roughness of the material.\r\n * @param value The diffuse roughness value (0-1)\r\n */\r\n public set baseDiffuseRoughness(value: number) {\r\n this._material.baseDiffuseRoughness = value;\r\n if (value > 0) {\r\n this._material.brdf.baseDiffuseModel = Constants.MATERIAL_DIFFUSE_MODEL_E_OREN_NAYAR;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the base diffuse roughness of the material.\r\n * @returns The diffuse roughness value (0-1), defaults to 0 if not set\r\n */\r\n public get baseDiffuseRoughness(): number {\r\n return this._material.baseDiffuseRoughness ?? 0;\r\n }\r\n\r\n /**\r\n * Sets the base diffuse roughness texture of the material.\r\n * @param value The diffuse roughness texture or null\r\n */\r\n public set baseDiffuseRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.baseDiffuseRoughnessTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base diffuse roughness texture of the material.\r\n * @returns The diffuse roughness texture or null\r\n */\r\n public get baseDiffuseRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.baseDiffuseRoughnessTexture;\r\n }\r\n\r\n /**\r\n * Sets the base metalness value of the material (mapped to PBR metallic).\r\n * @param value The metalness value (0-1)\r\n */\r\n public set baseMetalness(value: number) {\r\n this._material.metallic = value;\r\n }\r\n\r\n /**\r\n * Gets the base metalness value of the material.\r\n * @returns The metalness value (0-1), defaults to 1 if not set\r\n */\r\n public get baseMetalness(): number {\r\n return this._material.metallic ?? 1;\r\n }\r\n\r\n /**\r\n * Sets the base metalness texture of the material (mapped to PBR metallicTexture).\r\n * @param value The metalness texture or null\r\n */\r\n public set baseMetalnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.metallicTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the base metalness texture of the material.\r\n * @returns The metalness texture or null\r\n */\r\n public get baseMetalnessTexture(): Nullable<BaseTexture> {\r\n return this._material.metallicTexture;\r\n }\r\n\r\n /**\r\n * Sets whether to use roughness from the metallic texture's green channel.\r\n * Also disables using roughness from the alpha channel when enabled.\r\n * @param value True to use green channel for roughness\r\n */\r\n public set useRoughnessFromMetallicTextureGreen(value: boolean) {\r\n this._material.useRoughnessFromMetallicTextureGreen = value;\r\n this._material.useRoughnessFromMetallicTextureAlpha = !value;\r\n }\r\n\r\n /**\r\n * Sets whether to use metalness from the metallic texture's blue channel.\r\n * @param value True to use blue channel for metalness\r\n */\r\n public set useMetallicFromMetallicTextureBlue(value: boolean) {\r\n this._material.useMetallnessFromMetallicTextureBlue = value;\r\n }\r\n\r\n // ========================================\r\n // SPECULAR PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures specular properties and optionally enables OpenPBR BRDF model for edge color support.\r\n * @param enableEdgeColor Whether to enable OpenPBR BRDF models for edge color support\r\n */\r\n public enableSpecularEdgeColor(enableEdgeColor: boolean = false): void {\r\n if (enableEdgeColor) {\r\n this._material.brdf.dielectricSpecularModel = Constants.MATERIAL_DIELECTRIC_SPECULAR_MODEL_OPENPBR;\r\n this._material.brdf.conductorSpecularModel = Constants.MATERIAL_CONDUCTOR_SPECULAR_MODEL_OPENPBR;\r\n }\r\n }\r\n\r\n /**\r\n * Sets the specular weight (mapped to PBR metallicF0Factor).\r\n * @param value The specular weight value\r\n */\r\n public set specularWeight(value: number) {\r\n this._material.metallicF0Factor = value;\r\n }\r\n\r\n /**\r\n * Gets the specular weight.\r\n * @returns The specular weight value, defaults to 1 if not set\r\n */\r\n public get specularWeight(): number {\r\n return this._material.metallicF0Factor ?? 1;\r\n }\r\n\r\n /**\r\n * Sets the specular weight texture (mapped to PBR metallicReflectanceTexture).\r\n * Configures the material to use only metalness from this texture when set.\r\n * @param value The specular weight texture or null\r\n */\r\n public set specularWeightTexture(value: Nullable<BaseTexture>) {\r\n if (value) {\r\n this._material.metallicReflectanceTexture = value;\r\n this._material.useOnlyMetallicFromMetallicReflectanceTexture = true;\r\n } else {\r\n this._material.metallicReflectanceTexture = null;\r\n this._material.useOnlyMetallicFromMetallicReflectanceTexture = false;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the specular weight texture.\r\n * @returns The specular weight texture or null\r\n */\r\n public get specularWeightTexture(): Nullable<BaseTexture> {\r\n return this._material.metallicReflectanceTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular color (mapped to PBR metallicReflectanceColor).\r\n * @param value The specular color as a Color3\r\n */\r\n public set specularColor(value: Color3) {\r\n this._material.metallicReflectanceColor = value;\r\n }\r\n\r\n /**\r\n * Gets the specular color.\r\n * @returns The specular color as a Color3\r\n */\r\n public get specularColor(): Color3 {\r\n return this._material.metallicReflectanceColor;\r\n }\r\n\r\n /**\r\n * Sets the specular color texture (mapped to PBR reflectanceTexture).\r\n * @param value The specular color texture or null\r\n */\r\n public set specularColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.reflectanceTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the specular color texture.\r\n * @returns The specular color texture or null\r\n */\r\n public get specularColorTexture(): Nullable<BaseTexture> {\r\n return this._material.reflectanceTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular roughness (mapped to PBR roughness).\r\n * @param value The roughness value (0-1)\r\n */\r\n public set specularRoughness(value: number) {\r\n this._material.roughness = value;\r\n }\r\n\r\n /**\r\n * Gets the specular roughness.\r\n * @returns The roughness value (0-1), defaults to 1 if not set\r\n */\r\n public get specularRoughness(): number {\r\n return this._material.roughness ?? 1;\r\n }\r\n\r\n /**\r\n * Sets the specular roughness texture.\r\n * Note: PBR uses the same texture for both metallic and roughness,\r\n * so this only sets the texture if no base metalness texture exists.\r\n * @param value The roughness texture or null\r\n */\r\n public set specularRoughnessTexture(value: Nullable<BaseTexture>) {\r\n // PBR uses the same texture for both metallic and roughness\r\n if (!this.baseMetalnessTexture) {\r\n this._material.metallicTexture = value;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the specular roughness texture.\r\n * @returns The roughness texture (same as metallic texture for PBR) or null\r\n */\r\n public get specularRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.metallicTexture;\r\n }\r\n\r\n /**\r\n * Sets the specular index of refraction (mapped to PBR indexOfRefraction).\r\n * @param value The IOR value\r\n */\r\n public set specularIor(value: number) {\r\n this._material.indexOfRefraction = value;\r\n }\r\n\r\n /**\r\n * Gets the specular index of refraction.\r\n * @returns The IOR value\r\n */\r\n public get specularIor(): number {\r\n return this._material.indexOfRefraction;\r\n }\r\n\r\n // ========================================\r\n // EMISSION PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the emission color (mapped to PBR emissiveColor).\r\n * @param value The emission color as a Color3\r\n */\r\n public set emissionColor(value: Color3) {\r\n this._material.emissiveColor = value;\r\n }\r\n\r\n /**\r\n * Gets the emission color.\r\n * @returns The emission color as a Color3\r\n */\r\n public get emissionColor(): Color3 {\r\n return this._material.emissiveColor;\r\n }\r\n\r\n /**\r\n * Sets the emission luminance/intensity (mapped to PBR emissiveIntensity).\r\n * @param value The emission intensity value\r\n */\r\n public set emissionLuminance(value: number) {\r\n this._material.emissiveIntensity = value;\r\n }\r\n\r\n /**\r\n * Gets the emission luminance/intensity.\r\n * @returns The emission intensity value\r\n */\r\n public get emissionLuminance(): number {\r\n return this._material.emissiveIntensity;\r\n }\r\n\r\n /**\r\n * Sets the emission color texture (mapped to PBR emissiveTexture).\r\n * @param value The emission texture or null\r\n */\r\n public set emissionColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.emissiveTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the emission color texture.\r\n * @returns The emission texture or null\r\n */\r\n public get emissionColorTexture(): Nullable<BaseTexture> {\r\n return this._material.emissiveTexture;\r\n }\r\n\r\n // ========================================\r\n // AMBIENT OCCLUSION\r\n // ========================================\r\n\r\n /**\r\n * Sets the ambient occlusion texture (mapped to PBR ambientTexture).\r\n * Automatically enables grayscale mode when set.\r\n * @param value The ambient occlusion texture or null\r\n */\r\n public set ambientOcclusionTexture(value: Nullable<BaseTexture>) {\r\n this._material.ambientTexture = value;\r\n if (value) {\r\n this._material.useAmbientInGrayScale = true;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the ambient occlusion texture.\r\n * @returns The ambient occlusion texture or null\r\n */\r\n public get ambientOcclusionTexture(): Nullable<BaseTexture> {\r\n return this._material.ambientTexture;\r\n }\r\n\r\n /**\r\n * Sets the ambient occlusion texture strength.\r\n * @param value The strength value (typically 0-1)\r\n */\r\n public set ambientOcclusionTextureStrength(value: number) {\r\n this._material.ambientTextureStrength = value;\r\n }\r\n\r\n /**\r\n * Gets the ambient occlusion texture strength.\r\n * @returns The strength value, defaults to 1.0 if not set\r\n */\r\n public get ambientOcclusionTextureStrength(): number {\r\n return this._material.ambientTextureStrength ?? 1.0;\r\n }\r\n\r\n // ========================================\r\n // COAT PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Configures clear coat for PBR material.\r\n * Enables clear coat and sets up proper configuration.\r\n */\r\n public configureCoat(): void {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.useRoughnessFromMainTexture = false;\r\n this._material.clearCoat.remapF0OnInterfaceChange = false;\r\n }\r\n\r\n /**\r\n * Sets the coat weight (mapped to PBR clearCoat.intensity).\r\n * Automatically enables clear coat.\r\n * @param value The coat weight value (0-1)\r\n */\r\n public set coatWeight(value: number) {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.intensity = value;\r\n }\r\n\r\n /**\r\n * Gets the coat weight.\r\n * @returns The coat weight value\r\n */\r\n public get coatWeight(): number {\r\n return this._material.clearCoat.intensity;\r\n }\r\n\r\n /**\r\n * Sets the coat weight texture (mapped to PBR clearCoat.texture).\r\n * Automatically enables clear coat.\r\n * @param value The coat weight texture or null\r\n */\r\n public set coatWeightTexture(value: Nullable<BaseTexture>) {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.texture = value;\r\n }\r\n\r\n /**\r\n * Gets the coat weight texture.\r\n * @returns The coat weight texture or null\r\n */\r\n public get coatWeightTexture(): Nullable<BaseTexture> {\r\n return this._material.clearCoat.texture;\r\n }\r\n\r\n /**\r\n * Sets the coat color (mapped to PBR clearCoat.tintColor).\r\n * @param value The coat tint color as a Color3\r\n */\r\n public set coatColor(value: Color3) {\r\n this._material.clearCoat.isTintEnabled = value != Color3.White();\r\n this._material.clearCoat.tintColor = value;\r\n }\r\n\r\n /**\r\n * Sets the coat color texture (mapped to PBR clearCoat.tintTexture).\r\n * @param value The coat color texture or null\r\n */\r\n public set coatColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.clearCoat.tintTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the coat roughness (mapped to PBR clearCoat.roughness).\r\n * Automatically enables clear coat.\r\n * @param value The coat roughness value (0-1)\r\n */\r\n public set coatRoughness(value: number) {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.roughness = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness.\r\n * @returns The coat roughness value, defaults to 0 if not set\r\n */\r\n public get coatRoughness(): number {\r\n return this._material.clearCoat.roughness ?? 0;\r\n }\r\n\r\n /**\r\n * Sets the coat roughness texture (mapped to PBR clearCoat.textureRoughness).\r\n * Automatically enables clear coat and disables using roughness from main texture.\r\n * @param value The coat roughness texture or null\r\n */\r\n public set coatRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.useRoughnessFromMainTexture = false;\r\n this._material.clearCoat.textureRoughness = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness texture.\r\n * @returns The coat roughness texture or null\r\n */\r\n public get coatRoughnessTexture(): Nullable<BaseTexture> {\r\n return this._material.clearCoat.textureRoughness;\r\n }\r\n\r\n /**\r\n * Sets the coat index of refraction (IOR).\r\n */\r\n public set coatIor(value: number) {\r\n this._material.clearCoat.indexOfRefraction = value;\r\n }\r\n\r\n /**\r\n * Sets the coat darkening value.\r\n * Note: PBR doesn't have a direct coat darkening property, so this is a no-op.\r\n * @param value The coat darkening value (ignored for PBR)\r\n */\r\n public set coatDarkening(value: number) {\r\n // PBR doesn't have a coat darkening property\r\n }\r\n\r\n /**\r\n * Sets the coat darkening texture\r\n * @param value The coat darkening texture or null\r\n */\r\n public set coatDarkeningTexture(value: Nullable<BaseTexture>) {\r\n // PBR doesn't have a coat darkening property\r\n }\r\n\r\n /**\r\n * Sets the coat roughness anisotropy.\r\n * Note: PBR clearCoat doesn't support anisotropy yet, so this is a placeholder.\r\n * @param value The coat anisotropy intensity value (currently ignored)\r\n */\r\n public set coatRoughnessAnisotropy(value: number) {\r\n // TODO: Implement when PBR clearCoat anisotropy becomes available\r\n // this._material.clearCoat.anisotropy = value;\r\n }\r\n\r\n /**\r\n * Gets the coat roughness anisotropy.\r\n * Note: PBR clearCoat doesn't support anisotropy yet, so this returns 0.\r\n * @returns Currently returns 0 as clearCoat anisotropy is not yet available\r\n */\r\n public get coatRoughnessAnisotropy(): number {\r\n // TODO: Implement when PBR clearCoat anisotropy becomes available\r\n // return this._material.clearCoat.anisotropy ?? 0;\r\n return 0;\r\n }\r\n\r\n /**\r\n * Sets the coat tangent angle for anisotropy.\r\n * Note: PBR clearCoat doesn't support anisotropy yet, so this is a placeholder.\r\n * @param value The coat anisotropy rotation angle in radians (currently ignored)\r\n */\r\n public set geometryCoatTangentAngle(value: number) {\r\n // TODO: Implement when PBR clearCoat anisotropy becomes available\r\n // this._material.clearCoat.anisotropyAngle = value;\r\n }\r\n\r\n /**\r\n * Sets the coat tangent texture for anisotropy.\r\n * Note: PBR clearCoat doesn't support anisotropy textures yet, so this is a placeholder.\r\n * @param value The coat anisotropy texture (currently ignored)\r\n */\r\n public set geometryCoatTangentTexture(value: Nullable<BaseTexture>) {\r\n // TODO: Implement when PBR clearCoat anisotropy becomes available\r\n // this._material.clearCoat.anisotropyTangentTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the coat tangent texture for anisotropy.\r\n * Note: PBR clearCoat doesn't support anisotropy textures yet, so this returns null.\r\n * @returns Currently returns null as clearCoat anisotropy is not yet available\r\n */\r\n public get geometryCoatTangentTexture(): Nullable<BaseTexture> {\r\n // TODO: Implement when PBR clearCoat anisotropy becomes available\r\n // return this._material.clearCoat.anisotropyTangentTexture;\r\n return null;\r\n }\r\n\r\n // ========================================\r\n // TRANSMISSION LAYER\r\n // ========================================\r\n\r\n /**\r\n * Sets the transmission weight (mapped to PBR subSurface.refractionIntensity).\r\n * Enables refraction when value \\> 0.\r\n * @param value The transmission weight value (0-1)\r\n */\r\n public set transmissionWeight(value: number) {\r\n this._material.subSurface.isRefractionEnabled = value > 0;\r\n this._material.subSurface.refractionIntensity = value;\r\n }\r\n\r\n /**\r\n * Gets the transmission weight.\r\n * @returns The transmission weight value\r\n */\r\n public get transmissionWeight(): number {\r\n return this._material.subSurface.refractionIntensity;\r\n }\r\n\r\n /**\r\n * Sets the transmission weight texture (mapped to PBR subSurface.refractionIntensityTexture).\r\n * Automatically enables refraction and glTF-style textures.\r\n * @param value The transmission weight texture or null\r\n */\r\n public set transmissionWeightTexture(value: Nullable<BaseTexture>) {\r\n this._material.subSurface.isRefractionEnabled = true;\r\n this._material.subSurface.refractionIntensityTexture = value;\r\n this._material.subSurface.useGltfStyleTextures = true;\r\n }\r\n\r\n /**\r\n * Sets the attenuation distance for volume scattering.\r\n * @param value The attenuation distance value\r\n */\r\n public set transmissionDepth(value: number) {\r\n this._material.subSurface.tintColorAtDistance = value;\r\n }\r\n\r\n /**\r\n * Sets the attenuation color (mapped to PBR subSurface.tintColor).\r\n * @param value The attenuation color as a Color3\r\n */\r\n public set transmissionColor(value: Color3) {\r\n this._material.subSurface.tintColor = value;\r\n }\r\n\r\n /**\r\n * Gets the transmission dispersion Abbe number.\r\n * @param value The Abbe number value\r\n */\r\n public set transmissionDispersionAbbeNumber(value: number) {\r\n if (value > 0) {\r\n this._material.subSurface.isDispersionEnabled = true;\r\n this._material.subSurface.dispersion = 20.0 / value;\r\n } else {\r\n this._material.subSurface.isDispersionEnabled = false;\r\n this._material.subSurface.dispersion = 0;\r\n }\r\n }\r\n\r\n /**\r\n * Configures transmission for thin-surface transmission (KHR_materials_transmission).\r\n * Sets up the material for proper thin-surface transmission behavior.\r\n */\r\n public configureTransmission(): void {\r\n // Since this extension models thin-surface transmission only, we must make IOR = 1.0\r\n this._material.subSurface.volumeIndexOfRefraction = 1.0;\r\n // Albedo colour will tint transmission.\r\n this._material.subSurface.useAlbedoToTintRefraction = true;\r\n this._material.subSurface.minimumThickness = 0.0;\r\n this._material.subSurface.maximumThickness = 0.0;\r\n }\r\n\r\n // ========================================\r\n // VOLUME PROPERTIES\r\n // ========================================\r\n\r\n /**\r\n * Sets the thickness texture (mapped to PBR subSurface.thicknessTexture).\r\n * Automatically enables refraction.\r\n * @param value The thickness texture or null\r\n */\r\n public set volumeThicknessTexture(value: Nullable<BaseTexture>) {\r\n this._material.subSurface.thicknessTexture = value;\r\n this._material.subSurface.useGltfStyleTextures = true;\r\n }\r\n\r\n /**\r\n * Sets the thickness factor (mapped to PBR subSurface.maximumThickness).\r\n * Automatically enables refraction.\r\n * @param value The thickness value\r\n */\r\n public set volumeThickness(value: number) {\r\n this._material.subSurface.minimumThickness = 0.0;\r\n this._material.subSurface.maximumThickness = value;\r\n this._material.subSurface.useThicknessAsDepth = true;\r\n if (value > 0) {\r\n this._material.subSurface.volumeIndexOfRefraction = this._material.indexOfRefraction;\r\n }\r\n }\r\n\r\n // ========================================\r\n // SUBSURFACE PROPERTIES (Subsurface Scattering)\r\n // ========================================\r\n\r\n /**\r\n * Configures subsurface properties for PBR material\r\n */\r\n public configureSubsurface(): void {\r\n this._material.subSurface.useGltfStyleTextures = true;\r\n\r\n // Since this extension models thin-surface transmission only, we must make the\r\n // internal IOR == 1.0 and set the thickness to 0.\r\n this._material.subSurface.volumeIndexOfRefraction = 1.0;\r\n this._material.subSurface.minimumThickness = 0.0;\r\n this._material.subSurface.maximumThickness = 0.0;\r\n\r\n // Tint color will be used for transmission.\r\n this._material.subSurface.useAlbedoToTintTranslucency = false;\r\n }\r\n\r\n /**\r\n * Sets the subsurface weight\r\n */\r\n public set subsurfaceWeight(value: number) {\r\n this._material.subSurface.isTranslucencyEnabled = value > 0;\r\n this._material.subSurface.translucencyIntensity = value;\r\n }\r\n\r\n /**\r\n * Gets the subsurface weight\r\n * @returns The subsurface weight value\r\n */\r\n public get subsurfaceWeight(): number {\r\n return this._material.subSurface.isTranslucencyEnabled ? this._material.subSurface.translucencyIntensity : 0;\r\n }\r\n\r\n /**\r\n * Sets the subsurface weight texture\r\n */\r\n public set subsurfaceWeightTexture(value: Nullable<BaseTexture>) {\r\n this._material.subSurface.translucencyIntensityTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the subsurface color.\r\n * @param value The subsurface tint color as a Color3\r\n */\r\n public set subsurfaceColor(value: Color3) {\r\n this._material.subSurface.tintColor = value;\r\n }\r\n\r\n /**\r\n * Sets the subsurface color texture.\r\n * @param value The subsurface tint texture or null\r\n */\r\n public set subsurfaceColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.subSurface.translucencyColorTexture = value;\r\n }\r\n\r\n // ========================================\r\n // FUZZ LAYER (Sheen)\r\n // ========================================\r\n\r\n /**\r\n * Configures sheen for PBR material.\r\n * Enables sheen and sets up proper configuration.\r\n */\r\n public configureFuzz(): void {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.useRoughnessFromMainTexture = false;\r\n this._material.sheen.albedoScaling = true;\r\n }\r\n\r\n /**\r\n * Sets the sheen weight (mapped to PBR sheen.intensity).\r\n * Automatically enables sheen.\r\n * @param value The sheen weight value\r\n */\r\n public set fuzzWeight(value: number) {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.intensity = value;\r\n }\r\n\r\n /**\r\n * Sets the sheen color (mapped to PBR sheen.color).\r\n * Automatically enables sheen.\r\n * @param value The sheen color as a Color3\r\n */\r\n public set fuzzColor(value: Color3) {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.color = value;\r\n }\r\n\r\n /**\r\n * Sets the sheen color texture (mapped to PBR sheen.texture).\r\n * Automatically enables sheen.\r\n * @param value The sheen color texture or null\r\n */\r\n public set fuzzColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.texture = value;\r\n }\r\n\r\n /**\r\n * Sets the sheen roughness (mapped to PBR sheen.roughness).\r\n * Automatically enables sheen.\r\n * @param value The sheen roughness value (0-1)\r\n */\r\n public set fuzzRoughness(value: number) {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.roughness = value;\r\n }\r\n\r\n /**\r\n * Sets the sheen roughness texture (mapped to PBR sheen.textureRoughness).\r\n * Automatically enables sheen.\r\n * @param value The sheen roughness texture or null\r\n */\r\n public set fuzzRoughnessTexture(value: Nullable<BaseTexture>) {\r\n this._material.sheen.isEnabled = true;\r\n this._material.sheen.textureRoughness = value;\r\n }\r\n\r\n // ========================================\r\n // ANISOTROPY\r\n // ========================================\r\n\r\n /**\r\n * Sets the specular roughness anisotropy (mapped to PBR anisotropy.intensity).\r\n * Automatically enables anisotropy.\r\n * @param value The anisotropy intensity value\r\n */\r\n public set specularRoughnessAnisotropy(value: number) {\r\n this._material.anisotropy.isEnabled = true;\r\n this._material.anisotropy.intensity = value;\r\n }\r\n\r\n /**\r\n * Gets the specular roughness anisotropy.\r\n * @returns The anisotropy intensity value\r\n */\r\n public get specularRoughnessAnisotropy(): number {\r\n return this._material.anisotropy.intensity;\r\n }\r\n\r\n /**\r\n * Sets the anisotropy rotation (mapped to PBR anisotropy.angle).\r\n * Automatically enables anisotropy.\r\n * @param value The anisotropy rotation angle in radians\r\n */\r\n public set geometryTangentAngle(value: number) {\r\n this._material.anisotropy.isEnabled = true;\r\n this._material.anisotropy.angle = value;\r\n }\r\n\r\n /**\r\n * Sets the geometry tangent texture (mapped to PBR anisotropy.texture).\r\n * Automatically enables anisotropy.\r\n * @param value The anisotropy texture or null\r\n */\r\n public set geometryTangentTexture(value: Nullable<BaseTexture>) {\r\n this._material.anisotropy.isEnabled = true;\r\n this._material.anisotropy.texture = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry tangent texture.\r\n * @returns The anisotropy texture or null\r\n */\r\n public get geometryTangentTexture(): Nullable<BaseTexture> {\r\n return this._material.anisotropy.texture;\r\n }\r\n\r\n /**\r\n * Configures glTF-style anisotropy for the material.\r\n * Note: PBR materials don't need this configuration, so this is a no-op.\r\n * @param useGltfStyle Whether to use glTF-style anisotropy (ignored for PBR)\r\n */\r\n public configureGltfStyleAnisotropy(useGltfStyle: boolean = true): void {\r\n // PBR materials don't need this configuration\r\n }\r\n\r\n // ========================================\r\n // THIN FILM IRIDESCENCE\r\n // ========================================\r\n\r\n /**\r\n * Sets the iridescence weight (mapped to PBR iridescence.intensity).\r\n * Automatically enables iridescence.\r\n * @param value The iridescence intensity value\r\n */\r\n public set thinFilmWeight(value: number) {\r\n this._material.iridescence.isEnabled = value > 0;\r\n this._material.iridescence.intensity = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence IOR (mapped to PBR iridescence.indexOfRefraction).\r\n * @param value The iridescence IOR value\r\n */\r\n public set thinFilmIor(value: number) {\r\n this._material.iridescence.indexOfRefraction = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence thickness minimum (mapped to PBR iridescence.minimumThickness).\r\n * @param value The minimum thickness value in nanometers\r\n */\r\n public set thinFilmThicknessMinimum(value: number) {\r\n this._material.iridescence.minimumThickness = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence thickness maximum (mapped to PBR iridescence.maximumThickness).\r\n * @param value The maximum thickness value in nanometers\r\n */\r\n public set thinFilmThicknessMaximum(value: number) {\r\n this._material.iridescence.maximumThickness = value;\r\n }\r\n\r\n /**\r\n * Sets the thin film weight texture (mapped to PBR iridescence.texture).\r\n * @param value The thin film weight texture or null\r\n */\r\n public set thinFilmWeightTexture(value: Nullable<BaseTexture>) {\r\n this._material.iridescence.texture = value;\r\n }\r\n\r\n /**\r\n * Sets the iridescence thickness texture (mapped to PBR iridescence.thicknessTexture).\r\n * @param value The iridescence thickness texture or null\r\n */\r\n public set thinFilmThicknessTexture(value: Nullable<BaseTexture>) {\r\n this._material.iridescence.thicknessTexture = value;\r\n }\r\n\r\n // ========================================\r\n // DISPERSION\r\n // ========================================\r\n\r\n /**\r\n * Sets the transmission dispersion value.\r\n * Note: PBR doesn't have direct dispersion support, so this stores it as metadata.\r\n * @param value The dispersion value (stored as metadata)\r\n */\r\n public set transmissionDispersion(value: number) {\r\n // PBR doesn't have a direct dispersion property, this would need custom shader modification\r\n // For now, we'll store it as metadata\r\n (this._material as any)._dispersion = value;\r\n }\r\n\r\n // ========================================\r\n // UNLIT MATERIALS\r\n // ========================================\r\n\r\n /**\r\n * Sets whether the material is unlit.\r\n * @param value True to make the material unlit\r\n */\r\n public set unlit(value: boolean) {\r\n this._material.unlit = value;\r\n }\r\n\r\n // ========================================\r\n // GEOMETRY PARAMETERS\r\n // ========================================\r\n\r\n /**\r\n * Sets the geometry opacity (mapped to PBR alpha).\r\n * @param value The opacity value (0-1)\r\n */\r\n public set geometryOpacity(value: number) {\r\n this._material.alpha = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry opacity.\r\n * @returns The opacity value (0-1)\r\n */\r\n public get geometryOpacity(): number {\r\n return this._material.alpha;\r\n }\r\n\r\n /**\r\n * Sets the geometry normal texture (mapped to PBR bumpTexture).\r\n * Also forces irradiance computation in fragment shader for better lighting.\r\n * @param value The normal texture or null\r\n */\r\n public set geometryNormalTexture(value: Nullable<BaseTexture>) {\r\n this._material.bumpTexture = value;\r\n this._material.forceIrradianceInFragment = true;\r\n }\r\n\r\n /**\r\n * Gets the geometry normal texture.\r\n * @returns The normal texture or null\r\n */\r\n public get geometryNormalTexture(): Nullable<BaseTexture> {\r\n return this._material.bumpTexture;\r\n }\r\n\r\n /**\r\n * Sets the normal map inversions for the material.\r\n * @param invertX Whether to invert the normal map on the X axis\r\n * @param invertY Whether to invert the normal map on the Y axis\r\n */\r\n public setNormalMapInversions(invertX: boolean, invertY: boolean): void {\r\n this._material.invertNormalMapX = invertX;\r\n this._material.invertNormalMapY = invertY;\r\n }\r\n\r\n /**\r\n * Sets the geometry coat normal texture (mapped to PBR clearCoat.bumpTexture).\r\n * Automatically enables clear coat.\r\n * @param value The coat normal texture or null\r\n */\r\n public set geometryCoatNormalTexture(value: Nullable<BaseTexture>) {\r\n this._material.clearCoat.isEnabled = true;\r\n this._material.clearCoat.bumpTexture = value;\r\n }\r\n\r\n /**\r\n * Gets the geometry coat normal texture.\r\n * @returns The coat normal texture or null\r\n */\r\n public get geometryCoatNormalTexture(): Nullable<BaseTexture> {\r\n return this._material.clearCoat.bumpTexture;\r\n }\r\n\r\n /**\r\n * Sets the geometry coat normal texture scale.\r\n * @param value The scale value for the coat normal texture\r\n */\r\n public set geometryCoatNormalTextureScale(value: number) {\r\n if (this._material.clearCoat.bumpTexture) {\r\n this._material.clearCoat.bumpTexture.level = value;\r\n }\r\n }\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onerjs/loaders",
3
- "version": "8.27.12",
3
+ "version": "8.27.14",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "types": "index.d.ts",
@@ -18,10 +18,10 @@
18
18
  "postcompile": "build-tools -c add-js-to-es6"
19
19
  },
20
20
  "devDependencies": {
21
- "@onerjs/core": "^8.27.12",
21
+ "@onerjs/core": "^8.27.14",
22
22
  "@dev/build-tools": "^1.0.0",
23
23
  "@lts/loaders": "^1.0.0",
24
- "babylonjs-gltf2interface": "^8.27.12"
24
+ "babylonjs-gltf2interface": "^8.27.14"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@onerjs/core": "^8.0.0",