@tmrw-realityos/charm / Exports / KTXLoader
Class: KTXLoader
Loader class for the KTX1 file format. https://registry.khronos.org/KTX/specs/1.0/ktxspec.v1.html
Table of contents
Constructors
Methods
Constructors
constructor
• new KTXLoader(): KTXLoader
Returns
Methods
load
▸ load(url): Promise<HDREnvironment>
Parse the input data and create HDREnvironment. Currently, only rgba32float, rgba16float, rg11b10ufloat, rgb9e5ufloat formats without compression are supported.
Parameters
| Name | Type | Description |
|---|---|---|
url | string | KTX filename |
Returns
Promise<HDREnvironment>
Container for HDREnvironment
Defined in
packages/charm/src/helpers/KTXLoader.ts:14
parse
▸ parse(buffer): HDREnvironment
Similar to load but parses data from an arraybuffer.
Parameters
| Name | Type | Description |
|---|---|---|
buffer | ArrayBuffer | Texture data in KTX format |
Returns
HDREnvironment
Container for HDREnvironment