Loader

Base class for implementing loaders.

Constructor

Loader(manager : LoadingManager)

manager — The loadingManager for the loader to use. Default is v3d.DefaultLoadingManager.

Creates a new Loader.

Properties

.crossOrigin : string

The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS. Default is anonymous.

.manager : LoadingManager

The loadingManager the loader is using. Default is DefaultLoadingManager.

.path : String

The base path from which the asset will be loaded. Default is the empty string.

.resourcePath : String

The base path from which additional resources like textures will be loaded. Default is the empty string.

Methods

.load () : void

This method needs to be implement by all concrete loaders. It holds the logic for loading the asset from the backend.

.parse () : void

This method needs to be implement by all concrete loaders. It holds the logic for parsing the asset into Verge3D entities.

.setCrossOrigin (crossOrigin : String) : Loader

crossOrigin — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.

.setPath (path : String) : Loader

path — Set the base path for the asset.

.setResourcePath (resourcePath : String) : Loader

resourcePath — Set the base path for dependent resources like textures.

Source

For more info on how to obtain the source code of this module see this page.