Skip to content

anim-format (runtime format) / AnimText

Interface: AnimText ​

Properties ​

PropertyTypeDescription
boxobjectthe text box (local units); text wraps inside
box.hnumber-
box.wnumber-
contentstringplain text (the runs joined, when there are runs)
fontobject-
font.align"left" | "center" | "right" | "justify"-
font.boldboolean-
font.colorstring-
font.familystring-
font.italicboolean-
font.sizenumber-
letterSpacing?numberpx between letters, default 0
lineHeight?number× font size, default DEFAULT_TEXT_LINE_HEIGHT
multiline?booleanfalse = one line
overflow?"visible" | "hidden" | "scroll"-
runs?AnimTextRun[]rich text; absent = the whole text uses font
strikethrough?boolean-
textStroke?objectoutline under the fill; color "RRGGBBAA"
textStroke.colorstring-
textStroke.widthnumber-
textTransform?"uppercase" | "lowercase" | "capitalize"letter case as drawn (CSS text-transform); content keeps the typed text
underline?booleana line under / through each line (horizontal writing only), base colour
verticalAlign?"top" | "middle" | "bottom"-
wordWrap?booleanfalse = no wrapping at the box width
writingMode?"horizontal" | "vertical""vertical" = CJK vertical writing, columns right to left

HereSplash — 2D animation for the web