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

0.1.0 • Public • Published

Tweakpane Graph Plugin

Graph plugin for Tweakpane. Similar to the built-in graph monitor but with auto-scaling, and min/max/last values displayed as well.

Preview

Installation

Browser

<script type="module">
    import { Pane } as Tweakpane from 'https://cdn.jsdelivr.net/npm/tweakpane@4.0.1/dist/tweakpane.min.js';
    import * as TweakpaneGraphPlugin from './tweakpane-plugin-graph.min.js';
    const pane = new Pane();
    pane.registerPlugin(TweakpaneGraphPlugin);
</script>

Package

import { Pane } from 'tweakpane';
import * as TweakpaneGraphPlugin from 'tweakpane-plugin-graph';
const pane = new Pane();
pane.registerPlugin(TweakpaneGraphPlugin);

Usage

const params = {
    val: 0.0,
};
setInterval(() => {
    params.val = Math.random() * 2.0 - 1.0;
}, 100);

const pane = new Pane();
pane.addBinding(params, 'val', { view: 'graph2', readonly: true });
window.pane = pane;

Readme

Keywords

none

Package Sidebar

Install

npm i tweakpane-plugin-graph

Weekly Downloads

4

Version

0.1.0

License

MIT

Unpacked Size

342 kB

Total Files

9

Last publish

Collaborators

  • petrbroz