Signed-off-by: falkTX <falktx@falktx.com>tags/22.09
| @@ -1 +1 @@ | |||||
| Subproject commit 2f0e475cc6880719e056949b4543310cb841bbdd | |||||
| Subproject commit 12199065c8558e6c3ef47071b09fa456b32ec9e5 | |||||
| @@ -1 +1 @@ | |||||
| Subproject commit c9ce3383797f398bb091d37525fd00ef7047afc7 | |||||
| Subproject commit f91b8862806c6b5ab18113a547db186be5c158e6 | |||||
| @@ -136,15 +136,15 @@ struct WasmWelcomeDialog : rack::widget::OpaqueWidget | |||||
| label->box.size.y = box.size.y - 2*margin - 40; | label->box.size.y = box.size.y - 2*margin - 40; | ||||
| label->fontSize = 20; | label->fontSize = 20; | ||||
| label->text = "" | label->text = "" | ||||
| "Welcome!\n" | |||||
| "Welcome to Cardinal on the Web!\n" | |||||
| "\n" | "\n" | ||||
| "This is a special web-assembly version of Cardinal, " | |||||
| "allowing you to enjoy eurorack-style modules directly in your browser.\n" | |||||
| "If using mobile/touch devices, please note:\n" | |||||
| " - Single quick press does simple mouse click\n" | |||||
| " - Press & move does click & drag action\n" | |||||
| " - Press & hold does right-click (and opens module browser)\n" | |||||
| "\n" | "\n" | ||||
| "This is still very much a work in progress, " | |||||
| "minor issues and occasional crashes are expected.\n" | |||||
| "\n" | |||||
| "Proceed with caution and have fun!"; | |||||
| "Still a bit experimental, so proceed with caution.\n" | |||||
| "Have fun!"; | |||||
| contentLayout->addChild(label); | contentLayout->addChild(label); | ||||
| struct JoinDiscussionButton : Button { | struct JoinDiscussionButton : Button { | ||||
| @@ -231,9 +231,9 @@ ifeq ($(WASM),true) | |||||
| ifneq ($(STATIC_BUILD),true) | ifneq ($(STATIC_BUILD),true) | ||||
| LINK_FLAGS += --preload-file=./jsfx | LINK_FLAGS += --preload-file=./jsfx | ||||
| LINK_FLAGS += --preload-file=./lv2 | LINK_FLAGS += --preload-file=./lv2 | ||||
| LINK_FLAGS += --use-preload-plugins | |||||
| endif | endif | ||||
| LINK_FLAGS += --preload-file=./resources | LINK_FLAGS += --preload-file=./resources | ||||
| LINK_FLAGS += --use-preload-plugins | |||||
| LINK_FLAGS += -sALLOW_MEMORY_GROWTH | LINK_FLAGS += -sALLOW_MEMORY_GROWTH | ||||
| LINK_FLAGS += -sINITIAL_MEMORY=64Mb | LINK_FLAGS += -sINITIAL_MEMORY=64Mb | ||||
| LINK_FLAGS += -sLZ4=1 | LINK_FLAGS += -sLZ4=1 | ||||
| @@ -34,6 +34,17 @@ | |||||
| height: 100vh; | height: 100vh; | ||||
| } | } | ||||
| #error { | |||||
| background: rgba(0,0,0,0.75); | |||||
| display: none; | |||||
| position: fixed; | |||||
| padding: 0.5em; | |||||
| left: 0; | |||||
| right: 0; | |||||
| width: 100%; | |||||
| z-index: 2; | |||||
| } | |||||
| .emscripten { | .emscripten { | ||||
| display: block; | display: block; | ||||
| margin-left: auto; | margin-left: auto; | ||||
| @@ -92,14 +103,18 @@ | |||||
| </div> | </div> | ||||
| <script type='text/javascript'> | <script type='text/javascript'> | ||||
| var errorElement = document.getElementById('error'); | |||||
| var statusElement = document.getElementById('status'); | var statusElement = document.getElementById('status'); | ||||
| var progressElement = document.getElementById('progress'); | var progressElement = document.getElementById('progress'); | ||||
| var spinnerElement = document.getElementById('spinner'); | var spinnerElement = document.getElementById('spinner'); | ||||
| var canvasWrapper = document.getElementById('canvas_wrapper'); | |||||
| var Module = { | var Module = { | ||||
| preRun: [], | preRun: [], | ||||
| postRun: function() { | postRun: function() { | ||||
| var canvasWrapper = document.getElementById('canvas_wrapper'); | |||||
| statusElement.style.display = 'none'; | |||||
| progressElement.style.display = 'none'; | |||||
| spinnerElement.style.display = 'none'; | |||||
| canvasWrapper.style.display = 'block'; | canvasWrapper.style.display = 'block'; | ||||
| window.dispatchEvent(new Event('resize')); | window.dispatchEvent(new Event('resize')); | ||||
| }, | }, | ||||
| @@ -143,7 +158,8 @@ | |||||
| }; | }; | ||||
| Module.setStatus('Downloading...'); | Module.setStatus('Downloading...'); | ||||
| window.onerror = function() { | window.onerror = function() { | ||||
| Module.setStatus('Exception thrown, see JavaScript console'); | |||||
| errorElement.innerHTML = 'Exception thrown:<br>' + err | |||||
| errorElement.style.display = 'block'; | |||||
| spinnerElement.style.display = 'none'; | spinnerElement.style.display = 'none'; | ||||
| Module.setStatus = function(text) { | Module.setStatus = function(text) { | ||||
| if (text) console.error('[post-exception status] ' + text); | if (text) console.error('[post-exception status] ' + text); | ||||