Skip to main content

Class: PlumAssetsManager

Defined in: packages/core/sdk/src/manager/assetsManager/PlumAssetsManager.ts:9

Extends

  • AssetsManager

Constructors

Constructor

new PlumAssetsManager(viewer): PlumAssetsManager

Defined in: packages/core/sdk/src/manager/assetsManager/PlumAssetsManager.ts:12

Parameters

viewer

Viewer

Returns

PlumAssetsManager

Overrides

AssetsManager.constructor

Properties

_tasks

protected _tasks: AbstractAssetTask[]

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:883

Inherited from

AssetsManager._tasks


_totalTasksCount

protected _totalTasksCount: number

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:885

Inherited from

AssetsManager._totalTasksCount


_waitingTasksCount

protected _waitingTasksCount: number

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:884

Inherited from

AssetsManager._waitingTasksCount


autoHideLoadingUI

autoHideLoadingUI: boolean

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:928

Gets or sets a boolean defining if the AssetsManager should automatically hide the loading screen when all assets have been downloaded. If set to false, you need to manually call in hideLoadingUI() once your scene is ready.

Inherited from

AssetsManager.autoHideLoadingUI


onFinish()

onFinish: (tasks) => void

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:889

Callback called when all tasks are processed

Parameters

tasks

AbstractAssetTask[]

Returns

void

Inherited from

AssetsManager.onFinish


onProgress()

onProgress: (remainingCount, totalCount, task) => void

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:901

Callback called when a task is done (whatever the result is)

Parameters

remainingCount

number

totalCount

number

task

AbstractAssetTask

Returns

void

Inherited from

AssetsManager.onProgress


onProgressObservable

onProgressObservable: Observable<IAssetsProgressEvent>

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:917

Observable called when a task is done (whatever the result is)

Inherited from

AssetsManager.onProgressObservable


onTaskError()

onTaskError: (task) => void

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:897

Callback called when a task had an error

Parameters

task

AbstractAssetTask

Returns

void

Inherited from

AssetsManager.onTaskError


onTaskErrorObservable

onTaskErrorObservable: Observable<AbstractAssetTask>

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:909

Observable called when a task had an error

Inherited from

AssetsManager.onTaskErrorObservable


onTasksDoneObservable

onTasksDoneObservable: Observable<AbstractAssetTask[]>

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:913

Observable called when all tasks were executed

Inherited from

AssetsManager.onTasksDoneObservable


onTaskSuccess()

onTaskSuccess: (task) => void

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:893

Callback called when a task is successful

Parameters

task

AbstractAssetTask

Returns

void

Inherited from

AssetsManager.onTaskSuccess


onTaskSuccessObservable

onTaskSuccessObservable: Observable<AbstractAssetTask>

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:905

Observable called when all tasks are processed

Inherited from

AssetsManager.onTaskSuccessObservable


useDefaultLoadingScreen

useDefaultLoadingScreen: boolean

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:922

Gets or sets a boolean defining if the AssetsManager should use the default loading screen

See

https://doc.babylonjs.com/features/featuresDeepDive/scene/customLoadingScreen

Inherited from

AssetsManager.useDefaultLoadingScreen


viewer

viewer: Viewer

Defined in: packages/core/sdk/src/manager/assetsManager/PlumAssetsManager.ts:10

Methods

addBinaryFileTask()

addBinaryFileTask(taskName, url): BinaryFileAssetTask

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:967

Add a BinaryFileAssetTask to the list of active tasks

Parameters

taskName

string

defines the name of the new task

url

string

defines the url of the file to load

Returns

BinaryFileAssetTask

a new BinaryFileAssetTask object

Inherited from

AssetsManager.addBinaryFileTask


addContainerTask()

addContainerTask(taskName, meshesNames, rootUrl, sceneFilename, extension?): ContainerAssetTask

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:943

Add a ContainerAssetTask to the list of active tasks

Parameters

taskName

string

defines the name of the new task

meshesNames

any

defines the name of meshes to load

rootUrl

string

defines the root url to use to locate files

sceneFilename

defines the filename of the scene file or the File itself

string | File

extension?

string

defines the extension to use to load the file

Returns

ContainerAssetTask

a new ContainerAssetTask object

Inherited from

AssetsManager.addContainerTask


addCubeTextureTask()

addCubeTextureTask(taskName, url, extensions?, noMipmap?, files?, prefiltered?): CubeTextureAssetTask

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:995

Add a CubeTextureAssetTask to the list of active tasks

Parameters

taskName

string

defines the name of the new task

url

string

defines the url of the file to load

extensions?

string[]

defines the extension to use to load the cube map (can be null)

noMipmap?

boolean

defines if the texture must not receive mipmaps (false by default)

files?

string[]

defines the list of files to load (can be null)

prefiltered?

boolean

defines the prefiltered texture option (default is false)

Returns

CubeTextureAssetTask

a new CubeTextureAssetTask object

Inherited from

AssetsManager.addCubeTextureTask


addEquiRectangularCubeTextureAssetTask()

