class SceneLoader
| Name | Type | Description | |
|---|---|---|---|
| extension | string |
| Name | Type | Description | |
|---|---|---|---|
| plugin | ISceneLoaderPlugin or ISceneLoaderPluginAsync |
Import meshes into a scene
| 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 |
Load a scene
| 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 |
Append a scene
| 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 |