27 lines
712 B
HTML
27 lines
712 B
HTML
<!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>
|