-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
GLTFExporter: Add support for signed data types. #25297
GLTFExporter: Add support for signed data types. #25297
Conversation
Related: #20762 |
Thanks @spearwolf!
I think we'll need to detect when these types are used, and add the |
Yeah, #20762 was closed since |
ok, I added a simple check that adds the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple bits of feedback, but would love to get this merged in soon – thank you!
…ness and readability
@donmccurdy so have your feeback implemented - hope it fits so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Tested with #25354.
Fixed #20474
Fixed #25310
Description
Within the GLTFExporter only the buffer attributes types
float
,uint
,ushort
andubyte
are supported.All other types cancel the export with an error:
An error happened during parsing Error: THREE.GLTFExporter: Unsupported bufferAttribute component type.
What is missing are the signed data types:
byte
,short
andint
. These are also valid data types according to the KHR_mesh_quantization extension.With this fix the signed data types are now also supported in the GLTFExporter.
This will allow the export of meshes that have already been quantized (e.g. with tools like gltf-transform):