MotionScript

@motion-script/core


@motion-script/core / RunAsyncOptions

Interface: RunAsyncOptions

Defined in: runtime/precompisition.ts:311

Knobs for Precomp.runAsync.

Properties

budgetMs?

optional budgetMs?: number

Defined in: runtime/precompisition.ts:317

Wall-clock ms the pass may occupy before yielding to the event loop. Defaults to DEFAULT_PRECOMP_BUDGET_MS. Set to 0 in tests to force a yield on every frame, making preemption deterministic.


isCancelled?

optional isCancelled?: () => boolean

Defined in: runtime/precompisition.ts:319

Polled after every yield; when it returns true the pass abandons its work.

Returns

boolean


onProgress?

optional onProgress?: (result) => void

Defined in: runtime/precompisition.ts:325

Called with a freshly assembled result each time a scene finishes, so a consumer can publish a growing timeline instead of waiting for the whole project. The final call has complete: true.

Parameters

result

PrecompResult

Returns

void