@babylonjs/loaders 8.32.3 → 8.33.1

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.
@@ -3,6 +3,6 @@ export * from "./glTFLoaderExtension.js";
3
3
  export * from "./glTFLoaderExtensionRegistry.js";
4
4
  export * from "./glTFLoaderInterfaces.js";
5
5
  export * from "./glTFLoaderAnimation.js";
6
- export * from "./openPbrMaterialLoadingAdapter.js";
6
+ export * from "./openpbrMaterialLoadingAdapter.js";
7
7
  export * from "./pbrMaterialLoadingAdapter.js";
8
8
  export * from "./Extensions/index.js";
package/glTF/2.0/index.js CHANGED
@@ -4,7 +4,7 @@ export * from "./glTFLoaderExtension.js";
4
4
  export * from "./glTFLoaderExtensionRegistry.js";
5
5
  export * from "./glTFLoaderInterfaces.js";
6
6
  export * from "./glTFLoaderAnimation.js";
7
- export * from "./openPbrMaterialLoadingAdapter.js";
7
+ export * from "./openpbrMaterialLoadingAdapter.js";
8
8
  export * from "./pbrMaterialLoadingAdapter.js";
9
9
  export * from "./Extensions/index.js";
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./glTFLoader\";\r\nexport * from \"./glTFLoaderExtension\";\r\nexport * from \"./glTFLoaderExtensionRegistry\";\r\nexport * from \"./glTFLoaderInterfaces\";\r\nexport * from \"./glTFLoaderAnimation\";\r\nexport * from \"./openPbrMaterialLoadingAdapter\";\r\nexport * from \"./pbrMaterialLoadingAdapter\";\r\nexport * from \"./Extensions/index\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/loaders/src/glTF/2.0/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./glTFLoader\";\r\nexport * from \"./glTFLoaderExtension\";\r\nexport * from \"./glTFLoaderExtensionRegistry\";\r\nexport * from \"./glTFLoaderInterfaces\";\r\nexport * from \"./glTFLoaderAnimation\";\r\nexport * from \"./openpbrMaterialLoadingAdapter\";\r\nexport * from \"./pbrMaterialLoadingAdapter\";\r\nexport * from \"./Extensions/index\";\r\n"]}
@@ -1,4 +1,4 @@
1
- import type { OpenPBRMaterial } from "@babylonjs/core/Materials/PBR/openPbrMaterial.js";
1
+ import type { OpenPBRMaterial } from "@babylonjs/core/Materials/PBR/openpbrMaterial.js";
2
2
  import type { Material } from "@babylonjs/core/Materials/material.js";
