Repository navigation
Conversation
Contributor
|
Thank you for the pull request, @jjhembd! ✅ We can confirm we have a CLA on file for you. |
jjhembd
force-pushed
the
gltf-types
branch
2 times, most recently
from
November 30, 2026 23:28
d2e7a46 to
86abe90
Compare
jjhembd
force-pushed
the
gltf-types
branch
3 times, most recently
from
December 1, 2026 15:00
583e605 to
568043c
Compare
This was referenced Dec 2, 2026
6 of 8 tasks
jjhembd
marked this pull request as ready for review
December 4, 2026 15:00
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review reports no active issues with the glTF type-checking changes.
No open issues 🎉
What changed in this PR
Enables workspace-wide type checking for glTF processing using generated schema types, advancing #13949 while preserving glTF 1.0 support before conversion.
Changes:
- Enables
checkJsand removes redundant per-file directives. - Replaces generic object annotations with schema types and adds private buffer and color types.
- Documents conversion helpers and clarifies
getMagicdocumentation.
| File | Description |
|---|---|
| packages/gltf/tsconfig.json | Enables JavaScript type checking. |
| packages/gltf/Source/usesExtension.js | Types both supported glTF versions. |
| packages/gltf/Source/updateVersion.js | Types conversion boundaries and helpers. |
| packages/gltf/Source/updateAccessorComponentTypes.js | Types accessor conversion helpers. |
| packages/gltf/Source/Rgba.ts | Adds a private color tuple type. |
| packages/gltf/Source/removePipelineExtras.js | Types pipeline extras removal. |
| packages/gltf/Source/removeExtensionsUsed.js | Types the glTF parameter. |
| packages/gltf/Source/removeExtensionsRequired.js | Types the glTF parameter. |
| packages/gltf/Source/removeExtension.js | Types extension removal and traversal. |
| packages/gltf/Source/readAccessorPacked.js | Types accessor data and pipeline buffers. |
| packages/gltf/Source/PipelineBuffer.ts | Defines pipeline buffer extras. |
| packages/gltf/Source/parseGlb.js | Types parsed assets and parsing helpers. |
| packages/gltf/Source/numberOfComponentsForType.js | Removes redundant checking directive. |
| packages/gltf/Source/getNodeTransform.js | Uses the generated node type. |
| packages/gltf/Source/getComponentReader.js | Removes redundant checking directive. |
| packages/gltf/Source/getAccessorByteStride.js | Types accessor stride inputs. |
| packages/gltf/Source/forEachBuffer.js | Types inputs for both glTF versions. |
| packages/gltf/Source/ForEach.js | Removes redundant checking directive. |
| packages/gltf/Source/findAccessorMinMax.js | Types accessor bounds and buffer access. |
| packages/gltf/Source/constructBoundingVolumeJson.js | Types bounding volumes and shape helpers. |
| packages/gltf/Source/addToArray.js | Removes redundant checking directive. |
| packages/gltf/Source/addPipelineExtras.js | Types dual-version inputs and extras initialization. |
| packages/gltf/Source/addExtensionsUsed.js | Types the glTF parameter. |
| packages/gltf/Source/addDefaults.js | Types assets and defaulting helpers. |
| packages/gltf/Source/addBuffer.js | Types the glTF parameter. |
| packages/gltf/index.js | Removes redundant checking directive. |
| packages/core/Source/getMagic.js | Clarifies function and parameter documentation. |
Review effort: Balanced
jjhembd
force-pushed
the
gltf-types
branch
3 times, most recently
from
December 4, 2026 18:44
beb33da to
e397c1f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR turns on type checking for every file in
packages/gltf/Source, typing the glTF JSON with the generated glTF types.Code changes
packages/gltf/tsconfig.jsonsetscheckJs, so the// @ts-checklines are removed.{object}glTF parameters and returns are nowGltf2, or a nested type such asGltf2.Accessor, imported with/** @import { Gltf2 } from "../SchemaTypes/index.js"; */.GltfJsonLoadercalls beforeupdateVersionhandle glTF 1.0 too, soaddPipelineExtras,forEachBuffer, andusesExtensiontakeGltf1 | Gltf2, andaddPipelineExtrasandparseGlbreturn it.updateVersiontakesGltf1 | Gltf2and returnsGltf2.updateVersion.js, the helpers that upgrade the asset in place work on data that matches no single glTF version, so theirgltfparameters are typed{any}. The next PR in the stack replaces them with typed conversions.PipelineBuffer, a glTF buffer with theextras._pipeline.sourcethataddPipelineExtras,parseGlb, andaddBufferadd; andRgba, a 4-number tuple, which the docs build can't parse in a JSDoc tag.@private, andgetMagicin@cesium/coregets parameter descriptions.In the generated
packages/gltf/index.d.ts, only parameter and return types change. They are@internal, so this PR needs noCHANGES.mdentry.Issue number and link
Part of #13949.
Testing plan
npm run tsc -w @cesium/gltf,npm run eslint, andnpm run sg-scanshould pass.npm run test -w @cesium/gltfandnpm run test -- --includeName Scene/Gltfshould pass.npx jsdoc --configure Tools/jsdoc/conf.json --pedanticshould print no errors.npm run build-ts,Source/Cesium.d.tsshould be unchanged.Author checklist
CONTRIBUTORS.mdCHANGES.mdwith a short summary of my changeAI acknowledgment
If yes, I used the following Tools(s) and/or Service(s): GitHub Copilot
If yes, I used the following Model(s): Claude Opus 5.5