From dcfa090c9e99bf8d3bad98e0f6cdb431b219b977 Mon Sep 17 00:00:00 2001 From: adaxiik Date: Thu, 8 Feb 2024 22:35:31 +0100 Subject: [PATCH 1/4] ported shapes_colors_palette example --- build.sh | 4 +++- index.html | 11 +++++----- raylib.js | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 68 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index a194d6b..bb1e27f 100755 --- a/build.sh +++ b/build.sh @@ -7,9 +7,11 @@ mkdir -p build/ clang -I./include/ -o build/core_basic_window ./examples/core_basic_window.c -L./lib/ -lraylib -lm clang -I./include/ -o build/core_basic_screen_manager ./examples/core_basic_screen_manager.c -L./lib/ -lraylib -lm clang -I./include/ -o build/core_input_keys ./examples/core_input_keys.c -L./lib/ -lraylib -lm -clang -I./include/ -o build/game ./game.c -L./lib/ -lraylib -lm +clang -I./include/ -o build/core_input_keys ./examples/core_input_keys.c -L./lib/ -lraylib -lm +clang -I./include/ -o build/shapes_colors_palette ./examples/shapes_colors_palette.c -L./lib/ -lraylib -lm clang --target=wasm32 -I./include --no-standard-libraries -Wl,--export-table -Wl,--no-entry -Wl,--allow-undefined -Wl,--export=main -o wasm/core_basic_window.wasm ./examples/core_basic_window.c -DPLATFORM_WEB clang --target=wasm32 -I./include --no-standard-libraries -Wl,--export-table -Wl,--no-entry -Wl,--allow-undefined -Wl,--export=main -o wasm/core_basic_screen_manager.wasm ./examples/core_basic_screen_manager.c -DPLATFORM_WEB clang --target=wasm32 -I./include --no-standard-libraries -Wl,--export-table -Wl,--no-entry -Wl,--allow-undefined -Wl,--export=main -o wasm/core_input_keys.wasm ./examples/core_input_keys.c -DPLATFORM_WEB +clang --target=wasm32 -I./include --no-standard-libraries -Wl,--export-table -Wl,--no-entry -Wl,--allow-undefined -Wl,--export=main -o wasm/shapes_colors_palette.wasm ./examples/shapes_colors_palette.c -DPLATFORM_WEB clang --target=wasm32 -I./include --no-standard-libraries -Wl,--export-table -Wl,--no-entry -Wl,--allow-undefined -Wl,--export=main -o wasm/game.wasm game.c -DPLATFORM_WEB diff --git a/index.html b/index.html index 6d7026b..d8ff57f 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ transform: translate(-50%, -50%); border: 1px solid black } - + #raylib-example-select { display: block; max-width: 8rem; @@ -45,9 +45,10 @@