Skip to content
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

Customizable precision #141

Closed
verekia opened this issue Oct 3, 2023 · 2 comments
Closed

Customizable precision #141

verekia opened this issue Oct 3, 2023 · 2 comments
Labels
Chore New feature New feature or request

Comments

@verekia
Copy link
Collaborator

verekia commented Oct 3, 2023

Allow the user to specify a number of decimals for values such as position, rotation, scale.

53.4 instead of 53.42065590695798 for instance

Rounding the number when the gizmos are released would probably work fine.

@itsdouges
Copy link
Collaborator

Yeah I've been thinking about this. I think the precision is too high right now because it leads to floating point errors. What do you think would be a sensible default, and how would you think limiting the precision would be?

Btw you can change the precision when interacting/dragging with the number input and holding shift/ctrl :-)

@verekia
Copy link
Collaborator Author

verekia commented Oct 3, 2023

I would go as far as letting the user have 0 decimals, which would be very useful to limit positions to a grid of 1 unit per cell.

In my game, I use 1 decimal max to keep the JSX clean as I don't need more precision. Maybe a sensible default could be something between 2 and 4 decimals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore New feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants