-
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
Clarification on min/max float precision #628
Conversation
Maybe we should also add backwards requirement: a json-stored float string must be equal to the decimal gotten from buffer data:
|
Thanks @lexaknyazev! Can you also update the accessor's schema file to keep the schema and spec in-sync? The original spec was actually generated from the schema using https://github.com/AnalyticalGraphicsInc/wetzel.
Maybe, can you provide the context and use case for this? |
Let's say we have JavaScript treats all numbers as doubles. When js-based processing tool (such as gltfPipeline) extracts such value from Float32Array it will get |
So basically this enforces that exporters need to export the double-precision value for |
I think that there are two ways to resolve this:
|
Sounds good. Before merging this, can you:
|
The question remains: should spec enforce two-way match of values or not? The burden will be on exporters or on clients. |
Yes, I think this is fine. Do you agree? However, we need to put the burden on exporters; otherwise, clients will always require the workaround. |
Yes. I'll update this PR asap. |
Is it OK now? |
Looks good, thanks @lexaknyazev! |
Clarification on min/max float precision
I've put it in accessor's definitions, because it's the only case of direct comparison between buffer-stored and json-stored floats.