Files
wasm-pong/www/index.html
Thilo Behnke 3b68e58bb7 join session
2022-06-01 22:04:44 +02:00

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>