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

Aperta
#2,008 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@bkaradzic-microsoft ci sta già lavorando.

Dal 3/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
C++
Stelle
931
Fork
169
Merge medio
2g 17h
PR unite (30g)
66

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di BabylonJS/BabylonNative

Tutte le issue di BabylonJS/BabylonNative

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.