Skip to content

feat: define typescript interfaces for gltf accessor sparse property …#5174

Merged
diegoteran merged 1 commit into
google:masterfrom
charanrajkandula-opensource:feat/accessor-sparse-types
Jun 18, 2026
Merged

feat: define typescript interfaces for gltf accessor sparse property …#5174
diegoteran merged 1 commit into
google:masterfrom
charanrajkandula-opensource:feat/accessor-sparse-types

Conversation

@rajkandula

Copy link
Copy Markdown
Contributor

Description

This PR replaces the any type on the sparse property of the Accessor interface in gltf-2.0.ts with structured, type-safe interfaces based on the official glTF 2.0 specification.

It defines:

  • AccessorSparse
  • AccessorSparseIndices
  • AccessorSparseValues

This resolves the pending TODO: What is this? comment in the codebase.

Reference Issue

None (resolves a pending inline TODO comment).

Testing

  • Verified successful workspace builds using npm run build.
  • Ran the test suite via npm run test:ci with all tests passing:
    • @google/model-viewer: 393 passed, 0 failed
    • @google/model-viewer-effects: 13 passed, 0 failed
    • @google/model-viewer-space-opera: 99 passed, 0 failed

@diegoteran diegoteran left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@diegoteran diegoteran merged commit 1cea201 into google:master Jun 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants