2.0.0 • Published 3 months ago

@pangenerator/tweakpane-textarea-plugin v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Textarea plugin for Tweakpane

Version

Simple textarea (multiline text input) plugin for Tweakpane.\ image

Installation

NPM

npm i @pangenerator/tweakpane-textarea-plugin

Browser

<script src="tweakpane.min.js"></script>
<script src="tweakpane-textarea-plugin.min.js"></script>
<script>
  const pane = new Tweakpane.Pane();
  pane.registerPlugin(TweakpaneTextareaPlugin);
</script>

Package

import {Pane} from 'tweakpane';
import * as TextareaPlugin from '@pangenerator/tweakpane-textarea-plugin';

const pane = new Pane();
pane.registerPlugin(TextareaPlugin);

Usage

const params = {
  prop: 'Put your\nmultiline\ntext here!'
};

pane.addBinding(params, 'prop', {
  view: 'textarea',
  rows: 6,
  placeholder: 'Type here...'
}).on('change', (ev) => {
  console.log(ev.value);
});