nickandmiles / dat-gui

Automatically exported from code.google.com/p/dat-gui
0 stars 0 forks source link

Labels for values #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This is not actually an issue, but there is no place I could find that actually 
allowed suggestions so I posted here.

I can't seem to find a way to add a custom label to the add members, so I 
assume this is not possible (or at least used in any examples either). I use 
this to control shader uniforms and there I have to do this like this:
gui.add(WaterUniforms.shiny, 'value', -100, 100);
gui.add(WaterUniforms.spec, 'value', -5, 5);
gui.add(WaterUniforms.diff, 'value', -5, 5);
Which adds 3 controls to the GUI named "value" which is not very nice. I would 
like to do something like this:
gui.add('Reflectivity',WaterUniforms.shiny, 'value', -100, 100);
gui.add('Specularity',WaterUniforms.spec, 'value', -5, 5);
gui.add('Diffusion',WaterUniforms.diff, 'value', -5, 5);
I could of course wrap all the members inside an object and then use listeners 
to update the shader, but this suggestion would make this a lot easier.

Original issue reported on code.google.com by grinberg...@gmail.com on 2 Mar 2013 at 8:23

GoogleCodeExporter commented 8 years ago
there is .name('foo'), no?

Original comment by makc.the...@gmail.com on 29 Jan 2015 at 7:12