Web
Web support is still experimental and currently requires you to manually compile Thermion to WASM first.
To run from Flutter:
flutter run -d chrome --web-header=Cross-Origin-Opener-Policy=same-origin --web-header=Cross-Origin-Embedder-Policy=require-corpRequirements:
- GNU Make
- CMake
- Emscripten
From the project root directory
thermion % ls -ltotal 272drwxr-xr-x 4 nickfisher staff 128 Jul 3 14:06 assets-rw-r--r-- 1 nickfisher staff 84532 Jul 3 14:06 CHANGELOG.md-rw-r--r-- 1 nickfisher staff 2349 Jul 3 14:06 Dockerfiledrwxr-xr-x 19 nickfisher staff 608 Jul 3 14:06 docs-rw-r--r-- 1 nickfisher staff 748 Jul 3 14:06 docs.jsondrwxr-xr-x 7 nickfisher staff 224 Jan 8 17:01 examples-rw-r--r-- 1 nickfisher staff 11341 Oct 23 2024 LICENSE-rw-r--r-- 1 nickfisher staff 2161 Jul 3 14:06 Makefiledrwxr-xr-x@ 13 nickfisher staff 416 Jul 3 14:06 materials-rw-r--r--@ 1 nickfisher staff 517 Oct 23 2024 melos_thermion_workspace.iml-rw-r--r-- 1 nickfisher staff 77 Oct 23 2024 melos.yaml-rw-r--r--@ 1 nickfisher staff 9865 Jul 1 13:03 pubspec.lock-rw-r--r-- 1 nickfisher staff 97 Jun 12 11:38 pubspec.yaml-rw-r--r-- 1 nickfisher staff 3355 Jul 3 14:06 README.mddrwxr-xr-x@ 22 nickfisher staff 704 Jul 3 14:06 thermion_dartdrwxr-xr-x 7 nickfisher staff 224 Jul 3 14:06 thermion_flutterthermion % make wasmFlutter
Section titled “Flutter”Copy thermion_dart.js and thermion_dart.wasm to the /web folder for your target app.
flutter run -d chrome --web-header Cross-Origin-Embedder-Policy=require-corp --web-header Cross-Origin-Opener-Policy=same-originLive examples
Section titled “Live examples”The examples below run live in the browser, compiled from Dart to WebAssembly. Each is an interactive composite scene — drag to orbit, scroll to zoom. (The demos open in a new tab if the embed does not load.)
Only one demo runs at a time. Starting another demo releases the previous WebAssembly renderer before creating the next one.
Browse the gallery and switch scenes from the dropdown: thermion-examples.pages.dev.