Scaffold vpinball-wasm: Emscripten port of Visual Pinball
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.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user