Skip to content

artboard-deluxe / ArtboardPluginInstance

ArtboardPluginInstance<O, R>

ArtboardPluginInstance<O, R>: object & R

A fully initialised plugin instance.

Type declaration

destroy()?

optional destroy: () => void

Remove event listeners and clean up.

Returns

void

loop()?

optional loop: (ctx) => void

Called in the main animation loop.

Receives the state of the artboard at the time of the animation loop as an argument.

Parameters

ctx

ArtboardLoopContext

Returns

void

onSizeChange()?

optional onSizeChange: (entry) => void

Called when the size of an element previously observed using artboard.observeSize() changes.

Parameters

entry

ResizeObserverEntry

Returns

void

options

options: ArtboardPluginOptions<O>

The options helper.

Type Parameters

O extends object = object

R extends object = object

Defined in

types/index.ts:34