Skip to content

textmode.js / Textmodifier / frameCount

Accessor: frameCount

Get Signature

ts
get frameCount(): number;

Current frame count.

The frame count starts at 0, but is incremented at the beginning of each draw cycle. This means that inside the first call to draw(), frameCount is 1.

This value is useful for timing-based animations, patterns, and state changes.

Returns

number

Number of frames rendered since the sketch started.

Example

Set Signature

ts
set frameCount(value): void;

Set the current frame count.

Modifying the frame count can be used to reset animations or jump to a specific point in time-based patterns.

Parameters

ParameterTypeDescription
valuenumberNew frame count value.

Returns

void

Example