Skip to content

textmode.js / TextmodePluginAPI

Interface: TextmodePluginAPI

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

Extends

  • TextmodePluginContext

Properties

PropertyTypeDescriptionInherited from
asciiFramebufferTextmodeFramebufferThe framebuffer containing the ASCII representation.TextmodePluginContext.asciiFramebuffer
canvasTextmodeCanvasThe canvas used by the Textmodifier instance.TextmodePluginContext.canvas
drawFramebufferTextmodeFramebufferThe framebuffer the user draws to.TextmodePluginContext.drawFramebuffer
fontTextmodeFontThe font used by the Textmodifier instance.TextmodePluginContext.font
gridTextmodeGridThe grid used by the Textmodifier instance.TextmodePluginContext.grid
rendererGLRendererThe 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.flushDrawCommands

registerPostDrawHook()

ts
registerPostDrawHook(callback): () => void;

Register a callback to be invoked after each draw cycle. Happens outside of the draw framebuffer being bound.

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 outside of the draw framebuffer being bound.

Parameters

ParameterType
callback() => void

Returns

ts
(): void;
Returns

void