Skip to content

WasmGPU.texture

Summary

WasmGPU.texture is the texture factory facade. It creates asynchronous 2D texture objects from encoded bytes, URLs, or pre-decoded ImageBitmap sources; returned textures expose upload state, views, samplers, and explicit destruction.

Syntax

const texture = wgpu.texture.create2D({
    source: { kind: "bitmap", bitmap: imageBitmap }
});

Available APIs

See Also