586f31dec310993b166149b1a95129b0f98dd3ee81dd9230bf6a4386bfc7c4bc.json 123 KB

1
  1. {"ast":null,"code":"import _asyncToGenerator from \"F:/workspace/202226701027/huinongbao-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { Tools } from \"../Misc/tools.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { Scene } from \"../scene.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { SceneLoaderFlags } from \"./sceneLoaderFlags.js\";\nimport { IsBase64DataUrl } from \"../Misc/fileTools.js\";\nimport { RuntimeError, ErrorCodes } from \"../Misc/error.js\";\nimport { RandomGUID } from \"../Misc/guid.js\";\nimport { AbstractEngine } from \"../Engines/abstractEngine.js\";\nimport { _FetchAsync } from \"../Misc/webRequest.fetch.js\";\n/**\n * Mode that determines how to handle old animation groups before loading new ones.\n */\nexport var SceneLoaderAnimationGroupLoadingMode;\n(function (SceneLoaderAnimationGroupLoadingMode) {\n /**\n * Reset all old animations to initial state then dispose them.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"Clean\"] = 0] = \"Clean\";\n /**\n * Stop all old animations.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"Stop\"] = 1] = \"Stop\";\n /**\n * Restart old animations from first frame.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"Sync\"] = 2] = \"Sync\";\n /**\n * Old animations remains untouched.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"NoSync\"] = 3] = \"NoSync\";\n})(SceneLoaderAnimationGroupLoadingMode || (SceneLoaderAnimationGroupLoadingMode = {}));\nfunction isFactory(pluginOrFactory) {\n return !!pluginOrFactory.createPlugin;\n}\nfunction isFile(value) {\n return !!value.name;\n}\nconst onPluginActivatedObservable = new Observable();\nconst registeredPlugins = {};\nlet showingLoadingScreen = false;\nfunction getDefaultPlugin() {\n return registeredPlugins[\".babylon\"];\n}\nfunction getPluginForMimeType(mimeType) {\n for (const registeredPluginKey in registeredPlugins) {\n const registeredPlugin = registeredPlugins[registeredPluginKey];\n if (registeredPlugin.mimeType === mimeType) {\n return registeredPlugin;\n }\n }\n return undefined;\n}\nfunction getPluginForExtension(extension, returnDefault) {\n const registeredPlugin = registeredPlugins[extension];\n if (registeredPlugin) {\n return registeredPlugin;\n }\n Logger.Warn(\"Unable to find a plugin to load \" + extension + \" files. Trying to use .babylon default plugin. To load from a specific filetype (eg. gltf) see: https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes\");\n return returnDefault ? getDefaultPlugin() : undefined;\n}\nfunction isPluginForExtensionAvailable(extension) {\n return !!registeredPlugins[extension];\n}\nfunction getPluginForDirectLoad(data) {\n for (const extension in registeredPlugins) {\n const plugin = registeredPlugins[extension].plugin;\n if (plugin.canDirectLoad && plugin.canDirectLoad(data)) {\n return registeredPlugins[extension];\n }\n }\n return getDefaultPlugin();\n}\nfunction getFilenameExtension(sceneFilename) {\n const queryStringPosition = sceneFilename.indexOf(\"?\");\n if (queryStringPosition !== -1) {\n sceneFilename = sceneFilename.substring(0, queryStringPosition);\n }\n const dotPosition = sceneFilename.lastIndexOf(\".\");\n return sceneFilename.substring(dotPosition, sceneFilename.length).toLowerCase();\n}\nfunction getDirectLoad(sceneFilename) {\n if (sceneFilename.substring(0, 5) === \"data:\") {\n return sceneFilename.substring(5);\n }\n return null;\n}\nfunction formatErrorMessage(fileInfo, message, exception) {\n const fromLoad = fileInfo.rawData ? \"binary data\" : fileInfo.url;\n let errorMessage = \"Unable to load from \" + fromLoad;\n if (message) {\n errorMessage += `: ${message}`;\n } else if (exception) {\n errorMessage += `: ${exception}`;\n }\n return errorMessage;\n}\nfunction loadDataAsync(_x, _x2, _x3, _x4, _x5, _x6, _x7, _x8, _x9) {\n return _loadDataAsync.apply(this, arguments);\n}\nfunction _loadDataAsync() {\n _loadDataAsync = _asyncToGenerator(function* (fileInfo, scene, onSuccess, onProgress, onError, onDispose, pluginExtension, name, pluginOptions) {\n var _pluginOptions$regist;\n const directLoad = getDirectLoad(fileInfo.url);\n if (fileInfo.rawData && !pluginExtension) {\n // eslint-disable-next-line no-throw-literal\n throw \"When using ArrayBufferView to load data the file extension must be provided.\";\n }\n const fileExtension = !directLoad && !pluginExtension ? getFilenameExtension(fileInfo.url) : \"\";\n let registeredPlugin = pluginExtension ? getPluginForExtension(pluginExtension, true) : directLoad ? getPluginForDirectLoad(fileInfo.url) : getPluginForExtension(fileExtension, false);\n if (!registeredPlugin && fileExtension) {\n if (fileInfo.url && !fileInfo.url.startsWith(\"blob:\")) {\n // Fetching head content to get the mime type\n const response = yield _FetchAsync(fileInfo.url, {\n method: \"HEAD\",\n responseHeaders: [\"Content-Type\"]\n });\n const mimeType = response.headerValues ? response.headerValues[\"Content-Type\"] : \"\";\n if (mimeType) {\n registeredPlugin = getPluginForMimeType(mimeType);\n }\n }\n if (!registeredPlugin) {\n registeredPlugin = getDefaultPlugin();\n }\n }\n if (!registeredPlugin) {\n throw new Error(`No plugin or fallback for ${pluginExtension !== null && pluginExtension !== void 0 ? pluginExtension : fileInfo.url}`);\n }\n if ((pluginOptions === null || pluginOptions === void 0 || (_pluginOptions$regist = pluginOptions[registeredPlugin.plugin.name]) === null || _pluginOptions$regist === void 0 ? void 0 : _pluginOptions$regist.enabled) === false) {\n throw new Error(`The '${registeredPlugin.plugin.name}' plugin is disabled via the loader options passed to the loading operation.`);\n }\n if (fileInfo.rawData && !registeredPlugin.isBinary) {\n // eslint-disable-next-line no-throw-literal\n throw \"Loading from ArrayBufferView can not be used with plugins that don't support binary loading.\";\n }\n const getPluginInstance = callback => {\n // For plugin factories, the plugin is instantiated on each SceneLoader operation. This makes options handling\n // much simpler as we can just pass the options to the factory, rather than passing options through to every possible\n // plugin call. Given this, options are only supported for plugins that provide a factory function.\n if (isFactory(registeredPlugin.plugin)) {\n const pluginFactory = registeredPlugin.plugin;\n const partialPlugin = pluginFactory.createPlugin(pluginOptions !== null && pluginOptions !== void 0 ? pluginOptions : {});\n if (partialPlugin instanceof Promise) {\n partialPlugin.then(callback).catch(error => {\n onError(\"Error instantiating plugin.\", error);\n });\n // When async factories are used, the plugin instance cannot be returned synchronously.\n // In this case, the legacy loader functions will return null.\n return null;\n } else {\n callback(partialPlugin);\n return partialPlugin;\n }\n } else {\n callback(registeredPlugin.plugin);\n return registeredPlugin.plugin;\n }\n };\n return getPluginInstance(plugin => {\n var _plugin$onDisposeObse;\n if (!plugin) {\n // eslint-disable-next-line no-throw-literal\n throw `The loader plugin corresponding to the '${pluginExtension}' file type has not been found. If using es6, please import the plugin you wish to use before.`;\n }\n onPluginActivatedObservable.notifyObservers(plugin);\n // Check if we have a direct load url. If the plugin is registered to handle\n // it or it's not a base64 data url, then pass it through the direct load path.\n if (directLoad && (plugin.canDirectLoad && plugin.canDirectLoad(fileInfo.url) || !IsBase64DataUrl(fileInfo.url))) {\n if (plugin.directLoad) {\n const result = plugin.directLoad(scene, directLoad);\n if (result instanceof Promise) {\n result.then(data => {\n onSuccess(plugin, data);\n }).catch(error => {\n onError(\"Error in directLoad of _loadData: \" + error, error);\n });\n } else {\n onSuccess(plugin, result);\n }\n } else {\n onSuccess(plugin, directLoad);\n }\n return;\n }\n const useArrayBuffer = registeredPlugin.isBinary;\n const dataCallback = (data, responseURL) => {\n if (scene.isDisposed) {\n onError(\"Scene has been disposed\");\n return;\n }\n onSuccess(plugin, data, responseURL);\n };\n let request = null;\n let pluginDisposed = false;\n (_plugin$onDisposeObse = plugin.onDisposeObservable) === null || _plugin$onDisposeObse === void 0 || _plugin$onDisposeObse.add(() => {\n pluginDisposed = true;\n if (request) {\n request.abort();\n request = null;\n }\n onDispose();\n });\n const manifestChecked = () => {\n if (pluginDisposed) {\n return;\n }\n const errorCallback = (request, exception) => {\n onError(request === null || request === void 0 ? void 0 : request.statusText, exception);\n };\n if (!plugin.loadFile && fileInfo.rawData) {\n // eslint-disable-next-line no-throw-literal\n throw \"Plugin does not support loading ArrayBufferView.\";\n }\n request = plugin.loadFile ? plugin.loadFile(scene, fileInfo.rawData || fileInfo.file || fileInfo.url, fileInfo.rootUrl, dataCallback, onProgress, useArrayBuffer, errorCallback, name) : scene._loadFile(fileInfo.file || fileInfo.url, dataCallback, onProgress, true, useArrayBuffer, errorCallback);\n };\n const engine = scene.getEngine();\n let canUseOfflineSupport = engine.enableOfflineSupport;\n if (canUseOfflineSupport) {\n // Also check for exceptions\n let exceptionFound = false;\n for (const regex of scene.disableOfflineSupportExceptionRules) {\n if (regex.test(fileInfo.url)) {\n exceptionFound = true;\n break;\n }\n }\n canUseOfflineSupport = !exceptionFound;\n }\n if (canUseOfflineSupport && AbstractEngine.OfflineProviderFactory) {\n // Checking if a manifest file has been set for this scene and if offline mode has been requested\n scene.offlineProvider = AbstractEngine.OfflineProviderFactory(fileInfo.url, manifestChecked, engine.disableManifestCheck);\n } else {\n manifestChecked();\n }\n });\n });\n return _loadDataAsync.apply(this, arguments);\n}\nfunction _getFileInfo(rootUrl, sceneSource) {\n let url;\n let name;\n let file = null;\n let rawData = null;\n if (!sceneSource) {\n url = rootUrl;\n name = Tools.GetFilename(rootUrl);\n rootUrl = Tools.GetFolderPath(rootUrl);\n } else if (isFile(sceneSource)) {\n url = `file:${sceneSource.name}`;\n name = sceneSource.name;\n file = sceneSource;\n } else if (ArrayBuffer.isView(sceneSource)) {\n url = \"\";\n name = RandomGUID();\n rawData = sceneSource;\n } else if (sceneSource.startsWith(\"data:\")) {\n url = sceneSource;\n name = \"\";\n } else if (rootUrl) {\n const filename = sceneSource;\n if (filename.substring(0, 1) === \"/\") {\n Tools.Error(\"Wrong sceneFilename parameter\");\n return null;\n }\n url = rootUrl + filename;\n name = filename;\n } else {\n url = sceneSource;\n name = Tools.GetFilename(sceneSource);\n rootUrl = Tools.GetFolderPath(sceneSource);\n }\n return {\n url: url,\n rootUrl: rootUrl,\n name: name,\n file: file,\n rawData\n };\n}\n/**\n * Adds a new plugin to the list of registered plugins\n * @param plugin defines the plugin to add\n */\nexport function registerSceneLoaderPlugin(plugin) {\n if (typeof plugin.extensions === \"string\") {\n const extension = plugin.extensions;\n registeredPlugins[extension.toLowerCase()] = {\n plugin: plugin,\n isBinary: false\n };\n } else {\n const extensions = plugin.extensions;\n Object.keys(extensions).forEach(extension => {\n registeredPlugins[extension.toLowerCase()] = {\n plugin: plugin,\n isBinary: extensions[extension].isBinary,\n mimeType: extensions[extension].mimeType\n };\n });\n }\n}\nfunction importMeshAsync(_x10, _x11) {\n return _importMeshAsync.apply(this, arguments);\n}\nfunction _importMeshAsync() {\n _importMeshAsync = _asyncToGenerator(function* (meshNames, rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\", pluginOptions = {}) {\n if (!scene) {\n Logger.Error(\"No scene available to import mesh to\");\n return null;\n }\n const fileInfo = _getFileInfo(rootUrl, sceneFilename);\n if (!fileInfo) {\n return null;\n }\n const loadingToken = {};\n scene.addPendingData(loadingToken);\n const disposeHandler = () => {\n scene.removePendingData(loadingToken);\n };\n const errorHandler = (message, exception) => {\n const errorMessage = formatErrorMessage(fileInfo, message, exception);\n if (onError) {\n onError(scene, errorMessage, new RuntimeError(errorMessage, ErrorCodes.SceneLoaderError, exception));\n } else {\n Logger.Error(errorMessage);\n // should the exception be thrown?\n }\n disposeHandler();\n };\n const progressHandler = onProgress ? event => {\n try {\n onProgress(event);\n } catch (e) {\n errorHandler(\"Error in onProgress callback: \" + e, e);\n }\n } : undefined;\n const successHandler = (meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights, spriteManagers) => {\n scene.importedMeshesFiles.push(fileInfo.url);\n if (onSuccess) {\n try {\n onSuccess(meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights, spriteManagers);\n } catch (e) {\n errorHandler(\"Error in onSuccess callback: \" + e, e);\n }\n }\n scene.removePendingData(loadingToken);\n };\n return yield loadDataAsync(fileInfo, scene, (plugin, data, responseURL) => {\n if (plugin.rewriteRootURL) {\n fileInfo.rootUrl = plugin.rewriteRootURL(fileInfo.rootUrl, responseURL);\n }\n if (plugin.importMesh) {\n const syncedPlugin = plugin;\n const meshes = [];\n const particleSystems = [];\n const skeletons = [];\n if (!syncedPlugin.importMesh(meshNames, scene, data, fileInfo.rootUrl, meshes, particleSystems, skeletons, errorHandler)) {\n return;\n }\n scene.loadingPluginName = plugin.name;\n successHandler(meshes, particleSystems, skeletons, [], [], [], [], []);\n } else {\n const asyncedPlugin = plugin;\n asyncedPlugin.importMeshAsync(meshNames, scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name).then(result => {\n scene.loadingPluginName = plugin.name;\n successHandler(result.meshes, result.particleSystems, result.skeletons, result.animationGroups, result.transformNodes, result.geometries, result.lights, result.spriteManagers);\n }).catch(error => {\n errorHandler(error.message, error);\n });\n }\n }, progressHandler, errorHandler, disposeHandler, pluginExtension, name, pluginOptions);\n });\n return _importMeshAsync.apply(this, arguments);\n}\nfunction importMeshAsyncCore(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name, pluginOptions) {\n return new Promise((resolve, reject) => {\n importMeshAsync(meshNames, rootUrl, sceneFilename, scene, (meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights, spriteManagers) => {\n resolve({\n meshes: meshes,\n particleSystems: particleSystems,\n skeletons: skeletons,\n animationGroups: animationGroups,\n transformNodes: transformNodes,\n geometries: geometries,\n lights: lights,\n spriteManagers: spriteManagers\n });\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name, pluginOptions);\n });\n}\nfunction loadScene(rootUrl, sceneFilename = \"\", engine = EngineStore.LastCreatedEngine, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\", pluginOptions = {}) {\n if (!engine) {\n Tools.Error(\"No engine available\");\n return;\n }\n appendAsync(rootUrl, sceneFilename, new Scene(engine), onSuccess, onProgress, onError, pluginExtension, name, pluginOptions);\n}\n/**\n * Load a scene\n * @experimental\n * @param source a string that defines the name of the scene file, or starts with \"data:\" following by the stringified version of the scene, or a File object, or an ArrayBufferView\n * @param engine is the instance of BABYLON.Engine to use to create the scene\n * @param options an object that configures aspects of how the scene is loaded\n * @returns The loaded scene\n */\nexport function loadSceneAsync(source, engine, options) {\n const {\n rootUrl = \"\",\n onProgress,\n pluginExtension,\n name,\n pluginOptions\n } = options !== null && options !== void 0 ? options : {};\n return loadSceneAsyncCore(rootUrl, source, engine, onProgress, pluginExtension, name, pluginOptions);\n}\nfunction loadSceneAsyncCore(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name, pluginOptions) {\n return new Promise((resolve, reject) => {\n loadScene(rootUrl, sceneFilename, engine, scene => {\n resolve(scene);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name, pluginOptions);\n });\n}\nfunction appendAsync(_x12) {\n return _appendAsync.apply(this, arguments);\n}\n/**\n * Append a scene\n * @experimental\n * @param source a string that defines the name of the scene file, or starts with \"data:\" following by the stringified version of the scene, or a File object, or an ArrayBufferView\n * @param scene is the instance of BABYLON.Scene to append to\n * @param options an object that configures aspects of how the scene is loaded\n */\nfunction _appendAsync() {\n _appendAsync = _asyncToGenerator(function* (rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\", pluginOptions = {}) {\n if (!scene) {\n Logger.Error(\"No scene available to append to\");\n return null;\n }\n const fileInfo = _getFileInfo(rootUrl, sceneFilename);\n if (!fileInfo) {\n return null;\n }\n const loadingToken = {};\n scene.addPendingData(loadingToken);\n const disposeHandler = () => {\n scene.removePendingData(loadingToken);\n };\n if (SceneLoaderFlags.ShowLoadingScreen && !showingLoadingScreen) {\n showingLoadingScreen = true;\n scene.getEngine().displayLoadingUI();\n scene.executeWhenReady(() => {\n scene.getEngine().hideLoadingUI();\n showingLoadingScreen = false;\n });\n }\n const errorHandler = (message, exception) => {\n const errorMessage = formatErrorMessage(fileInfo, message, exception);\n if (onError) {\n onError(scene, errorMessage, new RuntimeError(errorMessage, ErrorCodes.SceneLoaderError, exception));\n } else {\n Logger.Error(errorMessage);\n // should the exception be thrown?\n }\n disposeHandler();\n };\n const progressHandler = onProgress ? event => {\n try {\n onProgress(event);\n } catch (e) {\n errorHandler(\"Error in onProgress callback\", e);\n }\n } : undefined;\n const successHandler = () => {\n if (onSuccess) {\n try {\n onSuccess(scene);\n } catch (e) {\n errorHandler(\"Error in onSuccess callback\", e);\n }\n }\n scene.removePendingData(loadingToken);\n };\n return yield loadDataAsync(fileInfo, scene, (plugin, data) => {\n if (plugin.load) {\n const syncedPlugin = plugin;\n if (!syncedPlugin.load(scene, data, fileInfo.rootUrl, errorHandler)) {\n return;\n }\n scene.loadingPluginName = plugin.name;\n successHandler();\n } else {\n const asyncedPlugin = plugin;\n asyncedPlugin.loadAsync(scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name).then(() => {\n scene.loadingPluginName = plugin.name;\n successHandler();\n }).catch(error => {\n errorHandler(error.message, error);\n });\n }\n }, progressHandler, errorHandler, disposeHandler, pluginExtension, name, pluginOptions);\n });\n return _appendAsync.apply(this, arguments);\n}\nexport function appendSceneAsync(_x13, _x14, _x15) {\n return _appendSceneAsync.apply(this, arguments);\n}\nfunction _appendSceneAsync() {\n _appendSceneAsync = _asyncToGenerator(function* (source, scene, options) {\n const {\n rootUrl = \"\",\n onProgress,\n pluginExtension,\n name,\n pluginOptions\n } = options !== null && options !== void 0 ? options : {};\n yield appendSceneAsyncCore(rootUrl, source, scene, onProgress, pluginExtension, name, pluginOptions);\n });\n return _appendSceneAsync.apply(this, arguments);\n}\nfunction appendSceneAsyncCore(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name, pluginOptions) {\n return new Promise((resolve, reject) => {\n appendAsync(rootUrl, sceneFilename, scene, scene => {\n resolve(scene);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name, pluginOptions);\n });\n}\nfunction loadAssetContainerCoreAsync(_x16) {\n return _loadAssetContainerCoreAsync.apply(this, arguments);\n}\n/**\n * Load a scene into an asset container\n * @experimental\n * @param source a string that defines the name of the scene file, or starts with \"data:\" following by the stringified version of the scene, or a File object, or an ArrayBufferView\n * @param scene is the instance of Scene to append to\n * @param options an object that configures aspects of how the scene is loaded\n * @returns The loaded asset container\n */\nfunction _loadAssetContainerCoreAsync() {\n _loadAssetContainerCoreAsync = _asyncToGenerator(function* (rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\", pluginOptions = {}) {\n if (!scene) {\n Logger.Error(\"No scene available to load asset container to\");\n return null;\n }\n const fileInfo = _getFileInfo(rootUrl, sceneFilename);\n if (!fileInfo) {\n return null;\n }\n const loadingToken = {};\n scene.addPendingData(loadingToken);\n const disposeHandler = () => {\n scene.removePendingData(loadingToken);\n };\n const errorHandler = (message, exception) => {\n const errorMessage = formatErrorMessage(fileInfo, message, exception);\n if (onError) {\n onError(scene, errorMessage, new RuntimeError(errorMessage, ErrorCodes.SceneLoaderError, exception));\n } else {\n Logger.Error(errorMessage);\n // should the exception be thrown?\n }\n disposeHandler();\n };\n const progressHandler = onProgress ? event => {\n try {\n onProgress(event);\n } catch (e) {\n errorHandler(\"Error in onProgress callback\", e);\n }\n } : undefined;\n const successHandler = assets => {\n if (onSuccess) {\n try {\n onSuccess(assets);\n } catch (e) {\n errorHandler(\"Error in onSuccess callback\", e);\n }\n }\n scene.removePendingData(loadingToken);\n };\n return yield loadDataAsync(fileInfo, scene, (plugin, data) => {\n if (plugin.loadAssetContainer) {\n const syncedPlugin = plugin;\n const assetContainer = syncedPlugin.loadAssetContainer(scene, data, fileInfo.rootUrl, errorHandler);\n if (!assetContainer) {\n return;\n }\n assetContainer.populateRootNodes();\n scene.loadingPluginName = plugin.name;\n successHandler(assetContainer);\n } else if (plugin.loadAssetContainerAsync) {\n const asyncedPlugin = plugin;\n asyncedPlugin.loadAssetContainerAsync(scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name).then(assetContainer => {\n assetContainer.populateRootNodes();\n scene.loadingPluginName = plugin.name;\n successHandler(assetContainer);\n }).catch(error => {\n errorHandler(error.message, error);\n });\n } else {\n errorHandler(\"LoadAssetContainer is not supported by this plugin. Plugin did not provide a loadAssetContainer or loadAssetContainerAsync method.\");\n }\n }, progressHandler, errorHandler, disposeHandler, pluginExtension, name, pluginOptions);\n });\n return _loadAssetContainerCoreAsync.apply(this, arguments);\n}\nexport function loadAssetContainerAsync(source, scene, options) {\n const {\n rootUrl = \"\",\n onProgress,\n pluginExtension,\n name,\n pluginOptions\n } = options !== null && options !== void 0 ? options : {};\n return internalLoadAssetContainerAsync(rootUrl, source, scene, onProgress, pluginExtension, name, pluginOptions);\n}\nfunction internalLoadAssetContainerAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name, pluginOptions) {\n return new Promise((resolve, reject) => {\n loadAssetContainerCoreAsync(rootUrl, sceneFilename, scene, assets => {\n resolve(assets);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name, pluginOptions);\n });\n}\nfunction importAnimations(rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, overwriteAnimations = true, animationGroupLoadingMode = 0 /* SceneLoaderAnimationGroupLoadingMode.Clean */, targetConverter = null, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\", pluginOptions = {}) {\n if (!scene) {\n Logger.Error(\"No scene available to load animations to\");\n return;\n }\n if (overwriteAnimations) {\n // Reset, stop and dispose all animations before loading new ones\n for (const animatable of scene.animatables) {\n animatable.reset();\n }\n scene.stopAllAnimations();\n scene.animationGroups.slice().forEach(animationGroup => {\n animationGroup.dispose();\n });\n const nodes = scene.getNodes();\n nodes.forEach(node => {\n if (node.animations) {\n node.animations = [];\n }\n });\n } else {\n switch (animationGroupLoadingMode) {\n case 0 /* SceneLoaderAnimationGroupLoadingMode.Clean */:\n scene.animationGroups.slice().forEach(animationGroup => {\n animationGroup.dispose();\n });\n break;\n case 1 /* SceneLoaderAnimationGroupLoadingMode.Stop */:\n scene.animationGroups.forEach(animationGroup => {\n animationGroup.stop();\n });\n break;\n case 2 /* SceneLoaderAnimationGroupLoadingMode.Sync */:\n scene.animationGroups.forEach(animationGroup => {\n animationGroup.reset();\n animationGroup.restart();\n });\n break;\n case 3 /* SceneLoaderAnimationGroupLoadingMode.NoSync */:\n // nothing to do\n break;\n default:\n Logger.Error(\"Unknown animation group loading mode value '\" + animationGroupLoadingMode + \"'\");\n return;\n }\n }\n const startingIndexForNewAnimatables = scene.animatables.length;\n const onAssetContainerLoaded = container => {\n container.mergeAnimationsTo(scene, scene.animatables.slice(startingIndexForNewAnimatables), targetConverter);\n container.dispose();\n scene.onAnimationFileImportedObservable.notifyObservers(scene);\n if (onSuccess) {\n onSuccess(scene);\n }\n };\n loadAssetContainerCoreAsync(rootUrl, sceneFilename, scene, onAssetContainerLoaded, onProgress, onError, pluginExtension, name, pluginOptions);\n}\n/**\n * Import animations from a file into a scene\n * @experimental\n * @param source a string that defines the name of the scene file, or starts with \"data:\" following by the stringified version of the scene, or a File object, or an ArrayBufferView\n * @param scene is the instance of BABYLON.Scene to append to\n * @param options an object that configures aspects of how the scene is loaded\n */\nexport function importAnimationsAsync(_x17, _x18, _x19) {\n return _importAnimationsAsync.apply(this, arguments);\n}\nfunction _importAnimationsAsync() {\n _importAnimationsAsync = _asyncToGenerator(function* (source, scene, options) {\n const {\n rootUrl = \"\",\n overwriteAnimations,\n animationGroupLoadingMode,\n targetConverter,\n onProgress,\n pluginExtension,\n name,\n pluginOptions\n } = options !== null && options !== void 0 ? options : {};\n yield importAnimationsAsyncCore(rootUrl, source, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onProgress, pluginExtension, name, pluginOptions);\n });\n return _importAnimationsAsync.apply(this, arguments);\n}\nfunction importAnimationsAsyncCore(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onProgress, pluginExtension, name, pluginOptions) {\n return new Promise((resolve, reject) => {\n importAnimations(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, scene => {\n resolve(scene);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name, pluginOptions);\n });\n}\n/**\n * Class used to load scene from various file formats using registered plugins\n * @see https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes\n */\nexport class SceneLoader {\n /**\n * Gets or sets a boolean indicating if entire scene must be loaded even if scene contains incremental data\n */\n static get ForceFullSceneLoadingForIncremental() {\n return SceneLoaderFlags.ForceFullSceneLoadingForIncremental;\n }\n static set ForceFullSceneLoadingForIncremental(value) {\n SceneLoaderFlags.ForceFullSceneLoadingForIncremental = value;\n }\n /**\n * Gets or sets a boolean indicating if loading screen must be displayed while loading a scene\n */\n static get ShowLoadingScreen() {\n return SceneLoaderFlags.ShowLoadingScreen;\n }\n static set ShowLoadingScreen(value) {\n SceneLoaderFlags.ShowLoadingScreen = value;\n }\n /**\n * Defines the current logging level (while loading the scene)\n * @ignorenaming\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static get loggingLevel() {\n return SceneLoaderFlags.loggingLevel;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static set loggingLevel(value) {\n SceneLoaderFlags.loggingLevel = value;\n }\n /**\n * Gets or set a boolean indicating if matrix weights must be cleaned upon loading\n */\n static get CleanBoneMatrixWeights() {\n return SceneLoaderFlags.CleanBoneMatrixWeights;\n }\n static set CleanBoneMatrixWeights(value) {\n SceneLoaderFlags.CleanBoneMatrixWeights = value;\n }\n /**\n * Gets the default plugin (used to load Babylon files)\n * @returns the .babylon plugin\n */\n static GetDefaultPlugin() {\n return getDefaultPlugin();\n }\n // Public functions\n /**\n * Gets a plugin that can load the given extension\n * @param extension defines the extension to load\n * @returns a plugin or null if none works\n */\n static GetPluginForExtension(extension) {\n var _getPluginForExtensio;\n return (_getPluginForExtensio = getPluginForExtension(extension, true)) === null || _getPluginForExtensio === void 0 ? void 0 : _getPluginForExtensio.plugin;\n }\n /**\n * Gets a boolean indicating that the given extension can be loaded\n * @param extension defines the extension to load\n * @returns true if the extension is supported\n */\n static IsPluginForExtensionAvailable(extension) {\n return isPluginForExtensionAvailable(extension);\n }\n /**\n * Adds a new plugin to the list of registered plugins\n * @param plugin defines the plugin to add\n */\n static RegisterPlugin(plugin) {\n registerSceneLoaderPlugin(plugin);\n }\n /**\n * Import meshes into a scene\n * @param meshNames an array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene the instance of BABYLON.Scene to append to\n * @param onSuccess a callback with a list of imported meshes, particleSystems, skeletons, and animationGroups when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the name of the file, if the data is binary\n * @deprecated Please use ImportMeshAsync instead\n */\n static ImportMesh(meshNames, rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {\n importMeshAsync(meshNames, rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Import meshes into a scene\n * @param meshNames an array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene the instance of BABYLON.Scene to append to\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the name of the file\n * @returns The loaded list of imported meshes, particle systems, skeletons, and animation groups\n */\n static ImportMeshAsync(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {\n return importMeshAsyncCore(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);\n }\n /**\n * Load a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param engine is the instance of BABYLON.Engine to use to create the scene\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @deprecated Please use LoadAsync instead\n */\n static Load(rootUrl, sceneFilename, engine, onSuccess, onProgress, onError, pluginExtension, name) {\n loadScene(rootUrl, sceneFilename, engine, onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Load a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param engine is the instance of BABYLON.Engine to use to create the scene\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @returns The loaded scene\n */\n static LoadAsync(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name) {\n return loadSceneAsyncCore(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name);\n }\n /**\n * Append a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the name of the file, if the data is binary\n * @deprecated Please use AppendAsync instead\n */\n static Append(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {\n appendAsync(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Append a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the name of the file, if the data is binary\n * @returns The given scene\n */\n static AppendAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {\n return appendSceneAsyncCore(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);\n }\n /**\n * Load a scene into an asset container\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to (default: last created scene)\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @deprecated Please use LoadAssetContainerAsync instead\n */\n static LoadAssetContainer(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {\n loadAssetContainerCoreAsync(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Load a scene into an asset container\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene (default: empty string)\n * @param scene is the instance of Scene to append to\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @returns The loaded asset container\n */\n static LoadAssetContainerAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {\n return internalLoadAssetContainerAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);\n }\n /**\n * Import animations from a file into a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to (default: last created scene)\n * @param overwriteAnimations when true, animations are cleaned before importing new ones. Animations are appended otherwise\n * @param animationGroupLoadingMode defines how to handle old animations groups before importing new ones\n * @param targetConverter defines a function used to convert animation targets from loaded scene to current scene (default: search node by name)\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @deprecated Please use ImportAnimationsAsync instead\n */\n static ImportAnimations(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onSuccess, onProgress, onError, pluginExtension, name) {\n importAnimations(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Import animations from a file into a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to (default: last created scene)\n * @param overwriteAnimations when true, animations are cleaned before importing new ones. Animations are appended otherwise\n * @param animationGroupLoadingMode defines how to handle old animations groups before importing new ones\n * @param targetConverter defines a function used to convert animation targets from loaded scene to current scene (default: search node by name)\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @returns the updated scene with imported animations\n */\n static ImportAnimationsAsync(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onSuccess, onProgress,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onError, pluginExtension, name) {\n return importAnimationsAsyncCore(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onProgress, pluginExtension, name);\n }\n}\n/**\n * No logging while loading\n */\nSceneLoader.NO_LOGGING = 0;\n/**\n * Minimal logging while loading\n */\nSceneLoader.MINIMAL_LOGGING = 1;\n/**\n * Summary logging while loading\n */\nSceneLoader.SUMMARY_LOGGING = 2;\n/**\n * Detailed logging while loading\n */\nSceneLoader.DETAILED_LOGGING = 3;\n// Members\n/**\n * Event raised when a plugin is used to load a scene\n */\nSceneLoader.OnPluginActivatedObservable = onPluginActivatedObservable;","map":{"version":3,"names":["Tools","Observable","Scene","EngineStore","Logger","SceneLoaderFlags","IsBase64DataUrl","RuntimeError","ErrorCodes","RandomGUID","AbstractEngine","_FetchAsync","SceneLoaderAnimationGroupLoadingMode","isFactory","pluginOrFactory","createPlugin","isFile","value","name","onPluginActivatedObservable","registeredPlugins","showingLoadingScreen","getDefaultPlugin","getPluginForMimeType","mimeType","registeredPluginKey","registeredPlugin","undefined","getPluginForExtension","extension","returnDefault","Warn","isPluginForExtensionAvailable","getPluginForDirectLoad","data","plugin","canDirectLoad","getFilenameExtension","sceneFilename","queryStringPosition","indexOf","substring","dotPosition","lastIndexOf","length","toLowerCase","getDirectLoad","formatErrorMessage","fileInfo","message","exception","fromLoad","rawData","url","errorMessage","loadDataAsync","_x","_x2","_x3","_x4","_x5","_x6","_x7","_x8","_x9","_loadDataAsync","apply","arguments","_asyncToGenerator","scene","onSuccess","onProgress","onError","onDispose","pluginExtension","pluginOptions","_pluginOptions$regist","directLoad","fileExtension","startsWith","response","method","responseHeaders","headerValues","Error","enabled","isBinary","getPluginInstance","callback","pluginFactory","partialPlugin","Promise","then","catch","error","_plugin$onDisposeObse","notifyObservers","result","useArrayBuffer","dataCallback","responseURL","isDisposed","request","pluginDisposed","onDisposeObservable","add","abort","manifestChecked","errorCallback","statusText","loadFile","file","rootUrl","_loadFile","engine","getEngine","canUseOfflineSupport","enableOfflineSupport","exceptionFound","regex","disableOfflineSupportExceptionRules","test","OfflineProviderFactory","offlineProvider","disableManifestCheck","_getFileInfo","sceneSource","GetFilename","GetFolderPath","ArrayBuffer","isView","filename","registerSceneLoaderPlugin","extensions","Object","keys","forEach","importMeshAsync","_x10","_x11","_importMeshAsync","meshNames","LastCreatedScene","loadingToken","addPendingData","disposeHandler","removePendingData","errorHandler","SceneLoaderError","progressHandler","event","e","successHandler","meshes","particleSystems","skeletons","animationGroups","transformNodes","geometries","lights","spriteManagers","importedMeshesFiles","push","rewriteRootURL","importMesh","syncedPlugin","loadingPluginName","asyncedPlugin","importMeshAsyncCore","resolve","reject","loadScene","LastCreatedEngine","appendAsync","loadSceneAsync","source","options","loadSceneAsyncCore","_x12","_appendAsync","ShowLoadingScreen","displayLoadingUI","executeWhenReady","hideLoadingUI","load","loadAsync","appendSceneAsync","_x13","_x14","_x15","_appendSceneAsync","appendSceneAsyncCore","loadAssetContainerCoreAsync","_x16","_loadAssetContainerCoreAsync","assets","loadAssetContainer","assetContainer","populateRootNodes","loadAssetContainerAsync","internalLoadAssetContainerAsync","importAnimations","overwriteAnimations","animationGroupLoadingMode","targetConverter","animatable","animatables","reset","stopAllAnimations","slice","animationGroup","dispose","nodes","getNodes","node","animations","stop","restart","startingIndexForNewAnimatables","onAssetContainerLoaded","container","mergeAnimationsTo","onAnimationFileImportedObservable","importAnimationsAsync","_x17","_x18","_x19","_importAnimationsAsync","importAnimationsAsyncCore","SceneLoader","ForceFullSceneLoadingForIncremental","loggingLevel","CleanBoneMatrixWeights","GetDefaultPlugin","GetPluginForExtension","_getPluginForExtensio","IsPluginForExtensionAvailable","RegisterPlugin","ImportMesh","ImportMeshAsync","Load","LoadAsync","Append","AppendAsync","LoadAssetContainer","LoadAssetContainerAsync","ImportAnimations","ImportAnimationsAsync","NO_LOGGING","MINIMAL_LOGGING","SUMMARY_LOGGING","DETAILED_LOGGING","OnPluginActivatedObservable"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Loading/sceneLoader.js"],"sourcesContent":["import { Tools } from \"../Misc/tools.js\";\nimport { Observable } from \"../Misc/observable.js\";\nimport { Scene } from \"../scene.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nimport { Logger } from \"../Misc/logger.js\";\n\nimport { SceneLoaderFlags } from \"./sceneLoaderFlags.js\";\nimport { IsBase64DataUrl } from \"../Misc/fileTools.js\";\nimport { RuntimeError, ErrorCodes } from \"../Misc/error.js\";\nimport { RandomGUID } from \"../Misc/guid.js\";\nimport { AbstractEngine } from \"../Engines/abstractEngine.js\";\nimport { _FetchAsync } from \"../Misc/webRequest.fetch.js\";\n/**\n * Mode that determines how to handle old animation groups before loading new ones.\n */\nexport var SceneLoaderAnimationGroupLoadingMode;\n(function (SceneLoaderAnimationGroupLoadingMode) {\n /**\n * Reset all old animations to initial state then dispose them.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"Clean\"] = 0] = \"Clean\";\n /**\n * Stop all old animations.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"Stop\"] = 1] = \"Stop\";\n /**\n * Restart old animations from first frame.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"Sync\"] = 2] = \"Sync\";\n /**\n * Old animations remains untouched.\n */\n SceneLoaderAnimationGroupLoadingMode[SceneLoaderAnimationGroupLoadingMode[\"NoSync\"] = 3] = \"NoSync\";\n})(SceneLoaderAnimationGroupLoadingMode || (SceneLoaderAnimationGroupLoadingMode = {}));\nfunction isFactory(pluginOrFactory) {\n return !!pluginOrFactory.createPlugin;\n}\nfunction isFile(value) {\n return !!value.name;\n}\nconst onPluginActivatedObservable = new Observable();\nconst registeredPlugins = {};\nlet showingLoadingScreen = false;\nfunction getDefaultPlugin() {\n return registeredPlugins[\".babylon\"];\n}\nfunction getPluginForMimeType(mimeType) {\n for (const registeredPluginKey in registeredPlugins) {\n const registeredPlugin = registeredPlugins[registeredPluginKey];\n if (registeredPlugin.mimeType === mimeType) {\n return registeredPlugin;\n }\n }\n return undefined;\n}\nfunction getPluginForExtension(extension, returnDefault) {\n const registeredPlugin = registeredPlugins[extension];\n if (registeredPlugin) {\n return registeredPlugin;\n }\n Logger.Warn(\"Unable to find a plugin to load \" +\n extension +\n \" files. Trying to use .babylon default plugin. To load from a specific filetype (eg. gltf) see: https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes\");\n return returnDefault ? getDefaultPlugin() : undefined;\n}\nfunction isPluginForExtensionAvailable(extension) {\n return !!registeredPlugins[extension];\n}\nfunction getPluginForDirectLoad(data) {\n for (const extension in registeredPlugins) {\n const plugin = registeredPlugins[extension].plugin;\n if (plugin.canDirectLoad && plugin.canDirectLoad(data)) {\n return registeredPlugins[extension];\n }\n }\n return getDefaultPlugin();\n}\nfunction getFilenameExtension(sceneFilename) {\n const queryStringPosition = sceneFilename.indexOf(\"?\");\n if (queryStringPosition !== -1) {\n sceneFilename = sceneFilename.substring(0, queryStringPosition);\n }\n const dotPosition = sceneFilename.lastIndexOf(\".\");\n return sceneFilename.substring(dotPosition, sceneFilename.length).toLowerCase();\n}\nfunction getDirectLoad(sceneFilename) {\n if (sceneFilename.substring(0, 5) === \"data:\") {\n return sceneFilename.substring(5);\n }\n return null;\n}\nfunction formatErrorMessage(fileInfo, message, exception) {\n const fromLoad = fileInfo.rawData ? \"binary data\" : fileInfo.url;\n let errorMessage = \"Unable to load from \" + fromLoad;\n if (message) {\n errorMessage += `: ${message}`;\n }\n else if (exception) {\n errorMessage += `: ${exception}`;\n }\n return errorMessage;\n}\nasync function loadDataAsync(fileInfo, scene, onSuccess, onProgress, onError, onDispose, pluginExtension, name, pluginOptions) {\n const directLoad = getDirectLoad(fileInfo.url);\n if (fileInfo.rawData && !pluginExtension) {\n // eslint-disable-next-line no-throw-literal\n throw \"When using ArrayBufferView to load data the file extension must be provided.\";\n }\n const fileExtension = !directLoad && !pluginExtension ? getFilenameExtension(fileInfo.url) : \"\";\n let registeredPlugin = pluginExtension\n ? getPluginForExtension(pluginExtension, true)\n : directLoad\n ? getPluginForDirectLoad(fileInfo.url)\n : getPluginForExtension(fileExtension, false);\n if (!registeredPlugin && fileExtension) {\n if (fileInfo.url && !fileInfo.url.startsWith(\"blob:\")) {\n // Fetching head content to get the mime type\n const response = await _FetchAsync(fileInfo.url, { method: \"HEAD\", responseHeaders: [\"Content-Type\"] });\n const mimeType = response.headerValues ? response.headerValues[\"Content-Type\"] : \"\";\n if (mimeType) {\n registeredPlugin = getPluginForMimeType(mimeType);\n }\n }\n if (!registeredPlugin) {\n registeredPlugin = getDefaultPlugin();\n }\n }\n if (!registeredPlugin) {\n throw new Error(`No plugin or fallback for ${pluginExtension ?? fileInfo.url}`);\n }\n if (pluginOptions?.[registeredPlugin.plugin.name]?.enabled === false) {\n throw new Error(`The '${registeredPlugin.plugin.name}' plugin is disabled via the loader options passed to the loading operation.`);\n }\n if (fileInfo.rawData && !registeredPlugin.isBinary) {\n // eslint-disable-next-line no-throw-literal\n throw \"Loading from ArrayBufferView can not be used with plugins that don't support binary loading.\";\n }\n const getPluginInstance = (callback) => {\n // For plugin factories, the plugin is instantiated on each SceneLoader operation. This makes options handling\n // much simpler as we can just pass the options to the factory, rather than passing options through to every possible\n // plugin call. Given this, options are only supported for plugins that provide a factory function.\n if (isFactory(registeredPlugin.plugin)) {\n const pluginFactory = registeredPlugin.plugin;\n const partialPlugin = pluginFactory.createPlugin(pluginOptions ?? {});\n if (partialPlugin instanceof Promise) {\n partialPlugin.then(callback).catch((error) => {\n onError(\"Error instantiating plugin.\", error);\n });\n // When async factories are used, the plugin instance cannot be returned synchronously.\n // In this case, the legacy loader functions will return null.\n return null;\n }\n else {\n callback(partialPlugin);\n return partialPlugin;\n }\n }\n else {\n callback(registeredPlugin.plugin);\n return registeredPlugin.plugin;\n }\n };\n return getPluginInstance((plugin) => {\n if (!plugin) {\n // eslint-disable-next-line no-throw-literal\n throw `The loader plugin corresponding to the '${pluginExtension}' file type has not been found. If using es6, please import the plugin you wish to use before.`;\n }\n onPluginActivatedObservable.notifyObservers(plugin);\n // Check if we have a direct load url. If the plugin is registered to handle\n // it or it's not a base64 data url, then pass it through the direct load path.\n if (directLoad && ((plugin.canDirectLoad && plugin.canDirectLoad(fileInfo.url)) || !IsBase64DataUrl(fileInfo.url))) {\n if (plugin.directLoad) {\n const result = plugin.directLoad(scene, directLoad);\n if (result instanceof Promise) {\n result\n .then((data) => {\n onSuccess(plugin, data);\n })\n .catch((error) => {\n onError(\"Error in directLoad of _loadData: \" + error, error);\n });\n }\n else {\n onSuccess(plugin, result);\n }\n }\n else {\n onSuccess(plugin, directLoad);\n }\n return;\n }\n const useArrayBuffer = registeredPlugin.isBinary;\n const dataCallback = (data, responseURL) => {\n if (scene.isDisposed) {\n onError(\"Scene has been disposed\");\n return;\n }\n onSuccess(plugin, data, responseURL);\n };\n let request = null;\n let pluginDisposed = false;\n plugin.onDisposeObservable?.add(() => {\n pluginDisposed = true;\n if (request) {\n request.abort();\n request = null;\n }\n onDispose();\n });\n const manifestChecked = () => {\n if (pluginDisposed) {\n return;\n }\n const errorCallback = (request, exception) => {\n onError(request?.statusText, exception);\n };\n if (!plugin.loadFile && fileInfo.rawData) {\n // eslint-disable-next-line no-throw-literal\n throw \"Plugin does not support loading ArrayBufferView.\";\n }\n request = plugin.loadFile\n ? plugin.loadFile(scene, fileInfo.rawData || fileInfo.file || fileInfo.url, fileInfo.rootUrl, dataCallback, onProgress, useArrayBuffer, errorCallback, name)\n : scene._loadFile(fileInfo.file || fileInfo.url, dataCallback, onProgress, true, useArrayBuffer, errorCallback);\n };\n const engine = scene.getEngine();\n let canUseOfflineSupport = engine.enableOfflineSupport;\n if (canUseOfflineSupport) {\n // Also check for exceptions\n let exceptionFound = false;\n for (const regex of scene.disableOfflineSupportExceptionRules) {\n if (regex.test(fileInfo.url)) {\n exceptionFound = true;\n break;\n }\n }\n canUseOfflineSupport = !exceptionFound;\n }\n if (canUseOfflineSupport && AbstractEngine.OfflineProviderFactory) {\n // Checking if a manifest file has been set for this scene and if offline mode has been requested\n scene.offlineProvider = AbstractEngine.OfflineProviderFactory(fileInfo.url, manifestChecked, engine.disableManifestCheck);\n }\n else {\n manifestChecked();\n }\n });\n}\nfunction _getFileInfo(rootUrl, sceneSource) {\n let url;\n let name;\n let file = null;\n let rawData = null;\n if (!sceneSource) {\n url = rootUrl;\n name = Tools.GetFilename(rootUrl);\n rootUrl = Tools.GetFolderPath(rootUrl);\n }\n else if (isFile(sceneSource)) {\n url = `file:${sceneSource.name}`;\n name = sceneSource.name;\n file = sceneSource;\n }\n else if (ArrayBuffer.isView(sceneSource)) {\n url = \"\";\n name = RandomGUID();\n rawData = sceneSource;\n }\n else if (sceneSource.startsWith(\"data:\")) {\n url = sceneSource;\n name = \"\";\n }\n else if (rootUrl) {\n const filename = sceneSource;\n if (filename.substring(0, 1) === \"/\") {\n Tools.Error(\"Wrong sceneFilename parameter\");\n return null;\n }\n url = rootUrl + filename;\n name = filename;\n }\n else {\n url = sceneSource;\n name = Tools.GetFilename(sceneSource);\n rootUrl = Tools.GetFolderPath(sceneSource);\n }\n return {\n url: url,\n rootUrl: rootUrl,\n name: name,\n file: file,\n rawData,\n };\n}\n/**\n * Adds a new plugin to the list of registered plugins\n * @param plugin defines the plugin to add\n */\nexport function registerSceneLoaderPlugin(plugin) {\n if (typeof plugin.extensions === \"string\") {\n const extension = plugin.extensions;\n registeredPlugins[extension.toLowerCase()] = {\n plugin: plugin,\n isBinary: false,\n };\n }\n else {\n const extensions = plugin.extensions;\n Object.keys(extensions).forEach((extension) => {\n registeredPlugins[extension.toLowerCase()] = {\n plugin: plugin,\n isBinary: extensions[extension].isBinary,\n mimeType: extensions[extension].mimeType,\n };\n });\n }\n}\nasync function importMeshAsync(meshNames, rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\", pluginOptions = {}) {\n if (!scene) {\n Logger.Error(\"No scene available to import mesh to\");\n return null;\n }\n const fileInfo = _getFileInfo(rootUrl, sceneFilename);\n if (!fileInfo) {\n return null;\n }\n const loadingToken = {};\n scene.addPendingData(loadingToken);\n const disposeHandler = () => {\n scene.removePendingData(loadingToken);\n };\n const errorHandler = (message, exception) => {\n const errorMessage = formatErrorMessage(fileInfo, message, exception);\n if (onError) {\n onError(scene, errorMessage, new RuntimeError(errorMessage, ErrorCodes.SceneLoaderError, exception));\n }\n else {\n Logger.Error(errorMessage);\n // should the exception be thrown?\n }\n disposeHandler();\n };\n const progressHandler = onProgress\n ? (event) => {\n try {\n onProgress(event);\n }\n catch (e) {\n errorHandler(\"Error in onProgress callback: \" + e, e);\n }\n }\n : undefined;\n const successHandler = (meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights, spriteManagers) => {\n scene.importedMeshesFiles.push(fileInfo.url);\n if (onSuccess) {\n try {\n onSuccess(meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights, spriteManagers);\n }\n catch (e) {\n errorHandler(\"Error in onSuccess callback: \" + e, e);\n }\n }\n scene.removePendingData(loadingToken);\n };\n return await loadDataAsync(fileInfo, scene, (plugin, data, responseURL) => {\n if (plugin.rewriteRootURL) {\n fileInfo.rootUrl = plugin.rewriteRootURL(fileInfo.rootUrl, responseURL);\n }\n if (plugin.importMesh) {\n const syncedPlugin = plugin;\n const meshes = [];\n const particleSystems = [];\n const skeletons = [];\n if (!syncedPlugin.importMesh(meshNames, scene, data, fileInfo.rootUrl, meshes, particleSystems, skeletons, errorHandler)) {\n return;\n }\n scene.loadingPluginName = plugin.name;\n successHandler(meshes, particleSystems, skeletons, [], [], [], [], []);\n }\n else {\n const asyncedPlugin = plugin;\n asyncedPlugin\n .importMeshAsync(meshNames, scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name)\n .then((result) => {\n scene.loadingPluginName = plugin.name;\n successHandler(result.meshes, result.particleSystems, result.skeletons, result.animationGroups, result.transformNodes, result.geometries, result.lights, result.spriteManagers);\n })\n .catch((error) => {\n errorHandler(error.message, error);\n });\n }\n }, progressHandler, errorHandler, disposeHandler, pluginExtension, name, pluginOptions);\n}\nfunction importMeshAsyncCore(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name, pluginOptions) {\n return new Promise((resolve, reject) => {\n importMeshAsync(meshNames, rootUrl, sceneFilename, scene, (meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights, spriteManagers) => {\n resolve({\n meshes: meshes,\n particleSystems: particleSystems,\n skeletons: skeletons,\n animationGroups: animationGroups,\n transformNodes: transformNodes,\n geometries: geometries,\n lights: lights,\n spriteManagers: spriteManagers,\n });\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name, pluginOptions);\n });\n}\nfunction loadScene(rootUrl, sceneFilename = \"\", engine = EngineStore.LastCreatedEngine, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\", pluginOptions = {}) {\n if (!engine) {\n Tools.Error(\"No engine available\");\n return;\n }\n appendAsync(rootUrl, sceneFilename, new Scene(engine), onSuccess, onProgress, onError, pluginExtension, name, pluginOptions);\n}\n/**\n * Load a scene\n * @experimental\n * @param source a string that defines the name of the scene file, or starts with \"data:\" following by the stringified version of the scene, or a File object, or an ArrayBufferView\n * @param engine is the instance of BABYLON.Engine to use to create the scene\n * @param options an object that configures aspects of how the scene is loaded\n * @returns The loaded scene\n */\nexport function loadSceneAsync(source, engine, options) {\n const { rootUrl = \"\", onProgress, pluginExtension, name, pluginOptions } = options ?? {};\n return loadSceneAsyncCore(rootUrl, source, engine, onProgress, pluginExtension, name, pluginOptions);\n}\nfunction loadSceneAsyncCore(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name, pluginOptions) {\n return new Promise((resolve, reject) => {\n loadScene(rootUrl, sceneFilename, engine, (scene) => {\n resolve(scene);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name, pluginOptions);\n });\n}\nasync function appendAsync(rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\", pluginOptions = {}) {\n if (!scene) {\n Logger.Error(\"No scene available to append to\");\n return null;\n }\n const fileInfo = _getFileInfo(rootUrl, sceneFilename);\n if (!fileInfo) {\n return null;\n }\n const loadingToken = {};\n scene.addPendingData(loadingToken);\n const disposeHandler = () => {\n scene.removePendingData(loadingToken);\n };\n if (SceneLoaderFlags.ShowLoadingScreen && !showingLoadingScreen) {\n showingLoadingScreen = true;\n scene.getEngine().displayLoadingUI();\n scene.executeWhenReady(() => {\n scene.getEngine().hideLoadingUI();\n showingLoadingScreen = false;\n });\n }\n const errorHandler = (message, exception) => {\n const errorMessage = formatErrorMessage(fileInfo, message, exception);\n if (onError) {\n onError(scene, errorMessage, new RuntimeError(errorMessage, ErrorCodes.SceneLoaderError, exception));\n }\n else {\n Logger.Error(errorMessage);\n // should the exception be thrown?\n }\n disposeHandler();\n };\n const progressHandler = onProgress\n ? (event) => {\n try {\n onProgress(event);\n }\n catch (e) {\n errorHandler(\"Error in onProgress callback\", e);\n }\n }\n : undefined;\n const successHandler = () => {\n if (onSuccess) {\n try {\n onSuccess(scene);\n }\n catch (e) {\n errorHandler(\"Error in onSuccess callback\", e);\n }\n }\n scene.removePendingData(loadingToken);\n };\n return await loadDataAsync(fileInfo, scene, (plugin, data) => {\n if (plugin.load) {\n const syncedPlugin = plugin;\n if (!syncedPlugin.load(scene, data, fileInfo.rootUrl, errorHandler)) {\n return;\n }\n scene.loadingPluginName = plugin.name;\n successHandler();\n }\n else {\n const asyncedPlugin = plugin;\n asyncedPlugin\n .loadAsync(scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name)\n .then(() => {\n scene.loadingPluginName = plugin.name;\n successHandler();\n })\n .catch((error) => {\n errorHandler(error.message, error);\n });\n }\n }, progressHandler, errorHandler, disposeHandler, pluginExtension, name, pluginOptions);\n}\n/**\n * Append a scene\n * @experimental\n * @param source a string that defines the name of the scene file, or starts with \"data:\" following by the stringified version of the scene, or a File object, or an ArrayBufferView\n * @param scene is the instance of BABYLON.Scene to append to\n * @param options an object that configures aspects of how the scene is loaded\n */\nexport async function appendSceneAsync(source, scene, options) {\n const { rootUrl = \"\", onProgress, pluginExtension, name, pluginOptions } = options ?? {};\n await appendSceneAsyncCore(rootUrl, source, scene, onProgress, pluginExtension, name, pluginOptions);\n}\nfunction appendSceneAsyncCore(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name, pluginOptions) {\n return new Promise((resolve, reject) => {\n appendAsync(rootUrl, sceneFilename, scene, (scene) => {\n resolve(scene);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name, pluginOptions);\n });\n}\nasync function loadAssetContainerCoreAsync(rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\", pluginOptions = {}) {\n if (!scene) {\n Logger.Error(\"No scene available to load asset container to\");\n return null;\n }\n const fileInfo = _getFileInfo(rootUrl, sceneFilename);\n if (!fileInfo) {\n return null;\n }\n const loadingToken = {};\n scene.addPendingData(loadingToken);\n const disposeHandler = () => {\n scene.removePendingData(loadingToken);\n };\n const errorHandler = (message, exception) => {\n const errorMessage = formatErrorMessage(fileInfo, message, exception);\n if (onError) {\n onError(scene, errorMessage, new RuntimeError(errorMessage, ErrorCodes.SceneLoaderError, exception));\n }\n else {\n Logger.Error(errorMessage);\n // should the exception be thrown?\n }\n disposeHandler();\n };\n const progressHandler = onProgress\n ? (event) => {\n try {\n onProgress(event);\n }\n catch (e) {\n errorHandler(\"Error in onProgress callback\", e);\n }\n }\n : undefined;\n const successHandler = (assets) => {\n if (onSuccess) {\n try {\n onSuccess(assets);\n }\n catch (e) {\n errorHandler(\"Error in onSuccess callback\", e);\n }\n }\n scene.removePendingData(loadingToken);\n };\n return await loadDataAsync(fileInfo, scene, (plugin, data) => {\n if (plugin.loadAssetContainer) {\n const syncedPlugin = plugin;\n const assetContainer = syncedPlugin.loadAssetContainer(scene, data, fileInfo.rootUrl, errorHandler);\n if (!assetContainer) {\n return;\n }\n assetContainer.populateRootNodes();\n scene.loadingPluginName = plugin.name;\n successHandler(assetContainer);\n }\n else if (plugin.loadAssetContainerAsync) {\n const asyncedPlugin = plugin;\n asyncedPlugin\n .loadAssetContainerAsync(scene, data, fileInfo.rootUrl, progressHandler, fileInfo.name)\n .then((assetContainer) => {\n assetContainer.populateRootNodes();\n scene.loadingPluginName = plugin.name;\n successHandler(assetContainer);\n })\n .catch((error) => {\n errorHandler(error.message, error);\n });\n }\n else {\n errorHandler(\"LoadAssetContainer is not supported by this plugin. Plugin did not provide a loadAssetContainer or loadAssetContainerAsync method.\");\n }\n }, progressHandler, errorHandler, disposeHandler, pluginExtension, name, pluginOptions);\n}\n/**\n * Load a scene into an asset container\n * @experimental\n * @param source a string that defines the name of the scene file, or starts with \"data:\" following by the stringified version of the scene, or a File object, or an ArrayBufferView\n * @param scene is the instance of Scene to append to\n * @param options an object that configures aspects of how the scene is loaded\n * @returns The loaded asset container\n */\nexport function loadAssetContainerAsync(source, scene, options) {\n const { rootUrl = \"\", onProgress, pluginExtension, name, pluginOptions } = options ?? {};\n return internalLoadAssetContainerAsync(rootUrl, source, scene, onProgress, pluginExtension, name, pluginOptions);\n}\nfunction internalLoadAssetContainerAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name, pluginOptions) {\n return new Promise((resolve, reject) => {\n loadAssetContainerCoreAsync(rootUrl, sceneFilename, scene, (assets) => {\n resolve(assets);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name, pluginOptions);\n });\n}\nfunction importAnimations(rootUrl, sceneFilename = \"\", scene = EngineStore.LastCreatedScene, overwriteAnimations = true, animationGroupLoadingMode = 0 /* SceneLoaderAnimationGroupLoadingMode.Clean */, targetConverter = null, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = \"\", pluginOptions = {}) {\n if (!scene) {\n Logger.Error(\"No scene available to load animations to\");\n return;\n }\n if (overwriteAnimations) {\n // Reset, stop and dispose all animations before loading new ones\n for (const animatable of scene.animatables) {\n animatable.reset();\n }\n scene.stopAllAnimations();\n scene.animationGroups.slice().forEach((animationGroup) => {\n animationGroup.dispose();\n });\n const nodes = scene.getNodes();\n nodes.forEach((node) => {\n if (node.animations) {\n node.animations = [];\n }\n });\n }\n else {\n switch (animationGroupLoadingMode) {\n case 0 /* SceneLoaderAnimationGroupLoadingMode.Clean */:\n scene.animationGroups.slice().forEach((animationGroup) => {\n animationGroup.dispose();\n });\n break;\n case 1 /* SceneLoaderAnimationGroupLoadingMode.Stop */:\n scene.animationGroups.forEach((animationGroup) => {\n animationGroup.stop();\n });\n break;\n case 2 /* SceneLoaderAnimationGroupLoadingMode.Sync */:\n scene.animationGroups.forEach((animationGroup) => {\n animationGroup.reset();\n animationGroup.restart();\n });\n break;\n case 3 /* SceneLoaderAnimationGroupLoadingMode.NoSync */:\n // nothing to do\n break;\n default:\n Logger.Error(\"Unknown animation group loading mode value '\" + animationGroupLoadingMode + \"'\");\n return;\n }\n }\n const startingIndexForNewAnimatables = scene.animatables.length;\n const onAssetContainerLoaded = (container) => {\n container.mergeAnimationsTo(scene, scene.animatables.slice(startingIndexForNewAnimatables), targetConverter);\n container.dispose();\n scene.onAnimationFileImportedObservable.notifyObservers(scene);\n if (onSuccess) {\n onSuccess(scene);\n }\n };\n loadAssetContainerCoreAsync(rootUrl, sceneFilename, scene, onAssetContainerLoaded, onProgress, onError, pluginExtension, name, pluginOptions);\n}\n/**\n * Import animations from a file into a scene\n * @experimental\n * @param source a string that defines the name of the scene file, or starts with \"data:\" following by the stringified version of the scene, or a File object, or an ArrayBufferView\n * @param scene is the instance of BABYLON.Scene to append to\n * @param options an object that configures aspects of how the scene is loaded\n */\nexport async function importAnimationsAsync(source, scene, options) {\n const { rootUrl = \"\", overwriteAnimations, animationGroupLoadingMode, targetConverter, onProgress, pluginExtension, name, pluginOptions } = options ?? {};\n await importAnimationsAsyncCore(rootUrl, source, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onProgress, pluginExtension, name, pluginOptions);\n}\nfunction importAnimationsAsyncCore(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onProgress, pluginExtension, name, pluginOptions) {\n return new Promise((resolve, reject) => {\n importAnimations(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, (scene) => {\n resolve(scene);\n }, onProgress, (scene, message, exception) => {\n reject(exception || new Error(message));\n }, pluginExtension, name, pluginOptions);\n });\n}\n/**\n * Class used to load scene from various file formats using registered plugins\n * @see https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes\n */\nexport class SceneLoader {\n /**\n * Gets or sets a boolean indicating if entire scene must be loaded even if scene contains incremental data\n */\n static get ForceFullSceneLoadingForIncremental() {\n return SceneLoaderFlags.ForceFullSceneLoadingForIncremental;\n }\n static set ForceFullSceneLoadingForIncremental(value) {\n SceneLoaderFlags.ForceFullSceneLoadingForIncremental = value;\n }\n /**\n * Gets or sets a boolean indicating if loading screen must be displayed while loading a scene\n */\n static get ShowLoadingScreen() {\n return SceneLoaderFlags.ShowLoadingScreen;\n }\n static set ShowLoadingScreen(value) {\n SceneLoaderFlags.ShowLoadingScreen = value;\n }\n /**\n * Defines the current logging level (while loading the scene)\n * @ignorenaming\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static get loggingLevel() {\n return SceneLoaderFlags.loggingLevel;\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n static set loggingLevel(value) {\n SceneLoaderFlags.loggingLevel = value;\n }\n /**\n * Gets or set a boolean indicating if matrix weights must be cleaned upon loading\n */\n static get CleanBoneMatrixWeights() {\n return SceneLoaderFlags.CleanBoneMatrixWeights;\n }\n static set CleanBoneMatrixWeights(value) {\n SceneLoaderFlags.CleanBoneMatrixWeights = value;\n }\n /**\n * Gets the default plugin (used to load Babylon files)\n * @returns the .babylon plugin\n */\n static GetDefaultPlugin() {\n return getDefaultPlugin();\n }\n // Public functions\n /**\n * Gets a plugin that can load the given extension\n * @param extension defines the extension to load\n * @returns a plugin or null if none works\n */\n static GetPluginForExtension(extension) {\n return getPluginForExtension(extension, true)?.plugin;\n }\n /**\n * Gets a boolean indicating that the given extension can be loaded\n * @param extension defines the extension to load\n * @returns true if the extension is supported\n */\n static IsPluginForExtensionAvailable(extension) {\n return isPluginForExtensionAvailable(extension);\n }\n /**\n * Adds a new plugin to the list of registered plugins\n * @param plugin defines the plugin to add\n */\n static RegisterPlugin(plugin) {\n registerSceneLoaderPlugin(plugin);\n }\n /**\n * Import meshes into a scene\n * @param meshNames an array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene the instance of BABYLON.Scene to append to\n * @param onSuccess a callback with a list of imported meshes, particleSystems, skeletons, and animationGroups when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the name of the file, if the data is binary\n * @deprecated Please use ImportMeshAsync instead\n */\n static ImportMesh(meshNames, rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {\n importMeshAsync(meshNames, rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Import meshes into a scene\n * @param meshNames an array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene the instance of BABYLON.Scene to append to\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the name of the file\n * @returns The loaded list of imported meshes, particle systems, skeletons, and animation groups\n */\n static ImportMeshAsync(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {\n return importMeshAsyncCore(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);\n }\n /**\n * Load a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param engine is the instance of BABYLON.Engine to use to create the scene\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @deprecated Please use LoadAsync instead\n */\n static Load(rootUrl, sceneFilename, engine, onSuccess, onProgress, onError, pluginExtension, name) {\n loadScene(rootUrl, sceneFilename, engine, onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Load a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param engine is the instance of BABYLON.Engine to use to create the scene\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @returns The loaded scene\n */\n static LoadAsync(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name) {\n return loadSceneAsyncCore(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name);\n }\n /**\n * Append a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the name of the file, if the data is binary\n * @deprecated Please use AppendAsync instead\n */\n static Append(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {\n appendAsync(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Append a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the name of the file, if the data is binary\n * @returns The given scene\n */\n static AppendAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {\n return appendSceneAsyncCore(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);\n }\n /**\n * Load a scene into an asset container\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to (default: last created scene)\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @deprecated Please use LoadAssetContainerAsync instead\n */\n static LoadAssetContainer(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {\n loadAssetContainerCoreAsync(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Load a scene into an asset container\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene (default: empty string)\n * @param scene is the instance of Scene to append to\n * @param onProgress a callback with a progress event for each file being loaded\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @returns The loaded asset container\n */\n static LoadAssetContainerAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {\n return internalLoadAssetContainerAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);\n }\n /**\n * Import animations from a file into a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to (default: last created scene)\n * @param overwriteAnimations when true, animations are cleaned before importing new ones. Animations are appended otherwise\n * @param animationGroupLoadingMode defines how to handle old animations groups before importing new ones\n * @param targetConverter defines a function used to convert animation targets from loaded scene to current scene (default: search node by name)\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @deprecated Please use ImportAnimationsAsync instead\n */\n static ImportAnimations(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onSuccess, onProgress, onError, pluginExtension, name) {\n importAnimations(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onSuccess, onProgress, onError, pluginExtension, name);\n }\n /**\n * Import animations from a file into a scene\n * @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)\n * @param sceneFilename a string that defines the name of the scene file or starts with \"data:\" following by the stringified version of the scene or a File object (default: empty string)\n * @param scene is the instance of BABYLON.Scene to append to (default: last created scene)\n * @param overwriteAnimations when true, animations are cleaned before importing new ones. Animations are appended otherwise\n * @param animationGroupLoadingMode defines how to handle old animations groups before importing new ones\n * @param targetConverter defines a function used to convert animation targets from loaded scene to current scene (default: search node by name)\n * @param onSuccess a callback with the scene when import succeeds\n * @param onProgress a callback with a progress event for each file being loaded\n * @param onError a callback with the scene, a message, and possibly an exception when import fails\n * @param pluginExtension the extension used to determine the plugin\n * @param name defines the filename, if the data is binary\n * @returns the updated scene with imported animations\n */\n static ImportAnimationsAsync(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onSuccess, onProgress, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onError, pluginExtension, name) {\n return importAnimationsAsyncCore(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onProgress, pluginExtension, name);\n }\n}\n/**\n * No logging while loading\n */\nSceneLoader.NO_LOGGING = 0;\n/**\n * Minimal logging while loading\n */\nSceneLoader.MINIMAL_LOGGING = 1;\n/**\n * Summary logging while loading\n */\nSceneLoader.SUMMARY_LOGGING = 2;\n/**\n * Detailed logging while loading\n */\nSceneLoader.DETAILED_LOGGING = 3;\n// Members\n/**\n * Event raised when a plugin is used to load a scene\n */\nSceneLoader.OnPluginActivatedObservable = onPluginActivatedObservable;\n"],"mappings":";AAAA,SAASA,KAAK,QAAQ,kBAAkB;AACxC,SAASC,UAAU,QAAQ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,UAAU,GAAG,CAAC;AAC1B;AACA;AACA;AACAnB,WAAW,CAACoB,eAAe,GAAG,CAAC;AAC/B;AACA;AACA;AACApB,WAAW,CAACqB,eAAe,GAAG,CAAC;AAC/B;AACA;AACA;AACArB,WAAW,CAACsB,gBAAgB,GAAG,CAAC;AAChC;AACA;AACA;AACA;AACAtB,WAAW,CAACuB,2BAA2B,GAAGzO,2BAA2B","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}