VariaBoard

VariaBoard

new VariaBoard(config)

Create a VariaBoard control panel

Source:
Parameters:
Name Type Description
config object

Configuration object

Name Type Attributes Default Description
container object | string <optional>
document.body

DOM element or CSS selector

title string <optional>
"Control Panel"

Title of the panel

Requires:

Methods

addButton(config)

Add a button

Source:
Parameters:
Name Type Description
config object

Configuration object

Name Type Attributes Default Description
id object

ID slug

title object

Title text

callback object <optional>
() => {}

Callback function for button press

addRange(config)

Add a range control via Range

Source:
Parameters:
Name Type Description
config object

Configuration object

Name Type Description
id string

Unique id/slug

title string

UI display title

min number

Minimum value

max number

Maximum value

step number

Step size

default number

Starting value

randomizable boolean

Can be randomized individually and by randomizing all

mutable boolean

Can be mutated individually and by mutating all

locked boolean

Temporarily toggle whether the control is affected by randomization and mutation

createDOM()

Create necessary DOM elements

Source:

listen()

Setup event listeners

Source:

onWindowMousemove(e)

On window mouse move event

Source:
Parameters:
Name Type Description
e object

Event object

onWindowMouseup(e)

On window mouse up event

Source:
Parameters:
Name Type Description
e object

Event object

update()

Update based on requestAnimationFrame()

Source: