CLASSES
TagsA - Z

SceneLoader

Scene

Description

class SceneLoader

This class is used to import .babylon files into the scene

Members

static NO_LOGGING : number

static MINIMAL_LOGGING : number

static SUMMARY_LOGGING : number

static DETAILED_LOGGING : number

static ForceFullSceneLoadingForIncremental : boolean

True to force the full loading of the scene, also to prevent from delaying the texture loading; false otherwise

static ShowLoadingScreen : boolean

True to show the loading screen, false otherwise

static loggingLevel : number

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 @param plugin

static ImportMesh(meshesNames, rootUrl, sceneFilename, scene, onsuccess, progressCallBack, onerror) → void

Imports meshes using the given url and names

Parameters

Name Type Description
meshesNames any The meshes names to import. Set "" to select all meshes
rootUrl string a string that defines the root url for scene and resources a string that defines the root url for scene and resources a string that defines the root url for scene and resources 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 a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene 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 is the instance of BABYLON.Scene to append to is the instance of BABYLON.Scene to append to is the instance of Scene to append to
optional onsuccess (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void The callback function called when the given file is correctly loaded
optional progressCallBack () => void The function returning the import progress

static Load(rootUrl, sceneFilename, engine, onsuccess, progressCallBack, onerror) → void

Load a scene

Parameters

Name Type Description
rootUrl string a string that defines the root url for scene and resources a string that defines the root url for scene and resources a string that defines the root url for scene and resources a string that defines the root url for scene and resources 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 a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene 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 is the instance of BABYLON.Engine to use to create the scene is the instance of BABYLON.Engine to use to create the scene is the instance of BABYLON.Engine to use to create the scene is the instance of Engine to use to create the scene
optional onsuccess (scene: Scene) => void The callback function called when the given file is correctly loaded
optional progressCallBack any The function returning the import progress

static Append(rootUrl, sceneFilename, scene, onsuccess, progressCallBack, onerror) → void

Append a scene

Parameters

Name Type Description
rootUrl string a string that defines the root url for scene and resources a string that defines the root url for scene and resources a string that defines the root url for scene and resources a string that defines the root url for scene and resources 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 a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene 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 is the instance of BABYLON.Scene to append to is the instance of BABYLON.Scene to append to is the instance of BABYLON.Scene to append to is the instance of Scene to append to
optional onsuccess (scene: Scene) => void The callback function called when the given file is correctly loaded
optional progressCallBack any The function returning the import progress