3
3
  import type { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
4
4
  import type { Nullable } from "@babylonjs/core/types.js";
@@ -453,31 +453,26 @@ export declare class OpenPBRMaterialLoadingAdapter implements IMaterialLoadingAd
453
453
  configureFuzz(): void;
454
454
  /**
455
455
  * Sets the fuzz weight.
456
- * TODO: Implementation pending OpenPBR fuzz feature availability.
457
456
  * @param value The fuzz weight value
458
457
  */
459
458
  set fuzzWeight(value: number);
460
459
  /**
461
460
  * Sets the fuzz color.
462
- * TODO: Implementation pending OpenPBR fuzz feature availability.
463
461
  * @param value The fuzz color as a Color3
464
462
  */
465
463
  set fuzzColor(value: Color3);
466
464
  /**
467
465
  * Sets the fuzz color texture.
468
- * TODO: Implementation pending OpenPBR fuzz feature availability.
469
466
  * @param value The fuzz color texture or null
470
467
  */
471
468
  set fuzzColorTexture(value: Nullable<BaseTexture>);
472
469
  /**
473
470
  * Sets the fuzz roughness.
474
- * TODO: Implementation pending OpenPBR fuzz feature availability.
475
471
  * @param value The fuzz roughness value (0-1)
476
472
  */
477
473
  set fuzzRoughness(value: number);
478
474
  /**
479
475
  * Sets the fuzz roughness texture.
480
- * TODO: Implementation pending OpenPBR fuzz feature availability.
481
476
  * @param value The fuzz roughness texture or null
482
477
  */
483
478
  set fuzzRoughnessTexture(value: Nullable<BaseTexture>);
@@ -684,48 +684,38 @@ export class OpenPBRMaterialLoadingAdapter {
684
684
  }
685
685
  /**
686
686
  * Sets the fuzz weight.
687
- * TODO: Implementation pending OpenPBR fuzz feature availability.
688
687
  * @param value The fuzz weight value
689
688
  */
690
689
  set fuzzWeight(value) {
691
- // TODO: Implement when OpenPBR fuzz is available
692
- // this._material.fuzzWeight = value;
690
+ this._material.fuzzWeight = value;
693
691
  }
694
692
  /**
695
693
  * Sets the fuzz color.
696
- * TODO: Implementation pending OpenPBR fuzz feature availability.
697
694
  * @param value The fuzz color as a Color3
698
695
  */
699
696
  set fuzzColor(value) {
700
- // TODO: Implement when OpenPBR fuzz is available
701
- // this._material.fuzzColor = value;
697
+ this._material.fuzzColor = value;
702
698
  }
703
699
  /**
704
700
  * Sets the fuzz color texture.
705
- * TODO: Implementation pending OpenPBR fuzz feature availability.
706
701
  * @param value The fuzz color texture or null
707
702
  */
708
703
  set fuzzColorTexture(value) {
709
- // TODO: Implement when OpenPBR fuzz is available
710
- // this._material.fuzzColorTexture = value;
704
+ this._material.fuzzColorTexture = value;
711
705
  }
712
706
  /**
713
707
  * Sets the fuzz roughness.
714
- * TODO: Implementation pending OpenPBR fuzz feature availability.
715
708
  * @param value The fuzz roughness value (0-1)
716
709
  */
717
710
  set fuzzRoughness(value) {
718
- // TODO: Implement when OpenPBR fuzz is available
719
- // this._material.fuzzRoughness = value;
711
+ this._material.fuzzRoughness = value;
720
712
  }
721
713
  /**
722
714
  * Sets the fuzz roughness texture.
723
- * TODO: Implementation pending OpenPBR fuzz feature availability.
724
715
  * @param value The fuzz roughness texture or null
725
716
  */
726
717
  set fuzzRoughnessTexture(value) {
727
- // TODO: Implement when OpenPBR fuzz is available
728
- // this._material.fuzzRoughnessTexture = value;
718
+ this._material.fuzzRoughnessTexture = value;
729
719
  }
730
720
  // ========================================
731
721
  // ANISOTROPY
@@ -894,4 +884,4 @@ export class OpenPBRMaterialLoadingAdapter {
894
884
  }
895
885
  }
896
886
  }
897
- //# sourceMappingURL=openPbrMaterialLoadingAdapter.js.map
887
+ //# sourceMappingURL=openpbrMaterialLoadingAdapter.js.map
@@ -0,0 +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,I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AI,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 * @param value The fuzz weight value\r\n */\r\n public set fuzzWeight(value: number) {\r\n this._material.fuzzWeight = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz color.\r\n * @param value The fuzz color as a Color3\r\n */\r\n public set fuzzColor(value: Color3) {\r\n this._material.fuzzColor = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz color texture.\r\n * @param value The fuzz color texture or null\r\n */\r\n public set fuzzColorTexture(value: Nullable<BaseTexture>) {\r\n this._material.fuzzColorTexture = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz roughness.\r\n * @param value The fuzz roughness value (0-1)\r\n */\r\n public set fuzzRoughness(value: number) {\r\n this._material.fuzzRoughness = value;\r\n }\r\n\r\n /**\r\n * Sets the fuzz roughness texture.\r\n * @param value The fuzz roughness texture or null\r\n */\r\n public set fuzzRoughnessTexture(value: Nullable<BaseTexture>) {\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/loaders",
3
- "version": "8.32.3",
3
+ "version": "8.33.1",
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
- "@babylonjs/core": "^8.32.3",
21
+ "@babylonjs/core": "^8.33.1",
22
22
  "@dev/build-tools": "^1.0.0",
23
23
  "@lts/loaders": "^1.0.0",
24
- "babylonjs-gltf2interface": "^8.32.3"
24
+ "babylonjs-gltf2interface": "^8.33.1"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@babylonjs/core": "^8.0.0",
@@ -1 +0,0 @@
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,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC3C,CAAC;IAED,2CAA2C;IAC3C,mBAAmB;IACnB,2CAA2C;IAE3C;;;;OAIG;IACH,I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;OAGG;IACH,IAAW,eAAe,CAAC,KAAa;QACpC,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,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 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"]}