@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
A list of tasks to be run in a sequence.
Returns
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))
);