Reference Source
public interface | source

TextureTranscoder

Direct Implemented:

Transcodes texture data.

A SceneModel configured with an appropriate TextureTranscoder will allow us to add textures from transcoded buffers or files. For a concrete example, see VBOSceneModel, which can be configured with a KTX2TextureTranscoder, which allows us to add textures from KTX2 buffers and files.

Method Summary

Public Methods
public

Destroys this transcoder.

public

transcode(buffers: ArrayBuffer[], config: *, texture: Texture2D): Promise

Transcodes texture data from transcoded buffers into a Texture2D.

Public Methods

public destroy() source

Destroys this transcoder.

public transcode(buffers: ArrayBuffer[], config: *, texture: Texture2D): Promise source

Transcodes texture data from transcoded buffers into a Texture2D.

Params:

NameTypeAttributeDescription
buffers ArrayBuffer[]

Transcoded texture data. Given as an array of buffers so that we can support multi-image textures, such as cube maps.

config *

Transcoding options.

texture Texture2D

The texture to load.

Return:

Promise

Resolves when the texture has loaded.