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
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
timeline | readonly | TimelineBuilder | - | index.ts:86 |
play | public | () => Promise<void> | - | index.ts:87 |
pause | public | () => void | - | index.ts:88 |
stop | public | () => void | - | index.ts:89 |
cancel | public | () => void | - | index.ts:90 |
replay | public | () => Promise<void> | - | index.ts:91 |
seek | public | (time) => void | - | index.ts:92 |
stepForward | public | () => void | - | index.ts:93 |
stepBackward | public | () => void | - | index.ts:94 |
setRate | public | (rate) => void | - | index.ts:95 |
destroy | public | () => void | Description 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 |
getState | public | () => TPlaybackControllerState | - | index.ts:105 |
getLiveState | public | () => TTypewriterState | Description 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 |
setAudioEnabled | public | (enabled) => void | Description Enable or disable typing/delete audio at runtime. | index.ts:123 |
setAudioVolume | public | (volume) => void | Description Set the master audio volume at runtime. Clamped to [0, 1]. | index.ts:131 |
setAudioOptions | public | (options) => void | Description 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 |
getAudioOptions | public | () => TAudioOptions | Description Return a snapshot of the current audio options | index.ts:149 |
setCursorVisible | public | (visible, cursor?) => void | Description 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 |
setCursorOptions | public | (options, cursor?) => void | Description 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 |