Image input plugin for Tweakpane.
npm i ayamflow/tweakpane-image-plugin
import {Pane} from 'tweakpane';
import * as ImagePlugin from 'tweakpane-image-plugin';
const pane = new Pane();
pane.registerPlugin(ImagePlugin);
const params = {
image: new Image(),
};
pane.addInput(params, 'image', {
extensions: '.jpg, .gif',
}).on('change', (ev) => {
console.log(ev.value);
});
- drag & drop
- non-image images (i.e. compressed textures for WebGL)