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

glTF index export options #112

Merged
merged 5 commits into from
Jan 24, 2025

Conversation

Carifio24
Copy link
Member

We're already using shorts for indices that fit in 2 bytes, but there are definitely cases where all of the indices for a given accessor could fit within 1 byte (if they're <= 255). This PR updates our export methods to put indices into buffers as bytes when appropriate.

To help facilitate this, we create a GLTFIndexExportOption enum, each of which contains a binary format character, glTF component type, and maximum value. We then use these export option values for relevant glTF utility methods.

@Carifio24 Carifio24 added enhancement New feature or request glTF Related to export of glTF/glB files labels Jan 24, 2025
@Carifio24 Carifio24 merged commit 1c98d36 into glue-viz:master Jan 24, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request glTF Related to export of glTF/glB files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant