feat(gltf): reference-grade asset lifecycle, shared resources, and complete API docs - #2992
Draft
ibgreen-openai wants to merge 4 commits into
Draft
feat(gltf): reference-grade asset lifecycle, shared resources, and complete API docs#2992ibgreen-openai wants to merge 4 commits into
ibgreen-openai wants to merge 4 commits into
Conversation
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.
Goals
Make
@luma.gl/gltfa reference-quality, explicitly owned asset runtime instead of repeatedly uploading source images and leaving scenegraph GPU resources alive after assets are replaced.Keep loading in loaders.gl, glTF interpretation in
@luma.gl/gltf, generic scenegraph primitives in@luma.gl/engine, shading in@luma.gl/shadertools, and ANARI as a thin retained facade.Changes
Deterministic asset lifetime and shared GPU resources
GLTFAssetResourceCache, scoped to its creating device and keyed by source image identity, canonical sampler state, source color space, and color/data interpretation.GLTFScenegraphs.destroy()/dispose()to release unique models, materials, hidden scenegraph nodes, detached source-mesh templates, generated textures, and all four GPU-instance attribute buffers exactly once.ParseGLTFOptions.resourceCachesharing with deferred destruction andtextureCount,materialCount, andreferenceCountdiagnostics.ParseGLTFOptionstype.Accurate reference documentation
Verification
node_modules/.bin/tspc -b modules/anari/tsconfig.json --force --pretty false— passed, including strict glTF, engine, effects, experimental, and shader project references.git diff --checkpass.yarn lint fix/yarn buildwrappers cannot run against this workstation’s pre-existing outdated@vis.gl/dev-toolsinstallation (ocular-lint/ocular-cleanmissing); equivalent direct Biome and complete referenced TypeScript build both passed. Existing PushPatrol pre-push protection was preserved.Architecture / Ownership
This PR targets
masterdirectly and does not depend on another unmerged branch. The cache and lifecycle remain format-owned; no loader, BRDF, animation mixer, high-level renderer, or independent ANARI material implementation is introduced.