Skip to content

textmode.js / Textmodifier / ortho

Method: ortho()

ts
ortho(near?, far?): void;

Enable orthographic projection for subsequent shape drawing.

By default, textmode uses a perspective projection. Calling this method switches to an orthographic projection, where objects maintain their size regardless of depth (Z position).

The projection mode is reset to perspective at the beginning of each frame.

Parameters

ParameterTypeDescription
near?numberNear clipping plane distance.
far?numberFar clipping plane distance.

Returns

void

Example