textmode.js / TextmodeFramebuffer / readPixels
Method: readPixels()
ts
readPixels(attachmentIndex): Uint8Array;Read RGBA pixel data from one attachment.
The returned data is vertically flipped so the first row matches the top row of the framebuffer when used from JavaScript.
Parameters
| Parameter | Type | Description |
|---|---|---|
attachmentIndex | number | Zero-based attachment index to read. |
Returns
Uint8Array
RGBA pixel data for the selected attachment.