From 17daec9b5e991afb2ae3b3ff33c02e705ea94abd Mon Sep 17 00:00:00 2001 From: Arturs Artamonovs Date: Tue, 6 Jul 2021 09:15:36 +0100 Subject: Initial commit --- Build/Makefile | 19 +++++++++++++++++++ Build/index.html | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ WasmAudio/main.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 Build/Makefile create mode 100644 Build/index.html diff --git a/Build/Makefile b/Build/Makefile new file mode 100644 index 0000000..30f0543 --- /dev/null +++ b/Build/Makefile @@ -0,0 +1,19 @@ +EMCC=emcc +CC=gcc +SOURCEDIR=../ +LDFLAGS=-lSDL2 -lSDL2_ttf +EM_LDFALGS=-s USE_SDL=2 -s MAX_WEBGL_VERSION=2 -s MIN_WEBGL_VERSION=2 -s LLD_REPORT_UNDEFINED -s USE_GLFW=3 + + + +make: + $(CC) -c $(SOURCEDIR)/main.c -g3 + +emcc: + $(EMCC) $(SOURCEDIR)/main.c -s WASM=1 -O3 -o index.js $(EM_LDFALGS) -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' + + + +web: + darkhttpd ./ --port 12345 + diff --git a/Build/index.html b/Build/index.html new file mode 100644 index 0000000..a91652f --- /dev/null +++ b/Build/index.html @@ -0,0 +1,54 @@ + + + + + + +
+        Koh fractal. Version: 0.3
+        
+ +
+ +
+ +
+          To save right click and "Save image as ..."
+          Supported keys:
+          left,right,up,down - change position by 10 pixels
+          r                  - reset the configuration
+          '-'                - decrease amount of levels
+          '='                - increase amount of levels
+          q                  - previous color pattern
+          w                  - next color pattern
+          a                  - decrease size
+          s                  - increase size
+        
+ +
+          Changelog:
+            v0.3 - 
+              fixed help -> increase button set to '='
+            v0.2 - 
+              fixed increase size bug, when fractal become as point
+              color pattern bug when go to next color
+            v0.1 - initial release
+        
+ + + \ No newline at end of file diff --git a/WasmAudio/main.c b/WasmAudio/main.c index 4e27973..b031629 100644 --- a/WasmAudio/main.c +++ b/WasmAudio/main.c @@ -6,6 +6,37 @@ // #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + +#if __EMSCRIPTEN__ +#include +#include +#include +#include +#else + #include + #ifdef __APPLE__ + #include + #else + #include + #endif + //how to use on mac? + //#include +#endif + + + + int main(int argc, const char * argv[]) { // insert code here... -- cgit v1.2.3