1.0.2 • Published 2 years ago

tweakpane-file-plugin v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Tweakpane image plugin

Image input plugin for Tweakpane.

Installation

npm i ayamflow/tweakpane-image-plugin

Usage

import {Pane} from 'tweakpane';
import * as FilePlugin from 'tweakpane-file-plugin';

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

const params = {
  image: new Image(),
};

pane.addInput(params, 'image', {
  extensions: '.jpg, .gif',
  view: "file",
}).on('change', (ev) => {
  console.log(ev.value);
});

Possible roadmap

  • drag & drop
  • non-image images (i.e. compressed textures for WebGL)