wearekuva/oui

For control property, if it is a string, treat it as the mapping id

Closed this issue · 1 comments

For example:
gui.add( settings, 'color', {control: oui.controls.ColorPicker});

It seems more user friendly to accept string like:
gui.add( settings, 'color', {control: 'ColorPicker'});

If it is a string, it will look for the reference of oui.controls['ColorPicker']

Using a reference means you can use custom controllers, such as gui.add( settings, 'color', {control: MyAwesomeColorPicker}). Also, I'm not sure it's a good idea having dual type (string|object) parameters.

The ES6 notation has a @color() shorthand annotation, so maybe something similar for datoui would be more appropriate. Something like gui.color( prop, propName )