Skip to content

Improvements for GLTF loading and scene registry#190

Open
korvixhq wants to merge 6 commits intopascalorg:mainfrom
korvixhq:chore/fps-drops
Open

Improvements for GLTF loading and scene registry#190
korvixhq wants to merge 6 commits intopascalorg:mainfrom
korvixhq:chore/fps-drops

Conversation

@korvixhq
Copy link

What does this PR do?

Performance improvements for GLTF loading and scene registry:

  • Added useCachedGLTF hook that caches loaded GLTFs by URL, eliminating redundant network requests when multiple items use the same asset.
  • Removed redundant scene.traverse() call per item mount (previously ran once per item even with identical assets)
  • Fixed registry cleanup null check for edge cases

How to test

  1. Open network tab and load a scene with multiple items of the same type (e.g., 10+ identical chairs)
  2. Verify only 1 network request is made per unique GLTF asset
  3. Place, move, and delete items to ensure no crashes or visual glitches occur with the cached GLTF and registry cleanup

Screenshots / recordings

n/a

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

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