Validation workaround `es-module-import`: no ES module loading in Babylon Native

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

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

@bkaradzic-microsoft がすでに取り組んでいます。

2026年11月3日 から。

評価

この issue はまだ評価されていません。

説明

Affected tests (4)

  • Gaussian Splatting SPZ SH
  • SPZ v3 - Splat
  • CSGVertColor
  • CSG

What the workaround does

Shims Tools.LoadScript(url, ..., useModule=true) / dynamic import() because BN has no ES module loader (_LoadScriptModuleAsync in Babylon.js tools.internals.ts). Used by SPZ (Gaussian splatting decoder) and CSG2 (Manifold). Introduced in #1959. Note: the SPZ tests are additionally excluded on JavaScriptCore (decoder load hangs).

Recommended fix

Preferred: Babylon.js falls back to a classic/UMD script (or fetch + evaluate) when running on NativeEngine, the same way other loaders handle native. Alternative: move the shim from the test harness into a BN polyfill (or JsRuntimeHost) so apps get it too. Investigate the JSC hang separately (likely the async WebAssembly instantiate issue, see Havok fix in #1995).


Workaround implementations live in Apps/Playground/Scripts/validation_native.js (WORKAROUNDS map); tests opt in via the workarounds array in Apps/Playground/Scripts/config.json. See Documentation/AddingNewValidationTests.md.

主要言語
C++
スター
931
フォーク
169
平均マージ
2日 17時間
マージ済み PR(30日)
66

環境構築

はじめの一歩

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

BabylonJS/BabylonNative のほかの issue

BabylonJS/BabylonNative の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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