Skip to content

Documentation / @ripl/3d / TextureSource

Type Alias: TextureSource ​

TextureSource = ImageBitmap | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas | ImageData

Defined in: 3d/src/core/texture.ts:25

An image a Texture can be built from.

Deliberately the set of things a 2D canvas can draw and WebGPU can copy from, so the same texture works on either backend. Nothing here is a WebGPU type — the GPU resources a texture maps to live entirely inside @ripl/webgpu.