babylonjs-loaders 7.37.0 → 7.37.2
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.glTF2FileLoader.js +55 -53
- package/babylon.glTF2FileLoader.min.js +1 -1
- package/babylon.glTF2FileLoader.min.js.map +1 -1
- package/babylon.glTFFileLoader.js +55 -53
- package/babylon.glTFFileLoader.min.js +1 -1
- package/babylon.glTFFileLoader.min.js.map +1 -1
- package/babylonjs.loaders.d.ts +42 -17
- package/babylonjs.loaders.js +237 -101
- package/babylonjs.loaders.min.js +1 -1
- package/babylonjs.loaders.min.js.map +1 -1
- package/babylonjs.loaders.module.d.ts +87 -35
- package/package.json +3 -3
package/babylonjs.loaders.d.ts
CHANGED
|
@@ -2031,53 +2031,55 @@ declare module BABYLON.GLTF2.Loader.Extensions {
|
|
|
2031
2031
|
dispose(): void;
|
|
2032
2032
|
/**
|
|
2033
2033
|
* Gets the list of available variant names for this asset.
|
|
2034
|
-
* @param
|
|
2034
|
+
* @param rootNode The glTF root node
|
|
2035
2035
|
* @returns the list of all the variant names for this model
|
|
2036
2036
|
*/
|
|
2037
|
-
static GetAvailableVariants(
|
|
2037
|
+
static GetAvailableVariants(rootNode: TransformNode): string[];
|
|
2038
2038
|
/**
|
|
2039
2039
|
* Gets the list of available variant names for this asset.
|
|
2040
|
-
* @param
|
|
2040
|
+
* @param rootNode The glTF root node
|
|
2041
2041
|
* @returns the list of all the variant names for this model
|
|
2042
2042
|
*/
|
|
2043
|
-
getAvailableVariants(
|
|
2043
|
+
getAvailableVariants(rootNode: TransformNode): string[];
|
|
2044
2044
|
/**
|
|
2045
2045
|
* Select a variant given a variant name or a list of variant names.
|
|
2046
|
-
* @param
|
|
2046
|
+
* @param rootNode The glTF root node
|
|
2047
2047
|
* @param variantName The variant name(s) to select.
|
|
2048
2048
|
*/
|
|
2049
|
-
static SelectVariant(
|
|
2049
|
+
static SelectVariant(rootNode: TransformNode, variantName: string | string[]): void;
|
|
2050
2050
|
/**
|
|
2051
2051
|
* Select a variant given a variant name or a list of variant names.
|
|
2052
|
-
* @param
|
|
2052
|
+
* @param rootNode The glTF root node
|
|
2053
2053
|
* @param variantName The variant name(s) to select.
|
|
2054
2054
|
*/
|
|
2055
|
-
selectVariant(
|
|
2055
|
+
selectVariant(rootNode: TransformNode, variantName: string | string[]): void;
|
|
2056
2056
|
/**
|
|
2057
2057
|
* Reset back to the original before selecting a variant.
|
|
2058
|
-
* @param
|
|
2058
|
+
* @param rootNode The glTF root node
|
|
2059
2059
|
*/
|
|
2060
|
-
static Reset(
|
|
2060
|
+
static Reset(rootNode: TransformNode): void;
|
|
2061
2061
|
/**
|
|
2062
2062
|
* Reset back to the original before selecting a variant.
|
|
2063
|
-
* @param
|
|
2063
|
+
* @param rootNode The glTF root node
|
|
2064
2064
|
*/
|
|
2065
|
-
reset(
|
|
2065
|
+
reset(rootNode: TransformNode): void;
|
|
2066
2066
|
/**
|
|
2067
2067
|
* Gets the last selected variant name(s) or null if original.
|
|
2068
|
-
* @param
|
|
2068
|
+
* @param rootNode The glTF root node
|
|
2069
2069
|
* @returns The selected variant name(s).
|
|
2070
2070
|
*/
|
|
2071
|
-
static GetLastSelectedVariant(
|
|
2071
|
+
static GetLastSelectedVariant(rootNode: TransformNode): Nullable<string | string[]>;
|
|
2072
2072
|
/**
|
|
2073
2073
|
* Gets the last selected variant name(s) or null if original.
|
|
2074
|
-
* @param
|
|
2074
|
+
* @param rootNode The glTF root node
|
|
2075
2075
|
* @returns The selected variant name(s).
|
|
2076
2076
|
*/
|
|
2077
|
-
getLastSelectedVariant(
|
|
2077
|
+
getLastSelectedVariant(rootNode: TransformNode): Nullable<string | string[]>;
|
|
2078
2078
|
private static _GetExtensionMetadata;
|
|
2079
2079
|
/** @internal */
|
|
2080
2080
|
onLoading(): void;
|
|
2081
|
+
/** @internal */
|
|
2082
|
+
onReady(): void;
|
|
2081
2083
|
/**
|
|
2082
2084
|
* @internal
|
|
2083
2085
|
*/
|
|
@@ -2088,11 +2090,27 @@ declare module BABYLON.GLTF2.Loader.Extensions {
|
|
|
2088
2090
|
|
|
2089
2091
|
}
|
|
2090
2092
|
declare module BABYLON {
|
|
2093
|
+
type MaterialVariantsController = {
|
|
2094
|
+
/**
|
|
2095
|
+
* The list of available variant names for this asset.
|
|
2096
|
+
*/
|
|
2097
|
+
readonly variants: readonly string[];
|
|
2098
|
+
/**
|
|
2099
|
+
* Gets or sets the selected variant.
|
|
2100
|
+
*/
|
|
2101
|
+
selectedVariant: string;
|
|
2102
|
+
};
|
|
2091
2103
|
interface GLTFLoaderExtensionOptions {
|
|
2092
2104
|
/**
|
|
2093
2105
|
* Defines options for the KHR_materials_variants extension.
|
|
2094
2106
|
*/
|
|
2095
|
-
["KHR_materials_variants"]: {
|
|
2107
|
+
["KHR_materials_variants"]: Partial<{
|
|
2108
|
+
/**
|
|
2109
|
+
* Defines a callback that will be called if material variants are loaded.
|
|
2110
|
+
* @experimental
|
|
2111
|
+
*/
|
|
2112
|
+
onLoaded: (controller: MaterialVariantsController) => void;
|
|
2113
|
+
}>;
|
|
2096
2114
|
}
|
|
2097
2115
|
|
|
2098
2116
|
}
|
|
@@ -4111,6 +4129,9 @@ declare module BABYLON {
|
|
|
4111
4129
|
readonly ".ply": {
|
|
4112
4130
|
readonly isBinary: true;
|
|
4113
4131
|
};
|
|
4132
|
+
readonly ".spz": {
|
|
4133
|
+
readonly isBinary: true;
|
|
4134
|
+
};
|
|
4114
4135
|
};
|
|
4115
4136
|
};
|
|
4116
4137
|
|
|
@@ -4144,6 +4165,9 @@ declare module BABYLON {
|
|
|
4144
4165
|
readonly ".ply": {
|
|
4145
4166
|
readonly isBinary: true;
|
|
4146
4167
|
};
|
|
4168
|
+
readonly ".spz": {
|
|
4169
|
+
readonly isBinary: true;
|
|
4170
|
+
};
|
|
4147
4171
|
};
|
|
4148
4172
|
/**
|
|
4149
4173
|
* Creates loader for gaussian splatting files
|
|
@@ -4166,6 +4190,7 @@ declare module BABYLON {
|
|
|
4166
4190
|
importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
|
|
4167
4191
|
private static _BuildPointCloud;
|
|
4168
4192
|
private static _BuildMesh;
|
|
4193
|
+
private _parseSPZ;
|
|
4169
4194
|
private _parse;
|
|
4170
4195
|
/**
|
|
4171
4196
|
* Load into an asset container.
|