For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Class RGBAImage
Constructors
constructor
-
new RGBAImage(
size: Size,
data?: Uint8Array<ArrayBufferLike> | Uint8ClampedArray<ArrayBufferLike>,
): RGBAImageParameters
- size: Size
Optionaldata: Uint8Array<ArrayBufferLike> | Uint8ClampedArray<ArrayBufferLike>
Returns RGBAImage
Methods
clone
-
Returns RGBAImage
replace
-
replace(
data: Uint8Array<ArrayBufferLike> | Uint8ClampedArray<ArrayBufferLike>,
copy?: boolean,
): voidParameters
- data: Uint8Array<ArrayBufferLike> | Uint8ClampedArray<ArrayBufferLike>
Optionalcopy: boolean
Returns void
resize
-
Parameters
- size: Size
Returns void
setPixel
-
Parameters
- row: number
- col: number
- value: Color
Returns void
data must be a Uint8Array instead of Uint8ClampedArray because texImage2D does not support Uint8ClampedArray in all browsers.