attoken / dat-gui

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

Callback params #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi there,

Firstly - awesome job on this tool, I really love it! Secondly, this is not an 
issue, but rather a feature request.

FEATURE REQUEST:

I would like to be able to add arguments to the onChange and onFinishChange 
callback functions so that I can reduce the amount of code I need to write in 
order to manipulate my objects via 'multi-argument methods' rather than 
properties. More specifically, I have a '3D' object with 3 methods:

translate(x, y, z)
rotate(x, y, z)
scale(x, y, z)

...there is some internal logic within these methods that requires that the 
object is manipulated using them rather than modifying x, y, z, rotationX, Y, 
Z, scaleX, Y, Z directly.

Currently, I have a 'slave' object with these 9 properties on it, which I am 
passing to dat-gui and then calling the respective methods on my '3D' object 
from within the onChange callback.

It would be awesome if you could add the ability to pass additional arguments 
to the onChange and onFinishChange callbacks so that in cases like mine, more 
elegant logic could be performed inside of the callback using these arguments.

My apologies if this should have been posted somewhere else, but I am not 
familiar with the process for feature requests on Google Code.

Many thanks in advance,

Matthew Wagerfield

Original issue reported on code.google.com by mattheww...@gmail.com on 12 May 2012 at 7:52