Skip to content

anim-format (runtime format) / textAnimUnits

Function: textAnimUnits() ​

ts
function textAnimUnits(chars): TextAnimCounts;

Groups the characters of a laid-out text into units: a letter = each character that is not white space; a word = letters with no white space or line break between them; a line = the letters of one drawn line.

Parameters ​

ParameterType
charsreadonly TextAnimChar[]

Returns ​

TextAnimCounts

HereSplash — 2D animation for the web