[email protected] bundles outdated [email protected], causing LuminanceFormat SyntaxError with current Three.js

オープン
#5,191 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
three.js, typescript

調査の方向性

まず model-viewer-effects のビルド設定と配布されている .min.js ファイルを特定し、次に postprocessing@^6.37.1 がどのようにバンドルされているかを調査します。postprocessing@>=6.37.3 で再ビルドし、three@^0.183.0 を使用する公式の postprocessing セットアップで LuminanceFormat SyntaxError が発生しなくなったことを確認します。完了条件には修正済みパッケージの再公開も含まれます。

索引モデルが issue の本文から書いたものです。

説明

@google/[email protected] 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/[email protected]. 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.

主要言語
TypeScript
スター
8.4k
フォーク
964
平均マージ
5日 11時間
マージ済み PR(30日)
8

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google/model-viewer のほかの issue

google/model-viewer の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。