textmode.js / TextmodePluginAPI
Interface: TextmodePluginAPI
An extended API provided to plugins when they are installed on a Textmodifier instance.
Extends
TextmodePluginContext
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
asciiFramebuffer | TextmodeFramebuffer | The framebuffer containing the ASCII representation. | TextmodePluginContext.asciiFramebuffer |
canvas | TextmodeCanvas | The canvas used by the Textmodifier instance. | TextmodePluginContext.canvas |
drawFramebuffer | TextmodeFramebuffer | The framebuffer the user draws to. | TextmodePluginContext.drawFramebuffer |
font | TextmodeFont | The font used by the Textmodifier instance. | TextmodePluginContext.font |
grid | TextmodeGrid | The grid used by the Textmodifier instance. | TextmodePluginContext.grid |
renderer | GLRenderer | The WebGL renderer used by the Textmodifier instance. | TextmodePluginContext.renderer |
Methods
flushDrawCommands()
ts
flushDrawCommands(): void;Immediately execute any pending draw commands.
Returns
void
Inherited from
ts
TextmodePluginContext.flushDrawCommandsregisterPostDrawHook()
ts
registerPostDrawHook(callback): () => void;Register a callback to be invoked after each draw cycle. Happens outside of the draw framebuffer being bound.
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 outside of the draw framebuffer being bound.
Parameters
| Parameter | Type |
|---|---|
callback | () => void |
Returns
ts
(): void;Returns
void