Tweakpane

Events

Use on() of specific property to listen its changes.

'change' event will be called continuously when the user controls a slider.

var pane = new Tweakpane();
pane.addSlider(target, 'speed', {min: 0, max: 100}).on(
  'change',
  function(value) {
    console.log(value);
  }
);

Global event

If you want to listen changes of all properties, use on() of the root object.

var pane = new Tweakpane();
pane.addSlider(target, 'power', {min: 0, max: 100});
pane.addSlider(target, 'size', {min: 0, max: 100});
pane.on(
  'change',
  function(value, property) {
    console.log(property.getLabel());
    console.log(value);
  }
);