diff --git a/CMakeLists.txt b/CMakeLists.txt index c5a8b84..4d6b5b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -246,6 +246,8 @@ if (EMSCRIPTEN) -sMIN_WEBGL_VERSION=2 -sUSE_LIBPNG=1 -sLLD_REPORT_UNDEFINED + -s ASYNCIFY + -sASYNCIFY_IMPORTS=hamsterNet__initSession,hamsterNet__setRacerName,hamsterNet__startRace,hamsterNet__finishRace,hamsterNet__getLeaderboard --preload-file ${SOURCE_DATA_DIR}@assets) else() target_link_options( @@ -255,7 +257,10 @@ if (EMSCRIPTEN) -sMAX_WEBGL_VERSION=2 -sMIN_WEBGL_VERSION=2 -sUSE_LIBPNG=1 - -sLLD_REPORT_UNDEFINED) + -sLLD_REPORT_UNDEFINED + -s ASYNCIFY + -sASYNCIFY_IMPORTS=hamsterNet__initSession,hamsterNet__setRacerName,hamsterNet__startRace,hamsterNet__finishRace,hamsterNet__getLeaderboard + ) endif() set_target_properties(${OutputExecutable} PROPERTIES LINK_FLAGS "--shell-file ${CMAKE_CURRENT_SOURCE_DIR}/emscripten_shell.html") diff --git a/emscripten_shell.html b/emscripten_shell.html index 5c4ff2c..ddbfb82 100644 --- a/emscripten_shell.html +++ b/emscripten_shell.html @@ -40,30 +40,6 @@ bottom: 0; } - #output { - position: fixed; - display: none; - font-family: 'Courier New', Courier, monospace; - width: 100%; - height: 15vh; - top:85vh; - bottom: 0; - margin-left: 1rem; - padding-left: 1rem; - background: #000; - color: #fff; - outline: none; - border: none; - } - - #container.show-console { - bottom: 15vh; - } - - #output.show-console { - display: block; - } - #canvas { display: block; border: 0px none; @@ -75,12 +51,6 @@ outline: none; } - #toggle-console { - display: none; - position: fixed; - top: 1rem; - left: 1rem; - } @@ -88,16 +58,12 @@