Skip to Content

@revideo/core


@revideo/core / flow / sequence

Function: sequence()

sequence(delay, …tasks): ThreadGenerator

Defined in: flow/sequence.ts:26 

Start all tasks one after another with a constant delay between.

Parameters

delay

number

The delay between each of the tasks.

tasks

ThreadGenerator[]

A list of tasks to be run in a sequence.

Returns

ThreadGenerator

Remarks

The function doesn’t wait until the previous task in the sequence has finished. Once the delay has passed, the next task will start even if the previous is still running.

Example

yield* sequence( 0.1, ...rects.map(rect => rect.x(100, 1)) );
© 2026 Haven Technologies, Inc.
Function: sequence() – Revideo