KhronosTextureContainer2

Class for loading KTX2 files

Hierarchy

  • KhronosTextureContainer2

Index

Constructors

Properties

Methods

Constructors

constructor

Find examples in Playground
  • 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 DefaultNumWorkers

Find examples in Playground
DefaultNumWorkers: number

Default number of workers used to handle data decoding

Static URLConfig

Find examples in Playground
URLConfig: object

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.jsMSCTranscoder URLConfig.wasmMSCTranscoder You can see their default values in this PG: https://playground.babylonjs.com/#EIJH8L#9

Type declaration

  • jsDecoderModule: string
  • jsMSCTranscoder: null
  • wasmMSCTranscoder: null
  • wasmUASTCToASTC: null
  • wasmUASTCToBC7: null
  • wasmUASTCToRGBA_SRGB: null
  • wasmUASTCToRGBA_UNORM: null

Methods

dispose

Find examples in Playground
  • dispose(): void
  • Stop all async operations and release resources.

    Returns void

Static IsValid

Find examples in Playground
  • IsValid(data: ArrayBufferView): boolean
  • 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

Generated using TypeDoc