-
Notifications
You must be signed in to change notification settings - Fork 41
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
BooleanController.setValue does not coerce non-boolean values #133
Comments
Got it—so you're expecting setValue to convert that parameter to a true/false value before actually assigning the property? Curious which 3D library you're using. And after you do this, the value of |
I'm using Three.js. I think converting would be the best solution, an alternative might be to throw an error when not providing true of false instead of having the checkbox checked in the GUI. In my case, "cube.wireframe" was checked as being enabled in the GUI, but it was not actually enabled. |
Thanks—let me think on this a little. None of the other controllers do any validating/converting. Right now I like how |
No worries, it's not a big deal to me, just felt like a small "bug" worth letting you know about. Thanks for considering! |
When I add a checkbox for a property that can be either true or false, like the wireframe, everything works when using
setValue(true)
orsetValue(false)
. When I usesetValue(1)
however, the debug panel shows the checkbox checked, but it doesn't apply the right value to the property. In the case of the wireframe, it still shows all the faces.The text was updated successfully, but these errors were encountered: