From d46aecb8ec694b0ac88acc333349e32496b95462 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Sat, 11 May 2024 22:40:52 +0800 Subject: [PATCH] Makefile --- dart_filament/Makefile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dart_filament/Makefile b/dart_filament/Makefile index abe5f59f..e97660fb 100644 --- a/dart_filament/Makefile +++ b/dart_filament/Makefile @@ -1,6 +1,10 @@ web: - cd native/web; rm -rf build && mkdir -p build && cd build && emcmake cmake .. && emmake make + cd native/web; mkdir -p build && cd build && emcmake cmake .. && emmake make +web-example-clean: + cd native/web && rm -rf build web-example: web + cp native/web/build/build/out/dart_filament* examples/web_wasm/bin + cd examples/web_wasm/bin && dart compile wasm example_web.dart web-bindings: dart --enable-experiment=native-assets run ffigen --config ffigen/swift.yaml swift-bindings: @@ -8,4 +12,18 @@ swift-bindings: shared-bindings: dart --enable-experiment=native-assets run ffigen --config ffigen/shared.yaml bindings: shared-bindings swift-bindings web-bindings + +# We compile a small set of custom materials for various helpers (background image, gizmo, etc) +# You must specify the `FILAMENT_PATH` environment variable, either the path /out/release +# eg: FILAMENT_PATH=/path/to/filament/out/release/bin make materials +# +materials: FORCE + @echo "Using Filament build from ${FILAMENT_PATH}" + ${FILAMENT_PATH}/matc -a opengl -a metal -o materials/image.filamat materials/image.mat + $(FILAMENT_PATH)/resgen -c -p image -x ios/include/material/ materials/image.filamat + $(FILAMENT_PATH)/matc -a opengl -a metal -o materials/gizmo.filamat materials/gizmo.mat + $(FILAMENT_PATH)/resgen -c -p gizmo -x ios/include/material/ materials/gizmo.filamat + #rm materials/*.filamat + +FORCE: ; \ No newline at end of file