Skip to content

UWAL / TextureUtils

Type Aliases

Usage

ts
type Usage = Readonly<Record<"RENDER" | "STORAGE", GPUTextureUsageFlags>>;

Type Parameters

Type Parameter

Variables

TEXTURE

ts
const TEXTURE: Readonly<Record<"STORAGE" | "RENDER", number>>;

Some utility bitmasks of the GPUTextureUsage flags.

  • TEXTURE.RENDER is the default usage when creating a texture.
  • TEXTURE.STORAGE is the default usage when creating a storage texture.

Functions

TextureUtils()

ts
function TextureUtils(Renderer?): Promise<Texture & () => Texture>;

Parameters

ParameterTypeDescription
Renderer?RenderStageRenderer instance required in some methods.

Returns

Promise<Texture & () => Texture>

A promise of the Texture class.

See

Texture class for method reference.

Example

ts
const Texture = new (await UWAL.TextureUtils());

Released under the MIT License.