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