CLASSES
TagsA - Z

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

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) void

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

static Load(rootUrl, sceneFilename, engine, onSuccess, onProgress, onError) void

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) => void a callback with the scene when import succeeds
optional onProgress (event: ProgressEvent) => void a callback with a progress event for each file being loaded

static Append(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError) void

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) => void a callback with the scene when import succeeds
optional onProgress (event: ProgressEvent) => void a callback with a progress event for each file being loaded