new GUI(template)
Parameters:
Name | Type | Description |
---|---|---|
template | Object | A set of name/object pairs, one per UI element |
Example
const gui = new GUI ({
opacity: {
slider: [canvas.opacity, [0, 1, 0.1]],
cmd: val => canvas.setOpacity(val),
},
download: {
button: () => util.downloadBlob(data, 'data.json', false),
},
...
})