web demo files

This commit is contained in:
2026-02-11 09:06:55 -08:00
parent 87107f7bf3
commit 741a109637
5 changed files with 55 additions and 0 deletions

2
web-demo/.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
bhop_marble_7cf33a64-7120-4514-b9fa-4fe29d9523d.qbot filter=lfs diff=lfs merge=lfs -text
bhop_marble_5692093612.snfm filter=lfs diff=lfs merge=lfs -text

Binary file not shown.

47
web-demo/index.html Normal file
View File

@@ -0,0 +1,47 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, height=device-height, initial-scale=1"
/>
<title>Strafe Client</title>
<base data-trunk-public-url />
<style type="text/css">
:focus {
outline: none;
}
body {
margin: 0px;
background: #fff;
width: 100%;
height: 100%;
}
#content {
/* This allows the flexbox to grow to max size, this is needed for WebGPU */
flex: 1 1 100%;
/* This forces CSS to ignore the width/height of the canvas, this is needed for WebGL */
contain: size;
}
.main-canvas {
margin: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<canvas class="main-canvas" id="canvas"></canvas>
<link
data-trunk
rel="rust"
href="../strafe-client/Cargo.toml"
data-wasm-opt-params="--enable-bulk-memory --enable-nontrapping-float-to-int"
/>
</body>
</html>

0
web-demo/player.ts Normal file
View File