CompressedTextureWriter 🚧
The experimental
CompressedTextureWriter
class can encode a binary encoded image into a compressed texture.
Loader | Characteristic |
---|---|
File Extension | |
File Type | Binary |
Data Format | |
File Format | |
Encoder Type | Asynchronous |
Worker Thread | No (but may run on separate native thread in browsers) |
Streaming | No |
Usage​
import '@loaders.gl/polyfill'; // only if using under Node
import {encodeURLtoURL} from '@loaders.gl/core';
import {CompressedTextureWriter} from '@loaders.gl/textures';
export const IMAGE_URL = 'image.png';
const outputFilename = await encodeURLtoURL(IMAGE_URL, '/tmp/test.ktx', CompressedTextureWriter);
// app can now read the file from outputFilename
Data Format​
TBA
Options​
Option | Type | Default | Description |
---|
Remarks​
- For more information, see
texture-compressor
.