Skip to content

@tmrw-realityos/charmDocs


@tmrw-realityos/charm / KTX2EnvironmentLoader

Class: KTX2EnvironmentLoader

Constructors

new KTX2EnvironmentLoader()

new KTX2EnvironmentLoader(): KTX2EnvironmentLoader

Returns

KTX2EnvironmentLoader

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

url: string

KTX2 filename

Returns

Promise<HDREnvironment>

Container for HDREnvironment

Defined in

packages/charm/src/helpers/KTX2Loader.ts:243


parse()

parse(buffer): HDREnvironment

Similar to load but parses data from an arraybuffer.

Parameters

buffer: ArrayBuffer

Texture data in KTX2 format

Returns

HDREnvironment

Container for HDREnvironment

Defined in

packages/charm/src/helpers/KTX2Loader.ts:260