Skip to content

frontend: serve Draco decoder locally for offline 3D models - #4086

Open
Williangalvani wants to merge 1 commit into
bluerobotics:masterfrom
Williangalvani:fix_offline_draco_decoder
Open

frontend: serve Draco decoder locally for offline 3D models#4086
Williangalvani wants to merge 1 commit into
bluerobotics:masterfrom
Williangalvani:fix_offline_draco_decoder

Conversation

@Williangalvani

Copy link
Copy Markdown
Member

fix #3337
model-viewer defaults to a Google CDN for Draco; without internet the vehicle models never decode. Bundle three's decoder and point both model-viewer and OrientationPicker at it.

tested by connecting via hotspot

model-viewer defaults to a Google CDN for Draco; without internet the
vehicle models never decode. Bundle three's decoder and point both
model-viewer and OrientationPicker at it.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Automated PR Review

0. Summary

  • Verdict: LGTM :shipit:

Bundles the Draco decoder from three/examples/jsm/libs/draco/ and points both DRACOLoader (via a new makeGLTFLoader() helper in OrientationPicker.vue) and <model-viewer> (via globalThis.ModelViewerElement.dracoDecoderLocation) at the local copy, so 3D models decode without hitting Google's CDN. A new src/utils/draco.ts centralizes the decoder-path lookup, and vite.config.js routes those assets to an unhashed assets/draco/ directory that DRACOLoader.setDecoderPath() can resolve.

No further comments, nice job 👍

Generated by PR Review Bot. This is advisory, a human reviewer must still approve.

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.

3d models cannot be rendered when offline

1 participant