Add a custom webpage for the WASM build
It's just a copy of the page I made for my Boids program, but with all the relevant names swapped to "asteroids".
This commit is contained in:
98
www/index.html
Normal file
98
www/index.html
Normal file
@@ -0,0 +1,98 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<style>
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
canvas {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
display: block;
|
||||
}
|
||||
main {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 70%;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th, td {
|
||||
border: 1px solid;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="margin: 0px;">
|
||||
<h1>
|
||||
Robert's Bad Asteroids Game
|
||||
</h1>
|
||||
<canvas id="game-canvas" width="1280" height="720"></canvas>
|
||||
<main>
|
||||
<article>
|
||||
<h2>Description</h2>
|
||||
<p>
|
||||
A (work in progress) version of the Asteroids arcade game.
|
||||
</p>
|
||||
</article>
|
||||
<article>
|
||||
<h3>Controls</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Input</th>
|
||||
<th scope="col">Effect</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>W</td>
|
||||
<td>Fire thruster</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>Rotate Left</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>D</td>
|
||||
<td>Rotate Right</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Spacebar</td>
|
||||
<td>Shoot gun</td>
|
||||
</tr>
|
||||
</table>
|
||||
</article>
|
||||
<article>
|
||||
<h3>Misc</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Source code</td>
|
||||
<td><a href=https://github.com/DerVerrater/another-asteroids>https://github.com/DerVerrater/another-asteroids</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>License</td>
|
||||
<td><a href="https://www.gnu.org/licenses/agpl-3.0.txt">AGPL-3.0-only</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Program Version</td>
|
||||
<!-- This version text is completely unchecked. I'll need to do something about that. -->
|
||||
<td><code>v0.3.0 (+patches)</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
</article>
|
||||
</main>
|
||||
<script type="module">
|
||||
import init from './asteroids.js'
|
||||
|
||||
init().catch((error) => {
|
||||
if (!error.message.startsWith("Using exceptions for control flow, don't mind me. This isn't actually an error!")) {
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user