textmode.js / TextmodePluginAPI
Interface: TextmodePluginAPI
An extended API provided to plugins when they are installed on a Textmodifier instance.
Properties
| Property | Type | Description |
|---|---|---|
asciiFramebuffer | TextmodeFramebuffer | The framebuffer containing the ASCII representation. This framebuffer only has a single render target. |
canvas | TextmodeCanvas | The canvas used by the Textmodifier instance. |
drawFramebuffer | TextmodeFramebuffer | The framebuffer the user draws to with 3 render targets. |
font | TextmodeFont | The font used by the Textmodifier instance. |
grid | TextmodeGrid | The grid used by the Textmodifier instance. |
renderer | GLRenderer | The WebGL renderer used by the Textmodifier instance. |
Methods
registerPostDrawHook()
ts
registerPostDrawHook(callback): () => void;Register a callback to be invoked after each draw cycle. Happens outside of the draw framebuffer being bound after the final result is drawn to the screen.
Parameters
| Parameter | Type |
|---|---|
callback | () => void |
Returns
ts
(): void;Returns
void
registerPreDrawHook()
ts
registerPreDrawHook(callback): () => void;Register a callback to be invoked before each draw cycle. Happens just before the draw framebuffer is being bound.
Parameters
| Parameter | Type |
|---|---|
callback | () => void |
Returns
ts
(): void;Returns
void