Fix alpha colors on the web by making the background canvas black instead of white. https://webglfundamentals.org/webgl/lessons/webgl-and-alpha.html has other workarounds, but I can't figure out how to control the webgl context parameters.

Also improve the loading message that appears before wasm has taken
over.
This commit is contained in:
Dustin Carlino 2020-10-21 10:50:40 -07:00
parent 8bc6b09b10
commit 035b8ee96f
2 changed files with 12 additions and 4 deletions

View File

@ -11,7 +11,11 @@
run();
</script>
</head>
<body>
<h1 id="loading">Loading...</h1>
<body style="background-color:black;">
<div id="loading" style="color:white;">
<h1>Loading... this may take up to 30 seconds</h1>
<h2>If you think something has broken, check your browser's developer console (Ctrl+Shift+I or similar)</h2>
<h3>Your browser must support WebGL or WebAssembly.</h3>
</div>
</body>
<html>

View File

@ -11,7 +11,11 @@
run();
</script>
</head>
<body>
<h1 id="loading">Loading...</h1>
<body style="background-color:black;">
<div id="loading" style="color:white;">
<h1>Loading... this may take up to 30 seconds</h1>
<h2>If you think something has broken, check your browser's developer console (Ctrl+Shift+I or similar)</h2>
<h3>Your browser must support WebGL or WebAssembly.</h3>
</div>
</body>
<html>