API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classTextureAssetType
GPU-ready Textures decoded from PNG, APNG, JPG, WebP, AVIF, GIF, BMP and ICO bytes, or from a KTX2 container holding a hardware-compressed payload. One type covers both because the payload kind is a property of the bytes, not of the asset: an AssetVariantSet rule may resolve one logical source to a compressed container where the device supports the format and to an image elsewhere, and a caller holding the handle sees a `Texture` either way. An animated source (APNG, animated WebP or GIF, an AVIF sequence) decodes to its first frame - a texture is a still image. Use the animation asset types for playback. An `.ico` file may hold several resolutions of one image. Which of them the decode yields is the browser's choice and is not specified anywhere, so an icon whose exact size matters should be shipped as the single image it is meant to be rather than as a multi-resolution container.
import { TextureAssetType } from '@codexo/exojs'GPU-ready Textures decoded from PNG, APNG, JPG, WebP, AVIF, GIF, BMP and ICO bytes, or from a KTX2 container holding a hardware-compressed payload.
One type covers both because the payload kind is a property of the bytes, not of the asset: an AssetVariantSet rule may resolve one logical source to a compressed container where the device supports the format and to an image elsewhere, and a caller holding the handle sees a `Texture` either way.
An animated source (APNG, animated WebP or GIF, an AVIF sequence) decodes to its first frame - a texture is a still image. Use the animation asset types for playback.
An `.ico` file may hold several resolutions of one image. Which of them the decode yields is the browser's choice and is not specified anywhere, so an icon whose exact size matters should be shipped as the single image it is meant to be rather than as a multi-resolution container.
new(): TextureAssetTypeasset(source: string, options?: TextureAssetOptionsOptions accepted by an asset of the built-in `texture` type.): AssetA typed, loadable asset reference. Holds config only - no loaded resource.<TextureA static GPU texture sourced from an image, canvas, or video element. Holds the pixel source, its sampling state (ScaleModes, WrapModes) and its upload state (…>createFactory(): AssetFactoryBuilds one kind of runtime resource from normalized source data. A factory owns construction and teardown, and nothing else: it does not fetch, does not decide…<ArrayBuffer, TextureA static GPU texture sourced from an image, canvas, or video element. Holds the pixel source, its sampling state (ScaleModes, WrapModes) and its upload state (…, TextureAssetOptionsOptions accepted by an asset of the built-in `texture` type.>resourceIdentity(__namedParameters: AssetRequestOne request for an asset of a given type, as an identity hook sees it.<TextureAssetOptionsOptions accepted by an asset of the built-in `texture` type.>): stringunacquiredSource?(request: AssetRequestOne request for an asset of a given type, as an identity hook sees it.<TextureAssetOptionsOptions accepted by an asset of the built-in `texture` type.>, url: string, network: NetworkSnapshot): undefined | { source: ArrayBuffer }extensions: string[]id: "texture"leaf: SeamlessAdapterPer-type strategy for seamless deferred asset handles (asset-system v2). A seamless type hands out a stable placeholder handle synchronously from `loader.get(s…<TextureA static GPU texture sourced from an image, canvas, or video element. Holds the pixel source, its sampling state (ScaleModes, WrapModes) and its upload state (…>