babylonjs-loaders 8.29.0 → 8.29.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.
@@ -922,6 +922,10 @@ declare module BABYLON.GLTF2 {
922
922
  * @returns The coat roughness texture or null
923
923
  */
924
924
  get coatRoughnessTexture(): Nullable<BaseTexture>;
925
+ /**
926
+ * Sets the coat index of refraction (IOR).
927
+ */
928
+ set coatIor(value: number);
925
929
  /**
926
930
  * Sets the coat darkening value.
927
931
  * Note: PBR doesn't have a direct coat darkening property, so this is a no-op.
@@ -1532,6 +1536,10 @@ declare module BABYLON.GLTF2 {
1532
1536
  * @returns The coat roughness texture or null
1533
1537
  */
1534
1538
  get coatRoughnessTexture(): Nullable<BaseTexture>;
1539
+ /**
1540
+ * Sets the coat index of refraction (IOR) of the OpenPBR material.
1541
+ */
1542
+ set coatIor(value: number);
1535
1543
  /**
1536
1544
  * Sets the coat darkening value of the OpenPBR material.
1537
1545
  * @param value The coat darkening value
@@ -1951,6 +1959,10 @@ declare module BABYLON.GLTF2 {
1951
1959
  * Sets/gets the coat roughness texture (OpenPBR: coatRoughnessTexture, PBR: clearCoat.textureRoughness)
1952
1960
  */
1953
1961
  coatRoughnessTexture: Nullable<BaseTexture>;
1962
+ /**
1963
+ * Sets the coat index of refraction (IOR)
1964
+ */
1965
+ coatIor: number;
1954
1966
  /**
1955
1967
  * Sets the coat darkening (OpenPBR: coatDarkening, no PBR equivalent)
1956
1968
  */
@@ -2669,6 +2681,10 @@ declare module BABYLON.GLTF2 {
2669
2681
  }
2670
2682
  /** @internal */
2671
2683
  export function LoadBoundingInfoFromPositionAccessor(accessor: BABYLON.GLTF2.Loader.IAccessor): Nullable<BoundingInfo>;
2684
+ type PBRMaterialImplementation = {
2685
+ materialClass: typeof Material;
2686
+ adapterClass: new (material: Material) => BABYLON.GLTF2.IMaterialLoadingAdapter;
2687
+ };
2672
2688
  /**
2673
2689
  * The glTF 2.0 loader
2674
2690
  */
@@ -2699,9 +2715,7 @@ declare module BABYLON.GLTF2 {
2699
2715
  private readonly _postSceneLoadActions;
2700
2716
  private readonly _materialAdapterCache;
2701
2717
  /** @internal */
2702
- _pbrMaterialClass: typeof PBRMaterial | typeof OpenPBRMaterial | null;
2703
- /** @internal */
2704
- _pbrMaterialAdapterClass: typeof BABYLON.GLTF2.OpenPBRMaterialLoadingAdapter | typeof BABYLON.GLTF2.PBRMaterialLoadingAdapter | null;
2718
+ _pbrMaterialImpl: Nullable<Readonly<PBRMaterialImplementation>> | false;
2705
2719
  /**
2706
2720
  * The default glTF sampler.
2707
2721
  */
@@ -4506,136 +4520,6 @@ declare module BABYLON {
4506
4520
  ["KHR_materials_diffuse_roughness"]: {};
4507
4521
  }
4508
4522
 
4509
- }
4510
- declare module BABYLON.GLTF2.Loader.Extensions {
4511
- /**
4512
- * [Proposed Specification](https://github.com/KhronosGroup/glTF/pull/2518)
4513
- * !!! Experimental Extension Subject to Changes !!!
4514
- */
4515
- export class KHR_materials_clearcoat_darkening implements BABYLON.GLTF2.IGLTFLoaderExtension {
4516
- /**
4517
- * The name of this extension.
4518
- */
4519
- readonly name = "KHR_materials_clearcoat_darkening";
4520
- /**
4521
- * Defines whether this extension is enabled.
4522
- */
4523
- enabled: boolean;
4524
- /**
4525
- * Defines a number that determines the order the extensions are applied.
4526
- */
4527
- order: number;
4528
- private _loader;
4529
- /**
4530
- * @internal
4531
- */
4532
- constructor(loader: BABYLON.GLTF2.GLTFLoader);
4533
- /** @internal */
4534
- dispose(): void;
4535
- /**
4536
- * @internal
4537
- */
4538
- loadMaterialPropertiesAsync(context: string, material: BABYLON.GLTF2.Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
4539
- private _loadDarkeningPropertiesAsync;
4540
- }
4541
-
4542
-
4543
-
4544
- }
4545
- declare module BABYLON {
4546
- interface GLTFLoaderExtensionOptions {
4547
- /**
4548
- * Defines options for the KHR_materials_clearcoat_darkening extension.
4549
- */
4550
- ["KHR_materials_clearcoat_darkening"]: {};
4551
- }
4552
-
4553
- }
4554
- declare module BABYLON.GLTF2.Loader.Extensions {
4555
- /**
4556
- * !!! Experimental Extension Subject to Changes !!!
4557
- */
4558
- export class KHR_materials_clearcoat_color implements BABYLON.GLTF2.IGLTFLoaderExtension {
4559
- /**
4560
- * The name of this extension.
4561
- */
4562
- readonly name = "KHR_materials_clearcoat_color";
4563
- /**
4564
- * Defines whether this extension is enabled.
4565
- */
4566
- enabled: boolean;
4567
- /**
4568
- * Defines a number that determines the order the extensions are applied.
4569
- */
4570
- order: number;
4571
- private _loader;
4572
- /**
4573
- * @internal
4574
- */
4575
- constructor(loader: BABYLON.GLTF2.GLTFLoader);
4576
- /** @internal */
4577
- dispose(): void;
4578
- /**
4579
- * @internal
4580
- */
4581
- loadMaterialPropertiesAsync(context: string, material: BABYLON.GLTF2.Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
4582
- private _loadColorPropertiesAsync;
4583
- }
4584
-
4585
-
4586
-
4587
- }
4588
- declare module BABYLON {
4589
- interface GLTFLoaderExtensionOptions {
4590
- /**
4591
- * Defines options for the KHR_materials_clearcoat_color extension.
4592
- */
4593
- ["KHR_materials_clearcoat_color"]: {};
4594
- }
4595
-
4596
- }
4597
- declare module BABYLON.GLTF2.Loader.Extensions {
4598
- /**
4599
- * [Specification](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_clearcoat_anisotropy)
4600
- */
4601
- export class KHR_materials_clearcoat_anisotropy implements BABYLON.GLTF2.IGLTFLoaderExtension {
4602
- /**
4603
- * The name of this extension.
4604
- */
4605
- readonly name = "KHR_materials_clearcoat_anisotropy";
4606
- /**
4607
- * Defines whether this extension is enabled.
4608
- */
4609
- enabled: boolean;
4610
- /**
4611
- * Defines a number that determines the order the extensions are applied.
4612
- */
4613
- order: number;
4614
- private _loader;
4615
- /**
4616
- * @internal
4617
- */
4618
- constructor(loader: BABYLON.GLTF2.GLTFLoader);
4619
- /** @internal */
4620
- dispose(): void;
4621
- /**
4622
- * @internal
4623
- */
4624
- loadMaterialPropertiesAsync(context: string, material: BABYLON.GLTF2.Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
4625
- private _loadAnisotropyPropertiesAsync;
4626
- }
4627
-
4628
-
4629
-
4630
- }
4631
- declare module BABYLON {
4632
- interface GLTFLoaderExtensionOptions {
4633
- /**
4634
- * Defines options for the KHR_materials_clearcoat_anisotropy extension.
4635
- */
4636
- ["KHR_materials_clearcoat_anisotropy"]: {};
4637
- }
4638
-
4639
4523
  }
4640
4524
  declare module BABYLON.GLTF2.Loader.Extensions {
4641
4525
  /**
@@ -4667,6 +4551,9 @@ declare module BABYLON.GLTF2.Loader.Extensions {
4667
4551
  */
4668
4552
  loadMaterialPropertiesAsync(context: string, material: BABYLON.GLTF2.Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
4669
4553
  private _loadClearCoatPropertiesAsync;
4554
+ private _loadClearCoatDarkeningPropertiesAsync;
4555
+ private _loadClearCoatColorPropertiesAsync;
4556
+ private _loadClearCoatAnisotropyPropertiesAsync;
4670
4557
  }
4671
4558
 
4672
4559