Filament: [Web] "Module is not defined"

Created on 20 Jun 2020  ·  4Comments  ·  Source: google/filament

Filament web v1.7.0

ReferenceError: Module is not defined
filament.js:638
ReferenceError: Module is not defined
filament.js:654

I'm completely new to WASM and Filament, but i figured, that line 6 in filament.js would be the wasm-loader, but minified. Looking into the end of that line, it seems like it returns Filament rather than Module - looking a bit into emscripten, i was able to figure out that changing "Module" to "Filament" on line 638 and 654, would resolve the issue, and i was _then able to load the sample succesfully with no erros in console!_ 🤠 ✅

Tried first with the original file from //unpkg as suggested by the tutorial - later downloaded the web version from releases v1.7.0 so i could change it.

Being new to Filament, and wanting to set up a production environment, i am worried if i'm doing something wrong, or if this is simply a bug. Please let me know 🙏

To Reproduce
Follow the guide on https://google.github.io/filament/webgl/tutorial_redball.html

Expected behavior
Expected to load redball.html demo with no errors in console.

Screenshots
Skærmbillede 2020-06-20 kl  11 26 11 PM

  • OS: macOS Catalina 10.15.2
  • GPU: Intel Iris Pro 1536 MB / Razor Core X EGPU AMD Radeon RX Vega 56
  • Backend: WebGL 2.0 / WASM

Thank you for this amazing engine!

bug web

All 4 comments

After changing Module to Filament on line 638 and 654, everything works fine, even suzanne:

Skærmbillede 2020-06-21 kl  12 27 23 AM

Thanks for the bug report, I'll see if I can repro. The live demos work right now, and I recently updated them. However they use a checked-in wasm file rather than unpkg. I will change that, it will help catch issues.

Amazing work, thank you for maintaining Filament 💯

Was this page helpful?
0 / 5 - 0 ratings