Skip to content

DataTexture

new DataTexture(data: Uint8ClampedArray, width: number, height: number)

THREE equivalent: THREE.DataTexture

Texture created directly from raw RGBA pixel data. Bypasses the needsUpdate / clamp-and-cache path - the ImageData is stored as-is.

Differs from THREE.js

CPU renderer reads pixel data directly each frame. No GPU upload step, so changes to the underlying array are reflected immediately without needsUpdate.

Name Type Description
data ImageData|undefined The raw ImageData wrapping the provided Uint8ClampedArray.
width number Width in pixels.
height number Height in pixels.