Skip to content

Reference ​

The reference gives the names, types and default values of the public API.

Parts of the reference ​

  • Configuration shows each section and field of the default schema.
  • API shows each exported function and type. TypeDoc makes these pages from the TSDoc comments in the source code.

Package entries ​

EntryContents
magic-cursor-wandcreateWand, the effects, the field builders, the draw presets and all shared types.
magic-cursor-wand/providersstaticProvider, localStorageProvider, httpProvider, eventSourceProvider and compositeProvider.
magic-cursor-wand/cursorcursorPlugin.
magic-cursor-wand/panelpanelPlugin and panelModel.
magic-cursor-wand/reactuseWand.
magic-cursor-wand/dist/magic-cursor-wand.iife.jsThe script build with the global MagicCursorWand.

Wand functions ​

FunctionResult
wand.readyA promise that resolves after all providers settle.
wand.getConfig()Returns the merged configuration.
wand.setConfig(patch)Merges the patch into the runtime layer.
wand.save(options)Saves the difference to a provider at once.
wand.reset()Removes the saved difference and clears the runtime layer.
wand.exportConfig()Returns the configuration as a document.
wand.importConfig(document)Reads a document into the runtime layer.
wand.on(type, handler)Adds a listener for config, error or ready.
wand.start() and wand.stop()Start and stop the frame loop.
wand.destroy()Removes the canvas, the listeners and the open requests.