visgl / visgl/deck.gl

[Bug] ScenegraphLayer: load quantized glb

Open
#9,213 4 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Description

I have a quantized model in glb-file. ScenegraphLayer from deck.gl v 9.0.33 cannot load quantized glb-file. But deck.gl v 8.8.2 do it without any problems. Simple app that demonstrates the problem: glb-loader

Flavors
  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS
Expected Behavior

loading quantized glb

Steps to Reproduce
  1. unpack archive
  2. npm install
  3. npm start
  4. localhost:3001
Environment
  • Framework version: deckgl@9.0.33
  • Browser: Chrome, FireFox
  • OS: Ubuntu 22.04
  • React: v18.18.2
Logs
deck: update of ScenegraphLayer({id: 'test'}): size: 3 Error: size: 3
    at getVertexFormatFromAttribute (vertex-format-from-attribute.js:69:1)
    at getAttributeBuffersFromGeometry (gpu-geometry.js:86:1)
    at makeGPUGeometry (gpu-geometry.js:48:1)
    at Model.setGeometry (model.js:293:1)
    at new Model (model.js:153:1)
    at createGLTFModel (create-gltf-model.js:96:1)
    at GLTFInstantiator.createPrimitive (gltf-instantiator.js:95:1)
    at gltf-instantiator.js:80:1
    at Array.map (<anonymous>)
    at GLTFInstantiator.createMesh (gltf-instantiator.js:80:1)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided reproduction and follow the stack trace through vertex-format-from-attribute.js, gpu-geometry.js, model.js, create-gltf-model.js, and gltf-instantiator.js. Compare the quantized GLB behavior between deck.gl 9.0.33 and 8.8.2, then verify that the React ScenegraphLayer example loads the quantized GLB without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.