Skip to content

textmode.js / TextmodePluginAPI

Interface: TextmodePluginAPI

An extended API provided to plugins when they are installed on a Textmodifier instance.

Properties

PropertyTypeDescription
asciiFramebufferTextmodeFramebufferThe framebuffer containing the ASCII representation.
This framebuffer only has a single render target.
canvasTextmodeCanvasThe canvas used by the Textmodifier instance.
drawFramebufferTextmodeFramebufferThe framebuffer the user draws to with 3 render targets.
fontTextmodeFontThe font used by the Textmodifier instance.
gridTextmodeGridThe grid used by the Textmodifier instance.
rendererGLRendererThe 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

ParameterType
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

ParameterType
callback() => void

Returns

ts
(): void;
Returns

void