Skip to content

artboard-deluxe / raf

raf()

const raf: (options?) => ArtboardPluginDefinition<{ fps?: number; }, object>

Defined in: plugins/raf/index.ts:6

Registers a requestAnimationFrame callback for the artboard.

Parameters

options?

fps?

number

Cap the frame rate to the given value (e.g. 30, 60, 120).

When set, artboard.loop() is only called when the elapsed time since the last frame exceeds the target interval. Useful for debugging frame-rate dependent behavior.

When not set, artboard.loop() is called on every animation frame.

Returns

ArtboardPluginDefinition<{ fps?: number; }, object>