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

Cesium throws an exception if accessor.min and max are missing for POSITION #3925

Closed
lasalvavida opened this issue May 17, 2016 · 2 comments
Closed

Comments

@lasalvavida
Copy link
Contributor

In glTF, accessor.min and accessor.max are optional properties.

If a model is missing these on an accessor that defines POSITION, Cesium throws:

DeveloperError: array is required
Error
at new DeveloperError (http://localhost:8080/Source/Core/DeveloperError.js:44:19)
at Function.Cartesian3.unpack (http://localhost:8080/Source/Core/Cartesian3.js:174:19)
at computeBoundingSphere (http://localhost:8080/Source/Scene/Model.js:1080:55)
at Model.update (http://localhost:8080/Source/Scene/Model.js:3286:36)
at PrimitiveCollection.update (http://localhost:8080/Source/Scene/PrimitiveCollection.js:366:27)
at updatePrimitives (http://localhost:8080/Source/Scene/Scene.js:1859:27)
at executeCommandsInViewport (http://localhost:8080/Source/Scene/Scene.js:1817:9)
at updateAndExecuteCommands (http://localhost:8080/Source/Scene/Scene.js:1716:17)
at render (http://localhost:8080/Source/Scene/Scene.js:2052:9)
at Scene.render (http://localhost:8080/Source/Scene/Scene.js:2090:13)

@pjcozzi
Copy link
Contributor

pjcozzi commented May 18, 2016

Good catch, thanks @lasalvavida. I am tempted to update the glTF 1.0.1 spec to say that min and max are required when the accessor is referenced from a POSITION (or require them always); otherwise, any implementation that uses bounding volumes (which is likely all non-trivial ones) has to have a fallback to explicitly compute it. I opened KhronosGroup/glTF#593 to discuss.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 1, 2016

The 2.0 spec will require accessor min and max. Leaving this open until the online converter supports this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants