google / google/model-viewer

model-viewer-effects@1.5.0 bundles outdated postprocessing@6.37.1, causing LuminanceFormat SyntaxError with current Three.js

Open
#5,191 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8.2k
Forks
947
PR merge metrics
No merged PRs in 30d

Description

@google/model-viewer-effects@1.5.0 fails to load with recent Three.js versions:

Uncaught SyntaxError: The requested module 'three' does not provide an export named 'LuminanceFormat' (at model-viewer-effects.min.js:1:796)

Root cause: model-viewer-effects bundles postprocessing@^6.37.1 directly into its distributed file. LuminanceFormat was removed from Three.js's exports, and postprocessing fixed this exact issue in v6.37.3 ("Remove use of LuminanceFormat for r176 support", PR #702). Since model-viewer-effects bundles postprocessing at build time rather than resolving it live, updating the consuming project's Three.js version doesn't help — the outdated, broken code is baked into the shipped .min.js file itself.

To reproduce: Follow the official setup at https://modelviewer.dev/examples/postprocessing/ using three@^0.183.0 (or any Three.js version without LuminanceFormat) with @google/model-viewer-effects@1.5.0. Confirmed reproducible with zero CDN involvement — self-hosting all three libraries locally (downloaded directly from the npm registry) produces the identical error, ruling out any CDN/caching explanation.

Ask: Please rebuild and republish model-viewer-effects against postprocessing@>=6.37.3 (or later) to pick up the fix.

Contributor guide

Open the contributing guide

Research direction

Start by locating the model-viewer-effects build configuration and its distributed .min.js file, then inspect how postprocessing@^6.37.1 is bundled. Rebuild with postprocessing@>=6.37.3 and verify the official postprocessing setup using three@^0.183.0 no longer raises the LuminanceFormat SyntaxError; done includes republishing the fixed package.

Written by the indexing model from the issue text.

Assessment

Tech stack
three.js, typescript
Domain
build-system, frontend, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.