babylonjs-loaders 8.34.0 → 8.35.0

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.
@@ -1054,6 +1054,11 @@ declare module BABYLON.GLTF2 {
1054
1054
  * @param value The sheen weight value
1055
1055
  */
1056
1056
  set fuzzWeight(value: number);
1057
+ /**
1058
+ * Sets the fuzz weight texture.
1059
+ * @param value The fuzz weight texture or null
1060
+ */
1061
+ set fuzzWeightTexture(value: Nullable<BaseTexture>);
1057
1062
  /**
1058
1063
  * Sets the sheen color (mapped to PBR sheen.color).
1059
1064
  * Automatically enables sheen.
@@ -1659,6 +1664,11 @@ declare module BABYLON.GLTF2 {
1659
1664
  * @param value The fuzz weight value
1660
1665
  */
1661
1666
  set fuzzWeight(value: number);
1667
+ /**
1668
+ * Sets the fuzz weight texture.
1669
+ * @param value The fuzz weight texture or null
1670
+ */
1671
+ set fuzzWeightTexture(value: Nullable<BaseTexture>);
1662
1672
  /**
1663
1673
  * Sets the fuzz color.
1664
1674
  * @param value The fuzz color as a Color3
@@ -1831,27 +1841,27 @@ declare module BABYLON.GLTF2 {
1831
1841
  */
1832
1842
  transparencyAsAlphaCoverage: boolean;
1833
1843
  /**
1834
- * Sets/gets the base color (OpenPBR: baseColor, PBR: albedoColor)
1844
+ * Sets/gets the base color
1835
1845
  */
1836
1846
  baseColor: Color3;
1837
1847
  /**
1838
- * Sets/gets the base color texture (OpenPBR: baseColorTexture, PBR: albedoTexture)
1848
+ * Sets/gets the base color texture
1839
1849
  */
1840
1850
  baseColorTexture: Nullable<BaseTexture>;
1841
1851
  /**
1842
- * Sets/gets the base diffuse roughness (OpenPBR: baseDiffuseRoughness, PBR: baseDiffuseRoughness)
1852
+ * Sets/gets the base diffuse roughness
1843
1853
  */
1844
1854
  baseDiffuseRoughness: number;
1845
1855
  /**
1846
- * Sets/gets the base diffuse roughness texture (OpenPBR: baseDiffuseRoughnessTexture, PBR: baseDiffuseRoughnessTexture)
1856
+ * Sets/gets the base diffuse roughness texture
1847
1857
  */
1848
1858
  baseDiffuseRoughnessTexture: Nullable<BaseTexture>;
1849
1859
  /**
1850
- * Sets/gets the base metalness (OpenPBR: baseMetalness, PBR: metallic)
1860
+ * Sets/gets the base metalness
1851
1861
  */
1852
1862
  baseMetalness: number;
1853
1863
  /**
1854
- * Sets/gets the base metalness texture (OpenPBR: baseMetalnessTexture, PBR: metallicTexture)
1864
+ * Sets/gets the base metalness texture
1855
1865
  */
1856
1866
  baseMetalnessTexture: Nullable<BaseTexture>;
1857
1867
  /**
@@ -1868,23 +1878,23 @@ declare module BABYLON.GLTF2 {
1868
1878
  */
1869
1879
  enableSpecularEdgeColor(enableEdgeColor?: boolean): void;
1870
1880
  /**
1871
- * Sets/gets the specular weight (OpenPBR: specularWeight, PBR: metallicF0Factor)
1881
+ * Sets/gets the specular weight
1872
1882
  */
1873
1883
  specularWeight: number;
1874
1884
  /**
1875
- * Sets/gets the specular weight texture (OpenPBR: specularWeightTexture, PBR: metallicReflectanceTexture)
1885
+ * Sets/gets the specular weight texture
1876
1886
  */
1877
1887
  specularWeightTexture: Nullable<BaseTexture>;
1878
1888
  /**
1879
- * Sets/gets the specular color (OpenPBR: specularColor, PBR: reflectance)
1889
+ * Sets/gets the specular color
1880
1890
  */
1881
1891
  specularColor: Color3;
1882
1892
  /**
1883
- * Sets/gets the specular color texture (OpenPBR: specularColorTexture, PBR: reflectanceTexture)
1893
+ * Sets/gets the specular color texture
1884
1894
  */
1885
1895
  specularColorTexture: Nullable<BaseTexture>;
1886
1896
  /**
1887
- * Sets/gets the specular roughness (OpenPBR: specularRoughness, PBR: roughness)
1897
+ * Sets/gets the specular roughness
1888
1898
  */
1889
1899
  specularRoughness: number;
1890
1900
  /**
@@ -1892,15 +1902,15 @@ declare module BABYLON.GLTF2 {
1892
1902
  */
1893
1903
  specularRoughnessTexture: Nullable<BaseTexture>;
1894
1904
  /**
1895
- * Sets/gets the specular IOR (OpenPBR: specularIor, PBR: indexOfRefraction)
1905
+ * Sets/gets the specular IOR
1896
1906
  */
1897
1907
  specularIor: number;
1898
1908
  /**
1899
- * Sets/gets the emissive color (OpenPBR: emissionColor, PBR: emissiveColor)
1909
+ * Sets/gets the emissive color
1900
1910
  */
1901
1911
  emissionColor: Color3;
1902
1912
  /**
1903
- * Sets/gets the emissive luminance (OpenPBR: emissionLuminance, PBR: emissiveIntensity)
1913
+ * Sets/gets the emissive luminance
1904
1914
  */
1905
1915
  emissionLuminance: number;
1906
1916
  /**
@@ -1908,7 +1918,7 @@ declare module BABYLON.GLTF2 {
1908
1918
  */
1909
1919
  emissionColorTexture: Nullable<BaseTexture>;
1910
1920
  /**
1911
- * Sets/gets the ambient occlusion texture (OpenPBR: ambientOcclusionTexture, PBR: ambientTexture)
1921
+ * Sets/gets the ambient occlusion texture
1912
1922
  */
1913
1923
  ambientOcclusionTexture: Nullable<BaseTexture>;
1914
1924
  /**
@@ -1920,27 +1930,27 @@ declare module BABYLON.GLTF2 {
1920
1930
  */
1921
1931
  configureCoat(): void;
1922
1932
  /**
1923
- * Sets/gets the coat weight (OpenPBR: coatWeight, PBR: clearCoat.intensity)
1933
+ * Sets/gets the coat weight
1924
1934
  */
1925
1935
  coatWeight: number;
1926
1936
  /**
1927
- * Sets/gets the coat weight texture (OpenPBR: coatWeightTexture, PBR: clearCoat.texture)
1937
+ * Sets/gets the coat weight texture
1928
1938
  */
1929
1939
  coatWeightTexture: Nullable<BaseTexture>;
1930
1940
  /**
1931
- * Sets the coat color (OpenPBR: coatColor, no PBR equivalent)
1941
+ * Sets the coat color
1932
1942
  */
1933
1943
  coatColor: Color3;
1934
1944
  /**
1935
- * Sets the coat color texture (OpenPBR: coatColorTexture, no PBR equivalent)
1945
+ * Sets the coat color texture
1936
1946
  */
1937
1947
  coatColorTexture: Nullable<BaseTexture>;
1938
1948
  /**
1939
- * Sets/gets the coat roughness (OpenPBR: coatRoughness, PBR: clearCoat.roughness)
1949
+ * Sets/gets the coat roughness
1940
1950
  */
1941
1951
  coatRoughness: number;
1942
1952
  /**
1943
- * Sets/gets the coat roughness texture (OpenPBR: coatRoughnessTexture, PBR: clearCoat.textureRoughness)
1953
+ * Sets/gets the coat roughness texture
1944
1954
  */
1945
1955
  coatRoughnessTexture: Nullable<BaseTexture>;
1946
1956
  /**
@@ -1948,39 +1958,39 @@ declare module BABYLON.GLTF2 {
1948
1958
  */
1949
1959
  coatIor: number;
1950
1960
  /**
1951
- * Sets the coat darkening (OpenPBR: coatDarkening, no PBR equivalent)
1961
+ * Sets the coat darkening
1952
1962
  */
1953
1963
  coatDarkening: number;
1954
1964
  /**
1955
- * Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)
1965
+ * Sets the coat darkening texture
1956
1966
  */
1957
1967
  coatDarkeningTexture: Nullable<BaseTexture>;
1958
1968
  /**
1959
- * Sets/gets the coat roughness anisotropy (OpenPBR: coatRoughnessAnisotropy, PBR: clearCoat.anisotropy.intensity)
1969
+ * Sets/gets the coat roughness anisotropy
1960
1970
  */
1961
1971
  coatRoughnessAnisotropy: number;
1962
1972
  /**
1963
- * Sets the coat tangent angle for anisotropy (OpenPBR: geometryCoatTangentAngle, PBR: clearCoat.anisotropy.angle)
1973
+ * Sets the coat tangent angle for anisotropy
1964
1974
  */
1965
1975
  geometryCoatTangentAngle: number;
1966
1976
  /**
1967
- * Sets the coat tangent texture for anisotropy (OpenPBR: geometryCoatTangentTexture, PBR: clearCoat.anisotropy.texture)
1977
+ * Sets the coat tangent texture for anisotropy
1968
1978
  */
1969
1979
  geometryCoatTangentTexture: Nullable<BaseTexture>;
1970
1980
  /**
1971
- * Sets the transmission weight (OpenPBR: transmissionWeight, PBR: subSurface.refractionIntensity)
1981
+ * Sets the transmission weight
1972
1982
  */
1973
1983
  transmissionWeight: number;
1974
1984
  /**
1975
- * Sets the transmission weight texture (OpenPBR: transmissionWeightTexture, PBR: subSurface.refractionIntensityTexture)
1985
+ * Sets the transmission weight texture
1976
1986
  */
1977
1987
  transmissionWeightTexture: Nullable<BaseTexture>;
1978
1988
  /**
1979
- * Sets the attenuation distance (OpenPBR: attenuationDistance, PBR: subSurface.volumeIndexOfRefraction)
1989
+ * Sets the attenuation distance
1980
1990
  */
1981
1991
  transmissionDepth: number;
1982
1992
  /**
1983
- * Sets the attenuation color (OpenPBR: attenuationColor, PBR: subSurface.tintColor)
1993
+ * Sets the attenuation color
1984
1994
  */
1985
1995
  transmissionColor: Color3;
1986
1996
  /**
@@ -1992,11 +2002,11 @@ declare module BABYLON.GLTF2 {
1992
2002
  */
1993
2003
  configureTransmission(): void;
1994
2004
  /**
1995
- * Sets the thickness texture (OpenPBR: thicknessTexture, PBR: subSurface.thicknessTexture)
2005
+ * Sets the thickness texture
1996
2006
  */
1997
2007
  volumeThicknessTexture: Nullable<BaseTexture>;
1998
2008
  /**
1999
- * Sets the thickness factor (OpenPBR: thickness, PBR: subSurface.maximumThickness)
2009
+ * Sets the thickness factor
2000
2010
  */
2001
2011
  volumeThickness: number;
2002
2012
  /**
@@ -2012,11 +2022,11 @@ declare module BABYLON.GLTF2 {
2012
2022
  */
2013
2023
  subsurfaceWeightTexture: Nullable<BaseTexture>;
2014
2024
  /**
2015
- * Sets/gets the subsurface color (OpenPBR: subsurfaceColor, PBR: subSurface.tintColor)
2025
+ * Sets/gets the subsurface color
2016
2026
  */
2017
2027
  subsurfaceColor: Color3;
2018
2028
  /**
2019
- * Sets/gets the subsurface color texture (OpenPBR: subsurfaceColorTexture, PBR: subSurface.tintColorTexture)
2029
+ * Sets/gets the subsurface color texture
2020
2030
  */
2021
2031
  subsurfaceColorTexture: Nullable<BaseTexture>;
2022
2032
  /**
@@ -2024,35 +2034,39 @@ declare module BABYLON.GLTF2 {
2024
2034
  */
2025
2035
  configureFuzz(): void;
2026
2036
  /**
2027
- * Sets the fuzz weight (OpenPBR: fuzzWeight, PBR: fuzz.intensity)
2037
+ * Sets the fuzz weight
2028
2038
  */
2029
2039
  fuzzWeight: number;
2030
2040
  /**
2031
- * Sets the fuzz color (OpenPBR: fuzzColor, PBR: fuzz.color)
2041
+ * Sets the fuzz weight texture
2042
+ */
2043
+ fuzzWeightTexture: Nullable<BaseTexture>;
2044
+ /**
2045
+ * Sets the fuzz color
2032
2046
  */
2033
2047
  fuzzColor: Color3;
2034
2048
  /**
2035
- * Sets the fuzz color texture (OpenPBR: fuzzColorTexture, PBR: fuzz.texture)
2049
+ * Sets the fuzz color texture
2036
2050
  */
2037
2051
  fuzzColorTexture: Nullable<BaseTexture>;
2038
2052
  /**
2039
- * Sets the fuzz roughness (OpenPBR: fuzzRoughness, PBR: fuzz.roughness)
2053
+ * Sets the fuzz roughness
2040
2054
  */
2041
2055
  fuzzRoughness: number;
2042
2056
  /**
2043
- * Sets the fuzz roughness texture (OpenPBR: fuzzRoughnessTexture, PBR: fuzz.textureRoughness)
2057
+ * Sets the fuzz roughness texture
2044
2058
  */
2045
2059
  fuzzRoughnessTexture: Nullable<BaseTexture>;
2046
2060
  /**
2047
- * Sets/gets the specular roughness anisotropy (OpenPBR: specularRoughnessAnisotropy, PBR: anisotropy.intensity)
2061
+ * Sets/gets the specular roughness anisotropy
2048
2062
  */
2049
2063
  specularRoughnessAnisotropy: number;
2050
2064
  /**
2051
- * Sets the anisotropy rotation (OpenPBR: anisotropyRotation, PBR: anisotropy.angle)
2065
+ * Sets the anisotropy rotation
2052
2066
  */
2053
2067
  geometryTangentAngle: number;
2054
2068
  /**
2055
- * Sets/gets the anisotropy texture (OpenPBR: geometryTangentTexture, PBR: anisotropy.texture)
2069
+ * Sets/gets the anisotropy texture
2056
2070
  */
2057
2071
  geometryTangentTexture: Nullable<BaseTexture>;
2058
2072
  /**
@@ -2085,15 +2099,15 @@ declare module BABYLON.GLTF2 {
2085
2099
  */
2086
2100
  thinFilmThicknessTexture: Nullable<BaseTexture>;
2087
2101
  /**
2088
- * Sets the unlit flag (OpenPBR: unlit, PBR: unlit)
2102
+ * Sets the unlit flag
2089
2103
  */
2090
2104
  unlit: boolean;
2091
2105
  /**
2092
- * Sets/gets the geometry opacity (OpenPBR: geometryOpacity, PBR: alpha)
2106
+ * Sets/gets the geometry opacity
2093
2107
  */
2094
2108
  geometryOpacity: number;
2095
2109
  /**
2096
- * Sets/gets the geometry normal texture (OpenPBR: geometryNormalTexture, PBR: bumpTexture)
2110
+ * Sets/gets the geometry normal texture
2097
2111
  */
2098
2112
  geometryNormalTexture: Nullable<BaseTexture>;
2099
2113
  /**
@@ -2103,7 +2117,7 @@ declare module BABYLON.GLTF2 {
2103
2117
  */
2104
2118
  setNormalMapInversions(invertX: boolean, invertY: boolean): void;
2105
2119
  /**
2106
- * Sets/gets the coat normal texture (OpenPBR: geometryCoatNormalTexture, PBR: clearCoat.bumpTexture)
2120
+ * Sets/gets the coat normal texture
2107
2121
  */
2108
2122
  geometryCoatNormalTexture: Nullable<BaseTexture>;
2109
2123
  /**
@@ -4346,6 +4360,49 @@ declare module BABYLON {
4346
4360
  ["KHR_materials_ior"]: {};
4347
4361
  }
4348
4362
 
4363
+ }
4364
+ declare module BABYLON.GLTF2.Loader.Extensions {
4365
+ /**
4366
+ * [Specification]
4367
+ */
4368
+ export class KHR_materials_fuzz implements BABYLON.GLTF2.IGLTFLoaderExtension {
4369
+ /**
4370
+ * The name of this extension.
4371
+ */
4372
+ readonly name = "KHR_materials_fuzz";
4373
+ /**
4374
+ * Defines whether this extension is enabled.
4375
+ */
4376
+ enabled: boolean;
4377
+ /**
4378
+ * Defines a number that determines the order the extensions are applied.
4379
+ */
4380
+ order: number;
4381
+ private _loader;
4382
+ /**
4383
+ * @internal
4384
+ */
4385
+ constructor(loader: BABYLON.GLTF2.GLTFLoader);
4386
+ /** @internal */
4387
+ dispose(): void;
4388
+ /**
4389
+ * @internal
4390
+ */
4391
+ loadMaterialPropertiesAsync(context: string, material: BABYLON.GLTF2.Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
4392
+ private _loadFuzzPropertiesAsync;
4393
+ }
4394
+
4395
+
4396
+
4397
+ }
4398
+ declare module BABYLON {
4399
+ interface GLTFLoaderExtensionOptions {
4400
+ /**
4401
+ * Defines options for the KHR_materials_fuzz extension.
4402
+ */
4403
+ ["KHR_materials_fuzz"]: {};
4404
+ }
4405
+
4349
4406
  }
4350
4407
  declare module BABYLON.GLTF2.Loader.Extensions {
4351
4408
  /**
@@ -4521,6 +4578,56 @@ declare module BABYLON {
4521
4578
  ["KHR_materials_diffuse_roughness"]: {};
4522
4579
  }
4523
4580
 
4581
+ }
4582
+ declare module BABYLON.GLTF2.Loader.Extensions {
4583
+ /**
4584
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_coat/README.md)
4585
+ * [Playground Sample](https://www.babylonjs-playground.com/frame.html#7F7PN6#8)
4586
+ */
4587
+ export class KHR_materials_coat implements BABYLON.GLTF2.IGLTFLoaderExtension {
4588
+ /**
4589
+ * The name of this extension.
4590
+ */
4591
+ readonly name = "KHR_materials_coat";
4592
+ /**
4593
+ * Defines whether this extension is enabled.
4594
+ */
4595
+ enabled: boolean;
4596
+ /**
4597
+ * Defines a number that determines the order the extensions are applied.
4598
+ */
4599
+ order: number;
4600
+ private _loader;
4601
+ /**
4602
+ * Defines whether the KHR_materials_openpbr extension is used, indicating that
4603
+ * the material should be interpreted as OpenPBR (for coat, this might be necessary
4604
+ * to interpret anisotropy correctly).
4605
+ */
4606
+ private useOpenPBR;
4607
+ /**
4608
+ * @internal
4609
+ */
4610
+ constructor(loader: BABYLON.GLTF2.GLTFLoader);
4611
+ /** @internal */
4612
+ dispose(): void;
4613
+ /**
4614
+ * @internal
4615
+ */
4616
+ loadMaterialPropertiesAsync(context: string, material: BABYLON.GLTF2.Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
4617
+ private _loadCoatPropertiesAsync;
4618
+ }
4619
+
4620
+
4621
+
4622
+ }
4623
+ declare module BABYLON {
4624
+ interface GLTFLoaderExtensionOptions {
4625
+ /**
4626
+ * Defines options for the KHR_materials_coat extension.
4627
+ */
4628
+ ["KHR_materials_coat"]: {};
4629
+ }
4630
+
4524
4631
  }
4525
4632
  declare module BABYLON.GLTF2.Loader.Extensions {
4526
4633
  /**
@@ -4552,9 +4659,6 @@ declare module BABYLON.GLTF2.Loader.Extensions {
4552
4659
  */
4553
4660
  loadMaterialPropertiesAsync(context: string, material: BABYLON.GLTF2.Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
4554
4661
  private _loadClearCoatPropertiesAsync;
4555
- private _loadClearCoatDarkeningPropertiesAsync;
4556
- private _loadClearCoatColorPropertiesAsync;
4557
- private _loadClearCoatAnisotropyPropertiesAsync;
4558
4662
  }
4559
4663
 
4560
4664