import {TextureTranscoder} from '@xeokit/xeokit-sdk/src/viewer/scene/utils/textureTranscoders/TextureTranscoder.js'
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 |
destroy() Destroys this transcoder. |
|
public |
transcode(buffers: ArrayBuffer[], config: *, texture: Texture2D): Promise Transcodes texture data from transcoded buffers into a Texture2D. |
Public Methods
public transcode(buffers: ArrayBuffer[], config: *, texture: Texture2D): Promise source
Transcodes texture data from transcoded buffers into a Texture2D.
Params:
Name | Type | Attribute | Description |
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. |