On this page

# GUI

### new GUI(template)

Parameters:

Name | Type | Description
--- | --- | ---
`template` | Object | A set of name/object pairs, one per UI element

Source
  - GUI.js, line 15

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),
        },
        ...
    })

Type anything to view search result