mirror of
https://github.com/thilo-behnke/wasm-pong.git
synced 2026-05-17 09:26:32 +00:00
49 lines
1.4 KiB
HTML
49 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Hello wasm-pack!</title>
|
|
<style>
|
|
body {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript>
|
|
<div id="network_session" style="display: none; margin-bottom: 20px"></div>
|
|
<div style="display: flex; align-items: center">
|
|
<button id="online-btn" onclick="WASM_PONG.createOnlineSession()">
|
|
Create Online Game
|
|
</button>
|
|
<input type="text" id="join-online-input"/>
|
|
<button id="join-online-btn" onclick="WASM_PONG.joinOnlineSession()">
|
|
Join Online Game
|
|
</button>
|
|
<button id="pause-btn" onclick="WASM_PONG.pauseGame()">
|
|
Pause
|
|
</button>
|
|
<button id="resume-btn" onclick="WASM_PONG.resumeGame()" disabled>
|
|
Resume
|
|
</button>
|
|
<button id="tick-btn" onclick="WASM_PONG.oneTick()" disabled>
|
|
Tick
|
|
</button>
|
|
<button id="debug-btn" onclick="WASM_PONG.toggleDebug()">
|
|
Debug
|
|
</button>
|
|
</div>
|
|
<canvas id="wasm-app-canvas"></canvas>
|
|
<script src="./bootstrap.js"></script>
|
|
</body>
|
|
</html>
|