tweakpane-json-plugin
v0.5.4
Published
JSON Plugin for Tweakpane
Downloads
98
Readme
Tweakpane JSON extention
Plugin template of an input binding for Tweakpane.
Usage
Browser
<script type="module">
import {Pane} as Tweakpane from 'tweakpane';
import * as JsonPlugin from 'tweakpane-json-plugin';
const pane = new Pane();
pane.registerPlugin(JsonPlugin);
</script>
Package
import {Pane} from 'tweakpane';
import * as JsonPlugin from 'tweakpane-json-plugin';
const pane = new Pane();
pane.registerPlugin(JsonPlugin);
Usage
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);
});