Plugin template of an input binding for Tweakpane.
<script type="module">
import {Pane} as Tweakpane from 'tweakpane';
import * as JsonPlugin from 'tweakpane-json-plugin';
const pane = new Pane();
pane.registerPlugin(JsonPlugin);
</script>
import {Pane} from 'tweakpane';
import * as JsonPlugin from 'tweakpane-json-plugin';
const pane = new Pane();
pane.registerPlugin(JsonPlugin);
const params = {
prop: {
a: 1,
b: false,
c: ["hello", "world!"]
}
};
// TODO: Update parameters for your plugin
pane.addBinding(params, 'prop', {
view: 'json',
}).on('change', (ev) => {
console.log(ev.value);
});