Skip to content

artboard-deluxe / createArtboard

createArtboard()

createArtboard(providedRootEl, initPlugins, initOptions): Artboard

Create a new artboard instance.

Parameters

providedRootEl

The root element.

Must be an element that creates a new stacking context (e.g. position: relative) when using the dom() plugin. When using canvas rendering, this should be the canvas.

HTMLElement | HTMLCanvasElement

initPlugins

ArtboardPluginDefinition[] = []

The plugins to initialise the artboard with.

Plugins can also be added afterwards using the artboard.addPlugin() method.

initOptions

ArtboardOptions = {}

The init options.

To update options after the artboard is initialised, use the artboard.setOption() and artboard.setOptions() methods.

Returns

Artboard

Defined in

artboard/createArtboard.ts:27