SceneLoader

Scene

Description

class SceneLoader

Members

static NO_LOGGING : number

static MINIMAL_LOGGING : number

static SUMMARY_LOGGING : number

static DETAILED_LOGGING : number

static ForceFullSceneLoadingForIncremental : boolean

static ShowLoadingScreen : boolean

static loggingLevel : number

static CleanBoneMatrixWeights : boolean

static OnPluginActivatedObservable : Observable<ISceneLoaderPlugin>

ISceneLoaderPluginAsync : undefined

ISceneLoaderPluginAsync : undefined

ISceneLoaderPluginFactory : undefined

ISceneLoaderPluginAsync : undefined

ISceneLoaderPluginAsync : undefined

ISceneLoaderPluginAsync : undefined

Methods

static GetPluginForExtension(extension) ISceneLoaderPlugin

Parameters

Name Type Description
extension string

static RegisterPlugin(plugin, ISceneLoaderPluginAsync) void

Parameters

Name Type Description
plugin ISceneLoaderPlugin or ISceneLoaderPluginAsync

static ImportMesh(meshNames, rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension) Nullable<ISceneLoaderPlugin>

Import meshes into a scene

Parameters

Name Type Description
meshNames any an array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
rootUrl string a string that defines the root url for scene and resources
sceneFilename string a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
scene Scene the instance of BABYLON.Scene to append to
optional onSuccess Nullable<(meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void> a callback with a list of imported meshes, particleSystems, and skeletons when import succeeds
optional onProgress Nullable<(event: ProgressEvent) => void> a callback with a progress event for each file being loaded
optional onError Nullable<(scene: Scene, message: string, exception: any) => void> a callback with the scene, a message, and possibly an exception when import fails

static Load(rootUrl, sceneFilename, engine, onSuccess, onProgress, onError, pluginExtension) Nullable<ISceneLoaderPlugin>

Load a scene

Parameters

Name Type Description
rootUrl string a string that defines the root url for scene and resources
sceneFilename any a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
engine Engine is the instance of BABYLON.Engine to use to create the scene
optional onSuccess scene Scene

| a callback with the scene, a message, and possibly an exception when import fails optional | onProgress | | event | ProgressEvent | optional | onError | | scene | Scene | | message | string | optional | exception | any |

static Append(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension) Nullable<ISceneLoaderPlugin>

Append a scene

Parameters

Name Type Description
rootUrl string a string that defines the root url for scene and resources
sceneFilename any a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
scene Scene is the instance of BABYLON.Scene to append to
optional onSuccess scene Scene

| a callback with the scene, a message, and possibly an exception when import fails optional | onProgress | | event | ProgressEvent | optional | onError | | scene | Scene | | message | string | optional | exception | any |