Loader

DataTextureLoader

Abstract base class for loading binary texture formats RGBE, EXR or TGA. Textures are internally loaded via FileLoader.

Derived classes have to implement the parse() method which holds the parsing for the respective format.

Constructor

new DataTextureLoader( manager : LoadingManager ) (abstract)

Constructs a new data texture loader.

manager

The loading manager.

Methods

.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback ) : DataTexture

Starts loading from the given URL and passes the loaded data texture to the onLoad() callback. The method also returns a new texture object which can directly be used for material creation. If you do it this way, the texture may pop up in your scene once the respective loading process is finished.

url

The path/URL of the file to be loaded. This can also be a data URI.

onLoad

Executed when the loading process has been finished.

onProgress

Executed while the loading is in progress.

onError

Executed when errors occur.

Overrides: Loader#load
Returns: The data texture.

Type Definitions

.TexData

Represents the result object type of the parse() method.

Properties:
Name Type Attributes Default Description
image Object <optional>

An object holding width, height and the texture data.

width number <optional>

The width of the base mip.

height number <optional>

The width of the base mip.

data TypedArray <optional>

The texture data.

format number <optional>

The texture format.

type number <optional>

The texture type.

flipY boolean <optional>

If set to true, the texture is flipped along the vertical axis when uploaded to the GPU.

wrapS number <optional>
ClampToEdgeWrapping

The wrapS value.

wrapT number <optional>
ClampToEdgeWrapping

The wrapT value.

anisotropy number <optional>
1

The anisotropy value.

generateMipmaps boolean <optional>

Whether to generate mipmaps or not.

colorSpace string <optional>

The color space.

magFilter number <optional>

The mag filter.

minFilter number <optional>

The min filter.

mipmaps Array.<Object> <optional>

The mipmaps.

Source

src/loaders/DataTextureLoader.js