summaryrefslogtreecommitdiff
path: root/3d/rigidbody/build.sh
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-06-17 20:02:20 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-06-17 20:02:20 -0400
commit4079e69fe4107d2a50b122dbd58710bbeb10ace2 (patch)
tree2ea0bb6857ad913e54974eb380b3612709559615 /3d/rigidbody/build.sh
parent19b0a3cafe144e8e77974bb0c9c63141a812e30d (diff)
(WIP) Getting started in 3d land
Diffstat (limited to '3d/rigidbody/build.sh')
-rwxr-xr-x3d/rigidbody/build.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/3d/rigidbody/build.sh b/3d/rigidbody/build.sh
new file mode 100755
index 0000000..85f1340
--- /dev/null
+++ b/3d/rigidbody/build.sh
@@ -0,0 +1,16 @@
+filepaths=""
+
+for file in ../../shared_cpp/*; do
+ if [ -f "$file" ]; then
+ if [[ "$file" == *.cpp ]]; then
+ filepaths+=" $file"
+ fi
+ fi
+done
+
+if [ ! -d ./dist ]; then
+ mkdir ./dist
+fi
+
+echo "$filepaths"
+emcc -o dist/output.js main.cpp $filepaths -s ALLOW_MEMORY_GROWTH=1 -s USE_WEBGL2=1 -s FULL_ES3=1 -s WASM=1 -s NO_EXIT_RUNTIME=1