ayamflow / tweakpane-image-plugin

An image input plugin for tweakpane

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tweakpane image plugin

Image input plugin for Tweakpane.

Installation

npm i ayamflow/tweakpane-image-plugin

Usage

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

Possible roadmap

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

About

An image input plugin for tweakpane

License:MIT License


Languages

Language:JavaScript 45.0%Language:TypeScript 42.1%Language:HTML 7.9%Language:SCSS 4.9%