Skip to content

eo-typewriterjs


eo-typewriterjs / TTypewriter

Type Alias: TTypewriter ​

ts
type TTypewriter = object;

Defined in: index.ts:85

Description ​

A typewriter instance returned by createTypewriter. Provides a fluent timeline builder and full playback controls.

Properties ​

PropertyModifierTypeDescriptionDefined in
timelinereadonlyTimelineBuilder-index.ts:86
playpublic() => Promise<void>-index.ts:87
pausepublic() => void-index.ts:88
stoppublic() => void-index.ts:89
cancelpublic() => void-index.ts:90
replaypublic() => Promise<void>-index.ts:91
seekpublic(time) => void-index.ts:92
stepForwardpublic() => void-index.ts:93
stepBackwardpublic() => void-index.ts:94
setRatepublic(rate) => void-index.ts:95
destroypublic() => voidDescription Stop playback and unmount the renderer. Call it when the typewriter is no longer needed, e.g. when its element is removed. Playing again mounts the renderer afresh.index.ts:103
getStatepublic() => TPlaybackControllerState-index.ts:105
getLiveStatepublic() => TTypewriterStateDescription Return the current live typewriter state (document, cursors, selections). Unlike getState() which returns playback metadata, this returns the full document content and cursor positions at the current point in playback.index.ts:115
setAudioEnabledpublic(enabled) => voidDescription Enable or disable typing/delete audio at runtime.index.ts:123
setAudioVolumepublic(volume) => voidDescription Set the master audio volume at runtime. Clamped to [0, 1].index.ts:131
setAudioOptionspublic(options) => voidDescription Replace the full audio configuration at runtime. Channel selection state (shuffle-bag, round-robin) is reset so new sfxs and strategies take effect immediately on the next keystroke.index.ts:141
getAudioOptionspublic() => TAudioOptionsDescription Return a snapshot of the current audio optionsindex.ts:149
setCursorVisiblepublic(visible, cursor?) => voidDescription Show or hide one or all cursors at runtime. Changes take effect immediately. Called from inside a hook or call callback, the change only applies to the current run; called anywhere else, it also applies to replays and seeks.index.ts:161
setCursorOptionspublic(options, cursor?) => voidDescription Update the render options of one or all cursors at runtime. Only the provided fields are changed; others keep their current values. Changes take effect immediately. Called from inside a hook or call callback, the change only applies to the current run; called anywhere else, it also applies to replays and seeks.index.ts:174

Released under the MIT License.