babylonjs-loaders 9.6.2 → 9.8.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.
- package/babylon.bvhFileLoader.js +2 -0
- package/babylon.bvhFileLoader.js.map +1 -0
- package/babylon.glTF1FileLoader.js +2 -0
- package/babylon.glTF1FileLoader.js.map +1 -0
- package/babylon.glTF2FileLoader.js +2 -0
- package/babylon.glTF2FileLoader.js.map +1 -0
- package/babylon.glTF2FileLoader.min.js +1 -1
- package/babylon.glTF2FileLoader.min.js.map +1 -1
- package/babylon.glTFFileLoader.js +2 -0
- package/babylon.glTFFileLoader.js.map +1 -0
- package/babylon.glTFFileLoader.min.js +1 -1
- package/babylon.glTFFileLoader.min.js.map +1 -1
- package/babylon.objFileLoader.js +2 -0
- package/babylon.objFileLoader.js.map +1 -0
- package/babylon.stlFileLoader.js +2 -0
- package/babylon.stlFileLoader.js.map +1 -0
- package/babylonjs.loaders.d.ts +70 -4
- package/babylonjs.loaders.js +1 -1
- package/babylonjs.loaders.js.map +1 -1
- package/babylonjs.loaders.min.js +1 -1
- package/babylonjs.loaders.min.js.map +1 -1
- package/babylonjs.loaders.module.d.ts +143 -8
- package/package.json +3 -3
package/babylonjs.loaders.d.ts
CHANGED
|
@@ -628,6 +628,7 @@ declare namespace BABYLON.GLTF2 {
|
|
|
628
628
|
*/
|
|
629
629
|
export class PBRMaterialLoadingAdapter implements BABYLON.GLTF2.IMaterialLoadingAdapter {
|
|
630
630
|
private _material;
|
|
631
|
+
private _specWorkflow;
|
|
631
632
|
/**
|
|
632
633
|
* Creates a new instance of the PBRMaterialLoadingAdapter.
|
|
633
634
|
* @param material - The PBR material to adapt.
|
|
@@ -637,6 +638,11 @@ declare namespace BABYLON.GLTF2 {
|
|
|
637
638
|
* Gets the underlying material
|
|
638
639
|
*/
|
|
639
640
|
get material(): PBRMaterial;
|
|
641
|
+
/**
|
|
642
|
+
* No-op: PBRMaterial has no deferred finalization.
|
|
643
|
+
* @param _loader Unused.
|
|
644
|
+
*/
|
|
645
|
+
finalizeAsync(_loader: BABYLON.GLTF2.GLTFLoader): Promise<void>;
|
|
640
646
|
/**
|
|
641
647
|
* Whether the material should be treated as unlit
|
|
642
648
|
*/
|
|
@@ -769,6 +775,10 @@ declare namespace BABYLON.GLTF2 {
|
|
|
769
775
|
* @param enableEdgeColor Whether to enable OpenPBR BRDF models for edge color support
|
|
770
776
|
*/
|
|
771
777
|
enableSpecularEdgeColor(enableEdgeColor?: boolean): void;
|
|
778
|
+
/**
|
|
779
|
+
* Enable the specular/glossiness workflow and disable metallic/roughness.
|
|
780
|
+
*/
|
|
781
|
+
configureSpecularGlossiness(): void;
|
|
772
782
|
/**
|
|
773
783
|
* Sets the specular weight (mapped to PBR metallicF0Factor).
|
|
774
784
|
* @param value The specular weight value
|
|
@@ -842,6 +852,16 @@ declare namespace BABYLON.GLTF2 {
|
|
|
842
852
|
* @returns The IOR value
|
|
843
853
|
*/
|
|
844
854
|
get specularIor(): number;
|
|
855
|
+
/**
|
|
856
|
+
* Sets/gets the glossiness (inverted roughness)
|
|
857
|
+
* ONLY used for specular/glossiness workflow; has no effect when metallic/roughness workflow is active
|
|
858
|
+
*/
|
|
859
|
+
get glossiness(): number;
|
|
860
|
+
/**
|
|
861
|
+
* Sets/gets the glossiness (inverted roughness)
|
|
862
|
+
* ONLY used for specular/glossiness workflow; has no effect when metallic/roughness workflow is active
|
|
863
|
+
*/
|
|
864
|
+
set glossiness(value: number);
|
|
845
865
|
/**
|
|
846
866
|
* Sets the emission color (mapped to PBR emissiveColor).
|
|
847
867
|
* @param value The emission color as a Color3
|
|
@@ -1075,6 +1095,9 @@ declare namespace BABYLON.GLTF2 {
|
|
|
1075
1095
|
* Sets up the material for proper thin-surface transmission behavior.
|
|
1076
1096
|
*/
|
|
1077
1097
|
configureTransmission(): void;
|
|
1098
|
+
/**
|
|
1099
|
+
* Configures volume properties for PBR material. Nothing to do for PBRMaterial.
|
|
1100
|
+
*/
|
|
1078
1101
|
configureVolume(): void;
|
|
1079
1102
|
/**
|
|
1080
1103
|
* Sets whether the material is thin-walled (i.e. non-volumetric) or not.
|
|
@@ -1340,6 +1363,7 @@ declare namespace BABYLON.GLTF2 {
|
|
|
1340
1363
|
*/
|
|
1341
1364
|
export class OpenPBRMaterialLoadingAdapter implements BABYLON.GLTF2.IMaterialLoadingAdapter {
|
|
1342
1365
|
private _material;
|
|
1366
|
+
private _specWorkflow;
|
|
1343
1367
|
/**
|
|
1344
1368
|
* Creates a new instance of the OpenPBRMaterialLoadingAdapter.
|
|
1345
1369
|
* @param material - The OpenPBR material to adapt.
|
|
@@ -1482,6 +1506,7 @@ declare namespace BABYLON.GLTF2 {
|
|
|
1482
1506
|
* @param _enableEdgeColor Whether to enable edge color support (ignored for OpenPBR)
|
|
1483
1507
|
*/
|
|
1484
1508
|
enableSpecularEdgeColor(_enableEdgeColor?: boolean): void;
|
|
1509
|
+
configureSpecularGlossiness(): void;
|
|
1485
1510
|
/**
|
|
1486
1511
|
* Sets the specular weight of the OpenPBR material.
|
|
1487
1512
|
* @param value The specular weight value (0-1)
|
|
@@ -1554,6 +1579,11 @@ declare namespace BABYLON.GLTF2 {
|
|
|
1554
1579
|
* @returns The IOR value
|
|
1555
1580
|
*/
|
|
1556
1581
|
get specularIor(): number;
|
|
1582
|
+
/**
|
|
1583
|
+
* Sets the glossiness (inverted roughness) of the OpenPBR material.
|
|
1584
|
+
*/
|
|
1585
|
+
set glossiness(value: number);
|
|
1586
|
+
get glossiness(): number;
|
|
1557
1587
|
/**
|
|
1558
1588
|
* Sets the emission color of the OpenPBR material.
|
|
1559
1589
|
* @param value The emission color as a Color3
|
|
@@ -1634,6 +1664,10 @@ declare namespace BABYLON.GLTF2 {
|
|
|
1634
1664
|
* @param value The coat color as a Color3
|
|
1635
1665
|
*/
|
|
1636
1666
|
set coatColor(value: Color3);
|
|
1667
|
+
/**
|
|
1668
|
+
* Gets the coat color of the OpenPBR material.
|
|
1669
|
+
*/
|
|
1670
|
+
get coatColor(): Color3;
|
|
1637
1671
|
/**
|
|
1638
1672
|
* Sets the coat color texture of the OpenPBR material.
|
|
1639
1673
|
* @param value The coat color texture or null
|
|
@@ -1663,11 +1697,13 @@ declare namespace BABYLON.GLTF2 {
|
|
|
1663
1697
|
* Sets the coat index of refraction (IOR) of the OpenPBR material.
|
|
1664
1698
|
*/
|
|
1665
1699
|
set coatIor(value: number);
|
|
1700
|
+
get coatIor(): number;
|
|
1666
1701
|
/**
|
|
1667
1702
|
* Sets the coat darkening value of the OpenPBR material.
|
|
1668
1703
|
* @param value The coat darkening value
|
|
1669
1704
|
*/
|
|
1670
1705
|
set coatDarkening(value: number);
|
|
1706
|
+
get coatDarkening(): number;
|
|
1671
1707
|
/**
|
|
1672
1708
|
* Sets the coat darkening texture (OpenPBR: coatDarkeningTexture, no PBR equivalent)
|
|
1673
1709
|
*/
|
|
@@ -1716,6 +1752,7 @@ declare namespace BABYLON.GLTF2 {
|
|
|
1716
1752
|
* @param value The transmission weight texture or null
|
|
1717
1753
|
*/
|
|
1718
1754
|
set transmissionWeightTexture(value: Nullable<BaseTexture>);
|
|
1755
|
+
get transmissionWeightTexture(): Nullable<BaseTexture>;
|
|
1719
1756
|
/**
|
|
1720
1757
|
* Gets the transmission weight.
|
|
1721
1758
|
* @returns Currently returns 0 as transmission is not yet available
|
|
@@ -1784,6 +1821,9 @@ declare namespace BABYLON.GLTF2 {
|
|
|
1784
1821
|
* @param value The refraction background texture or null
|
|
1785
1822
|
*/
|
|
1786
1823
|
set refractionBackgroundTexture(value: Nullable<BaseTexture>);
|
|
1824
|
+
/**
|
|
1825
|
+
* Configures volume properties for OpenPBR material.
|
|
1826
|
+
*/
|
|
1787
1827
|
configureVolume(): void;
|
|
1788
1828
|
/**
|
|
1789
1829
|
* Sets whether the material is thin-walled (i.e. non-volumetric) or not.
|
|
@@ -1816,6 +1856,7 @@ declare namespace BABYLON.GLTF2 {
|
|
|
1816
1856
|
* Sets the subsurface weight texture
|
|
1817
1857
|
*/
|
|
1818
1858
|
set subsurfaceWeightTexture(value: Nullable<BaseTexture>);
|
|
1859
|
+
get subsurfaceWeightTexture(): Nullable<BaseTexture>;
|
|
1819
1860
|
/**
|
|
1820
1861
|
* Sets the subsurface color.
|
|
1821
1862
|
* @param value The subsurface tint color as a Color3
|
|
@@ -2015,7 +2056,12 @@ declare namespace BABYLON.GLTF2 {
|
|
|
2015
2056
|
* @param value The scale value for the coat normal texture
|
|
2016
2057
|
*/
|
|
2017
2058
|
set geometryCoatNormalTextureScale(value: number);
|
|
2018
|
-
|
|
2059
|
+
/**
|
|
2060
|
+
* Finalizes material properties after all loading is complete.
|
|
2061
|
+
* @param loader The glTF loader; `loader._disposed` is polled between texture passes to bail early on dispose.
|
|
2062
|
+
*/
|
|
2063
|
+
finalizeAsync(loader: BABYLON.GLTF2.GLTFLoader): Promise<void>;
|
|
2064
|
+
private copySurfaceToCoatAsync;
|
|
2019
2065
|
}
|
|
2020
2066
|
|
|
2021
2067
|
|
|
@@ -2036,9 +2082,16 @@ declare namespace BABYLON.GLTF2 {
|
|
|
2036
2082
|
*/
|
|
2037
2083
|
readonly material: Material;
|
|
2038
2084
|
/**
|
|
2039
|
-
* Finalizes material properties after loading is complete.
|
|
2085
|
+
* Finalizes material properties after all loading is complete.
|
|
2086
|
+
* May do async work (e.g. GPU texture processing); the returned Promise is tracked
|
|
2087
|
+
* by the loader and awaited before the COMPLETE state is reached, so callers can rely
|
|
2088
|
+
* on onCompleteObservable for fully processed materials.
|
|
2089
|
+
*
|
|
2090
|
+
* Implementations should check `loader._disposed` between awaits to bail out early
|
|
2091
|
+
* when the loader is disposed mid-flight.
|
|
2092
|
+
* @param loader The glTF loader driving the finalize step.
|
|
2040
2093
|
*/
|
|
2041
|
-
|
|
2094
|
+
finalizeAsync(loader: BABYLON.GLTF2.GLTFLoader): Promise<void>;
|
|
2042
2095
|
/**
|
|
2043
2096
|
* Whether the material should be treated as unlit
|
|
2044
2097
|
*/
|
|
@@ -2100,6 +2153,10 @@ declare namespace BABYLON.GLTF2 {
|
|
|
2100
2153
|
* @param enableEdgeColor - Whether to enable edge color support
|
|
2101
2154
|
*/
|
|
2102
2155
|
enableSpecularEdgeColor(enableEdgeColor?: boolean): void;
|
|
2156
|
+
/**
|
|
2157
|
+
* Enable the specular/glossiness workflow and disable metallic/roughness.
|
|
2158
|
+
*/
|
|
2159
|
+
configureSpecularGlossiness(): void;
|
|
2103
2160
|
/**
|
|
2104
2161
|
* Sets/gets the specular weight
|
|
2105
2162
|
*/
|
|
@@ -2128,6 +2185,11 @@ declare namespace BABYLON.GLTF2 {
|
|
|
2128
2185
|
* Sets/gets the specular IOR
|
|
2129
2186
|
*/
|
|
2130
2187
|
specularIor: number;
|
|
2188
|
+
/**
|
|
2189
|
+
* Sets/gets the glossiness (inverted roughness)
|
|
2190
|
+
* ONLY used for specular/glossiness workflow; has no effect when metallic/roughness workflow is active
|
|
2191
|
+
*/
|
|
2192
|
+
glossiness: number;
|
|
2131
2193
|
/**
|
|
2132
2194
|
* Sets/gets the emissive color
|
|
2133
2195
|
*/
|
|
@@ -2244,6 +2306,9 @@ declare namespace BABYLON.GLTF2 {
|
|
|
2244
2306
|
* Configures transmission for thin-surface transmission (KHR_materials_transmission)
|
|
2245
2307
|
*/
|
|
2246
2308
|
configureTransmission(): void;
|
|
2309
|
+
/**
|
|
2310
|
+
* Configures volume properties for volumetric transmission (KHR_materials_volume)
|
|
2311
|
+
*/
|
|
2247
2312
|
configureVolume(): void;
|
|
2248
2313
|
/**
|
|
2249
2314
|
* Sets whether the material is thin-walled (i.e. non-volumetric) or not.
|
|
@@ -2973,7 +3038,8 @@ declare namespace BABYLON.GLTF2 {
|
|
|
2973
3038
|
_skipStartAnimationStep: boolean;
|
|
2974
3039
|
private readonly _parent;
|
|
2975
3040
|
private readonly _extensions;
|
|
2976
|
-
|
|
3041
|
+
/** @internal */
|
|
3042
|
+
_disposed: boolean;
|
|
2977
3043
|
private _rootUrl;
|
|
2978
3044
|
private _fileName;
|
|
2979
3045
|
private _uniqueRootUrl;
|