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.RENDERis the default usage when creating a texture.TEXTURE.STORAGEis the default usage when creating a storage texture.
Functions
TextureUtils()
ts
function TextureUtils(Renderer?): Promise<Texture & () => Texture>;Parameters
| Parameter | Type | Description |
|---|---|---|
Renderer? | RenderStage | Renderer 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());