Skip to main

requestAnimationFrame

requestAnimationFrame

Source Location: packages/core/src/util.ts#L136

Signature

declare function requestAnimationFrameImplementation(
callback: (time: number) => void,
subscription?: Disposable,
): void

Disposable-based alternative to built-in requestAnimationFrame.

Parameters

ParameterTypeDescription
callback
(time: number) => void

The callback to schedule. This will be called with a time parameter.

subscription
Disposable

If this is disposed then the request will be cancelled.