Skip to content

Intermact API Reference / @intermact/core / computeGlyphRevealSpans

Function: computeGlyphRevealSpans()

computeGlyphRevealSpans(count, overlap?, direction?): readonly GlyphRevealSpan[]

Defined in: packages/core/src/text/write-spans.ts:18

Compute per-glyph stroke windows on the global reveal timeline [0,1]. overlap is the fraction of each glyph stroke that may overlap with the next (0 = strict sequential, 0.3 = next glyph starts when previous is 70% done). simultaneous gives every glyph the full [0,1] window.

Parameters

count

number

overlap?

number = 0

direction?

WriteDirection = "ltr"

Returns

readonly GlyphRevealSpan[]

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)