Build scripts, CMake/source patches, npm packaging, and a Gitea CI workflow to compile the real Visual Pinball engine (SDL3 + WebGL2 + libwinevbs for real VBScript) to WebAssembly. The patches are validated end-to-end: the patched engine boots in a real browser, loads a real .vpx table, compiles its real GLSL shaders, computes environment map radiance, initializes physics, and starts the VBScript engine, before hanging on the one deliberately-deferred piece of work (game loop rewrite around emscripten_set_main_loop), documented in the README's roadmap.
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>
|