API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classSequenceAction
Ordered input pattern - `+` joins a chord within one step, `|` alternates between whole alternatives within one step (any ONE of which satisfies it), `>` advances to the next step. `triggered` is `true` for the one frame the final step completes; see progress's own doc comment for how far a pattern has advanced. Precedence, loosest to tightest: `'>'` separates steps, `'|'` separates alternatives within one step, `'+'` joins channels required simultaneously within one alternative - `'A+B|C>D'` is "(A and B) or C, then D". A step with no `'|'` has exactly one alternative, so this is a strict superset of the pre-`'|'` grammar: nothing about a plain `'+'`/`'>'` pattern changes. A repeated single-channel step (`'A>A'`) requires a genuine release between the two presses: holding the channel down after the first accepted step never re-satisfies the second on its own, since a step only advances on a channel's rising (inactive-to-active) edge, not merely because it reads active - see `_update`'s implementation. A single atomic ChannelEventBatch never invents an order: two channels written together by the same real-world event (e.g. `A` and `B` both changing in one batch) can complete a chord STEP together, but can never be read as two sequential steps (`A` then `B`) within that same batch - see `_update`'s implementation comment. Switching from one alternative to another within the same step is never treated as an unrelated, mismatching entry - only a channel that belongs to NONE of the step's alternatives is. A string pattern resolves tokens as case-insensitive Keyboard enum names (`'Down>Down+Right>Right>A'`). This is a shortcut list syntax for enum lookups, not text or IME input - it never decodes typed characters, dead keys, or composed input, and rejects any token that is not a known `Keyboard` member. Use an InputSequence array of channels/chords/ alternations directly to include pointer or gamepad channels. A string LITERAL is additionally checked at compile time, so a typo (`'Up>Up>Dwon'`) or a stray separator (`'A>>B'`) is a type error naming the reason rather than a throw on the first frame that constructs the action. A pattern that is only known at runtime - read from a config file, assembled from parts, or passed in from JavaScript - types as plain `string` and is checked by the parser alone, exactly as before.
import { SequenceAction } from '@codexo/exojs'Ordered input pattern - `+` joins a chord within one step, `|` alternates between whole alternatives within one step (any ONE of which satisfies it), `>` advances to the next step. `triggered` is `true` for the one frame the final step completes; see progress's own doc comment for how far a pattern has advanced.
Precedence, loosest to tightest: `'>'` separates steps, `'|'` separates alternatives within one step, `'+'` joins channels required simultaneously within one alternative - `'A+B|C>D'` is "(A and B) or C, then D". A step with no `'|'` has exactly one alternative, so this is a strict superset of the pre-`'|'` grammar: nothing about a plain `'+'`/`'>'` pattern changes.
A repeated single-channel step (`'A>A'`) requires a genuine release between the two presses: holding the channel down after the first accepted step never re-satisfies the second on its own, since a step only advances on a channel's rising (inactive-to-active) edge, not merely because it reads active - see `_update`'s implementation.
A single atomic ChannelEventBatch never invents an order: two channels written together by the same real-world event (e.g. `A` and `B` both changing in one batch) can complete a chord STEP together, but can never be read as two sequential steps (`A` then `B`) within that same batch - see `_update`'s implementation comment. Switching from one alternative to another within the same step is never treated as an unrelated, mismatching entry - only a channel that belongs to NONE of the step's alternatives is.
A string pattern resolves tokens as case-insensitive Keyboard enum names (`'Down>Down+Right>Right>A'`). This is a shortcut list syntax for enum lookups, not text or IME input - it never decodes typed characters, dead keys, or composed input, and rejects any token that is not a known `Keyboard` member. Use an InputSequence array of channels/chords/ alternations directly to include pointer or gamepad channels.
A string LITERAL is additionally checked at compile time, so a typo (`'Up>Up>Dwon'`) or a stray separator (`'A>>B'`) is a type error naming the reason rather than a throw on the first frame that constructs the action. A pattern that is only known at runtime - read from a config file, assembled from parts, or passed in from JavaScript - types as plain `string` and is checked by the parser alone, exactly as before.
new(pattern: ValidatedSequenceBindingValidatedChordBinding for SequenceAction, which allows `'>'` and therefore more than one step.<Pattern>, options: SequenceActionOptionsOptions for SequenceAction - the options every action shares, plus pattern timing and restart behavior.): SequenceAction<Pattern>kind: "sequence"binding: Bindingchannels: readonly number[]defaultBinding: Bindingprogress: numbertriggered: boolean