Class KhronosTextureContainer2
Hierarchy
- KhronosTextureContainer2
Index
Constructors
constructor
Constructor
Parameters
engine: ThinEngine
The engine to use
Optional numWorkers: number
The number of workers for async operations. Specify
0
to disable web workers and run synchronously in the current context.
Returns KhronosTextureContainer2
Properties
Static Default Decoder OptionsSearch playground for DefaultDecoderOptions
Default configuration for the KTX2 decoder. The options defined in this way have priority over those passed when creating a KTX2 texture with new Texture(...).
Static Default Num WorkersSearch playground for DefaultNumWorkers
Default number of workers used to handle data decoding
Static URLConfigSearch playground for URLConfig
URLs to use when loading the KTX2 decoder module as well as its dependencies If a url is null, the default url is used (pointing to https://preview.babylonjs.com) Note that jsDecoderModule can't be null and that the other dependencies will only be loaded if necessary Urls you can change: URLConfig.jsDecoderModule URLConfig.wasmUASTCToASTC URLConfig.wasmUASTCToBC7 URLConfig.wasmUASTCToRGBA_UNORM URLConfig.wasmUASTCToRGBA_SRGB URLConfig.wasmUASTCToR8_UNORM URLConfig.wasmUASTCToRG8_UNORM URLConfig.jsMSCTranscoder URLConfig.wasmMSCTranscoder URLConfig.wasmZSTDDecoder You can see their default values in this PG: https://playground.babylonjs.com/#EIJH8L#29
Type declaration
js
Decoder Module: string jsMSCTranscoder: Nullable<string>
wasmMSCTranscoder: Nullable<string>
wasmUASTCToASTC: Nullable<string>
wasmUASTCToBC7: Nullable<string>
wasmUASTCTo
R8_ UNORM: Nullable<string> wasmUASTCToRG8_
UNORM: Nullable<string> wasmUASTCToRGBA_
SRGB: Nullable<string> wasmUASTCToRGBA_
UNORM: Nullable<string> wasmZSTDDecoder: Nullable<string>
Methods
Static Is ValidSearch playground for IsValid
Checks if the given data starts with a KTX2 file identifier.
Parameters
data: ArrayBufferView
the data to check
Returns boolean
true if the data is a KTX2 file or false otherwise
Class for loading KTX2 files