tweakpane-json-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.5.4 • Public • Published

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);
});

Package Sidebar

Install

npm i tweakpane-json-plugin

Weekly Downloads

15

Version

0.5.4

License

UNLICENSED

Unpacked Size

1.76 MB

Total Files

9

Last publish

Collaborators

  • jorban