Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First argument of change event handler for color property is useless #44

Closed
cocopon opened this issue May 15, 2020 · 0 comments
Closed

Comments

@cocopon
Copy link
Owner

cocopon commented May 15, 2020

const pane = new Tweakpane();
const params = {
  color: '#000',
};

pane.addInput(params, 'color').on('change', (firstArg) => {
  console.log(firstArg);
});

Console:

{
  comps_: [0, 32.35294117647059, 56.25],
  emitter: {
    observers_: { ... }
  },
  mode_: "hsv"
}

Currently firstArg is an instance of internal Color class and it's not useful in any case. It should be the property value itself or an instance of some useful class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant