From be7e56f51e0f9c1c8bf38cab8d451f148b46458b Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 May 2019 10:40:51 +0200 Subject: Move emscripten web shell to src --- src/shell.html | 269 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 269 insertions(+) create mode 100644 src/shell.html (limited to 'src/shell.html') diff --git a/src/shell.html b/src/shell.html new file mode 100644 index 00000000..5d8e7e91 --- /dev/null +++ b/src/shell.html @@ -0,0 +1,269 @@ + + + + + + + raylib HTML5 GAME + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + {{{ SCRIPT }}} + + \ No newline at end of file -- cgit v1.2.3 From a33b0002ee599670a3de5e52f4dcc0e226fb4f61 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 May 2019 10:55:03 +0200 Subject: Review js formatting for better readability --- src/shell.html | 176 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 93 insertions(+), 83 deletions(-) (limited to 'src/shell.html') diff --git a/src/shell.html b/src/shell.html index 5d8e7e91..42cd711a 100644 --- a/src/shell.html +++ b/src/shell.html @@ -173,96 +173,106 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB {{{ SCRIPT }}} -- cgit v1.2.3 From 7421ac9e24095a4104285691a7b4fa620629277d Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 May 2019 12:33:28 +0200 Subject: Add code to resume blocked AudioContexts --- src/shell.html | 53 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 5 deletions(-) (limited to 'src/shell.html') diff --git a/src/shell.html b/src/shell.html index 42cd711a..a0e730e1 100644 --- a/src/shell.html +++ b/src/shell.html @@ -85,7 +85,8 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB margin: 0; margin-top: 20px; margin-left: 20px; - display: inline-block; vertical-align: top; + display: inline-block; + vertical-align: top; -webkit-animation: rotation .8s linear infinite; -moz-animation: rotation .8s linear infinite; -o-animation: rotation .8s linear infinite; @@ -253,8 +254,7 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB progressElement.value = null; progressElement.max = null; progressElement.hidden = true; - - if (!text) spinnerElement.hidden = true; + if (!text) spinnerElement.style.display = 'none'; } statusElement.innerHTML = text; @@ -263,7 +263,8 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB monitorRunDependencies: function(left) { this.totalDependencies = Math.max(this.totalDependencies, left); Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.'); - } + }, + //noInitialRun: true }; Module.setStatus('Downloading...'); @@ -274,6 +275,48 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB Module.setStatus = function(text) { if (text) Module.printErr('[post-exception status] ' + text); }; }; + + + {{{ SCRIPT }}} - \ No newline at end of file + -- cgit v1.2.3 From 31bcaffd7d11c9b24776facb527e20eb5e0030c6 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 22 May 2019 16:13:59 +0200 Subject: Added AudioContext Resume/Suspend button --- src/shell.html | 79 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 37 deletions(-) (limited to 'src/shell.html') diff --git a/src/shell.html b/src/shell.html index a0e730e1..db823882 100644 --- a/src/shell.html +++ b/src/shell.html @@ -133,7 +133,7 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB display: inline-block; float: right; vertical-align: top; - margin-top: 30px; + margin-top: 15px; margin-right: 20px; } @@ -148,6 +148,21 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB font-family: 'Lucida Console', Monaco, monospace; outline: none; } + + input[type=button] { + background-color: lightgray; + border: 4px solid darkgray; + color: black; + text-decoration: none; + cursor: pointer; + width: 140px; + height: 50px; + } + + input[type=button]:hover { + background-color: #f5f5f5ff; + border-color: black; + } @@ -158,7 +173,8 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB
Downloading...
- + +
@@ -174,7 +190,7 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB @@ -276,46 +292,35 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB }; - + {{{ SCRIPT }}} -- cgit v1.2.3 From 4e0a5909e725a1951b7fcc10421d3c41b31f15f4 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 28 May 2019 12:08:04 +0200 Subject: Hide progress bar --- src/shell.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/shell.html') diff --git a/src/shell.html b/src/shell.html index db823882..7db891be 100644 --- a/src/shell.html +++ b/src/shell.html @@ -125,8 +125,8 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB } #progress { - height: 20px; - width: 30px; + height: 0px; + width: 0px; } #controls { @@ -264,7 +264,7 @@ jwE50AGjLCVuS8Yt4H7OgZLKK5EKOsLviEWJSL/+0uMi7gLUSBseYwqEbXvSHCec1CJvZPyHCmYQffaB text = m[1]; progressElement.value = parseInt(m[2])*100; progressElement.max = parseInt(m[4])*100; - progressElement.hidden = false; + progressElement.hidden = true; spinnerElement.hidden = false; } else { progressElement.value = null; -- cgit v1.2.3