addEquiRectangularCubeTextureAssetTask(taskName, url, size, noMipmap?, gammaSpace?): EquiRectangularCubeTextureAssetTask

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:1020

Add a EquiRectangularCubeTextureAssetTask to the list of active tasks

Parameters

taskName

string

defines the name of the new task

url

string

defines the url of the file to load

size

number

defines the size you want for the cubemap (can be null)

noMipmap?

boolean

defines if the texture must not receive mipmaps (false by default)

gammaSpace?

boolean

Specifies if the texture will be used in gamma or linear space (the PBR material requires those textures in linear space, but the standard material would require them in Gamma space)

Returns

EquiRectangularCubeTextureAssetTask

a new EquiRectangularCubeTextureAssetTask object

Inherited from

AssetsManager.addEquiRectangularCubeTextureAssetTask


addHDRCubeTextureTask()

addHDRCubeTextureTask(taskName, url, size, noMipmap?, generateHarmonics?, gammaSpace?, reserved?): HDRCubeTextureAssetTask

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:1008

Add a HDRCubeTextureAssetTask to the list of active tasks

Parameters

taskName

string

defines the name of the new task

url

string

defines the url of the file to load

size

number

defines the size you want for the cubemap (can be null)

noMipmap?

boolean

defines if the texture must not receive mipmaps (false by default)

generateHarmonics?

boolean

defines if you want to automatically generate (true by default)

gammaSpace?

boolean

specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is false)

reserved?

boolean

Internal use only

Returns

HDRCubeTextureAssetTask

a new HDRCubeTextureAssetTask object

Inherited from

AssetsManager.addHDRCubeTextureTask


addImageTask()

addImageTask(taskName, url): ImageAssetTask

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:974

Add a ImageAssetTask to the list of active tasks

Parameters

taskName

string

defines the name of the new task

url

string

defines the url of the file to load

Returns

ImageAssetTask

a new ImageAssetTask object

Inherited from

AssetsManager.addImageTask


addMeshTask()

addMeshTask(taskName, meshesNames, rootUrl, sceneFilename, extension?): MeshAssetTask

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:953

Add a MeshAssetTask to the list of active tasks

Parameters

taskName

string

defines the name of the new task

meshesNames

any

defines the name of meshes to load

rootUrl

string

defines the root url to use to locate files

sceneFilename

defines the filename of the scene file or the File itself

string | File

extension?

string

defines the extension to use to load the file

Returns

MeshAssetTask

a new MeshAssetTask object

Inherited from

AssetsManager.addMeshTask


addPlumMeshTask()

addPlumMeshTask(taskName, meshesNames, rootUrl, sceneFilename, extension?): PlumMeshAssetTask

Defined in: packages/core/sdk/src/manager/assetsManager/PlumAssetsManager.ts:18

Parameters

taskName

string

meshesNames

any

rootUrl

string

sceneFilename

string | File

extension?

string

Returns

PlumMeshAssetTask


addPlumSceneTask()

addPlumSceneTask(taskName, meshesNames, rootUrl, sceneFilename, extension?): PlumMeshAssetTask

Defined in: packages/core/sdk/src/manager/assetsManager/PlumAssetsManager.ts:25

Parameters

taskName

string

meshesNames

any

rootUrl

string

sceneFilename

string | File

extension?

string

Returns

PlumMeshAssetTask


addTextFileTask()

addTextFileTask(taskName, url): TextFileAssetTask

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:960

Add a TextFileAssetTask to the list of active tasks

Parameters

taskName

string

defines the name of the new task

url

string

defines the url of the file to load

Returns

TextFileAssetTask

a new TextFileAssetTask object

Inherited from

AssetsManager.addTextFileTask


addTextureTask()

addTextureTask(taskName, url, noMipmap?, invertY?, samplingMode?): TextureAssetTask

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:984

Add a TextureAssetTask to the list of active tasks

Parameters

taskName

string

defines the name of the new task

url

string

defines the url of the file to load

noMipmap?

boolean

defines if the texture must not receive mipmaps (false by default)

invertY?

boolean

defines if you want to invert Y axis of the loaded texture (true by default)

samplingMode?

number

defines the sampling mode to use (Texture.TRILINEAR_SAMPLINGMODE by default)

Returns

TextureAssetTask

a new TextureAssetTask object

Inherited from

AssetsManager.addTextureTask


load()

load(): AssetsManager

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:1038

Start the loading process

Returns

AssetsManager

the current instance of the AssetsManager

Inherited from

AssetsManager.load


loadAsync()

loadAsync(): Promise<void>

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:1043

Start the loading process as an async operation

Returns

Promise<void>

a promise returning the list of failed tasks

Inherited from

AssetsManager.loadAsync


removeTask()

removeTask(task): void

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:1025

Remove a task from the assets manager.

Parameters

task

AbstractAssetTask

the task to remove

Returns

void

Inherited from

AssetsManager.removeTask


reset()

reset(): AssetsManager

Defined in: node_modules/@babylonjs/core/Misc/assetsManager.d.ts:1033

Reset the AssetsManager and remove all tasks

Returns

AssetsManager

the current instance of the AssetsManager

Inherited from

AssetsManager.reset