-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
NumberController Step not working properly #48
Comments
Having this problem also. Value is a float but the number in the GUI is always displayed as an int. |
updated the build to 0.5.1 with latest from master. https://github.com/dataarts/dat.gui/releases |
This did not completely fix it for me. If I have a float slider that starts out with an integer value, I still get this problem. Works fine if the initial value is non-integer. Does the fix here work for everyone else? I.e. float slider that starts out with integer initial value? I did find a work-around:
I.e. I start with: |
I still see this issue. You can use my code for resolving of problem.
Next, add a controller into gui. For example:
|
Another way of resolving of issue is debug of dat.GUI. See my Now you can set step = 0 to gui controller. For example:
Note: Plaese do not use gui.add( object, 'min').step( 0 ). Currently I have made pull request. Please write a comments to my pull request if you want to see my code in next dat.GUI release. |
See details about issue in dataarts#48 (comment)
No matter what I do, I can't get decimals to show up in a number controller. I pass in something like 106.108383382 and I always get 106 no matter what.
I've been digging through the source and can't figure out how or why the parameters for step are being lost...
var gui = new dat.GUI({autoPlace: true});
gui .add(data, 'length').step(0.25);
I have also tried making the step: (999.999, 0.999, 999.000) and nothing seems to affect how it functions at all...even though the source says it should modify precision.
However the issue seems to be in the factory:
return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3] });
Where it doesn't seem to care about any properties except for min and max.
The text was updated successfully, but these errors were encountered: