Skip to content

textmode.js / Textmodifier / draw

Method: draw()

ts
draw(callback): void;

Set the base layer draw callback.

Put drawing commands for the main layer in this callback.

If multiple layers are added via Textmodifier.layers, each layer has its own draw callback set via TextmodeLayer.draw.

Calling this method is equivalent to setting the callback on textmodifier.layers.base. The direct base-layer callback has precedence if both are set.

js
textmodifier.layers.base.draw(callback);

Parameters

ParameterTypeDescription
callback() => voidFunction to run before each base layer render.

Returns

void

Example