CLASSES
TagsA - Z

AssetsManager

Assets

Description

class AssetsManager

This class can be used to import meshes into a scene or load text and binary files.

Constructor

new AssetsManager(scene)

Parameters

Name Type Description
scene Scene

Members

onFinish : (tasks: IAssetTask[]) => void

onTaskSuccess : (task: IAssetTask) => void

onTaskError : (task: IAssetTask) => void

useDefaultLoadingScreen : boolean

Methods

addMeshTask(taskName, meshesNames, rootUrl, sceneFilename) → IAssetTask

Parameters

Name Type Description
taskName string
meshesNames any
rootUrl string

addTextFileTask(taskName, url) → IAssetTask

Parameters

Name Type Description
taskName string
url string

addBinaryFileTask(taskName, url) → IAssetTask

Parameters

Name Type Description
taskName string
url string

addImageTask(taskName, url) → IAssetTask

Parameters

Name Type Description
taskName string
url string

addTextureTask(taskName, url, noMipmap, invertY, samplingMode) → ITextureAssetTask

Parameters

Name Type Description
taskName string
url string
optional noMipmap boolean
optional invertY boolean

addCubeTextureTask(name, url, extensions, noMipmap, files) → IAssetTask

Parameters

Name Type Description
name string
url string
optional extensions string[]
optional noMipmap boolean

addHDRCubeTextureTask(name, url, size, noMipmap, generateHarmonics, useInGammaSpace, usePMREMGenerator) → IAssetTask

Parameters

Name Type Description
name string
url string
optional size number
optional noMipmap boolean
optional generateHarmonics boolean
optional useInGammaSpace boolean

reset() → AssetsManager

load() → AssetsManager