Files
vpinball-wasm/examples/basic/index.html
T

27 lines
712 B
HTML
Raw Normal View History

<!doctype html>
<!--
Minimal usage example for @valknar/vpinball-wasm.
Serve this directory alongside a built dist/ (see scripts/dev-server.sh)
and adjust the import path below if dist/ isn't a sibling directory.
-->
<html>
<head>
<meta charset="utf-8" />
<title>vpinball-wasm example</title>
<style>
body { margin: 0; background: #111; }
canvas { display: block; width: 100vw; height: 100vh; }
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<script type="module">
import { loadPinball } from '../../dist/index.js';
const canvas = document.getElementById('canvas');
const pinball = await loadPinball({ canvas, baseUrl: '../../dist' });
pinball.start();
</script>
</body>
</html>