- Node.js LTS (v18+ recommended)
- npm (comes with Node)
npm installStarts the webpack build in watch mode and serves public/ with live reload on port 5173.
npm run devThis runs:
NODE_ENV=development node src/build.js --watch(incremental rebuilds topublic/build/)live-server public --port=5173 --no-browser
Open http://localhost:5173. Press F1 to toggle the debug overlay. In dev, a Docs button is available there.
Serve the already-built public/ directory without the watch build:
npm run serve
# then open http://localhost:5173/npm run build
# or explicitly set prod
cross-env NODE_ENV=production node src/build.jsOutputs to public/build/:
public/build/runtime.jsand async chunkspublic/build/assets/...(models, textures, config)
Docs are copied to public/docs/.
- Production builds enable webpack optimizations and minification by default.
- Source maps are currently enabled; you can harden prod by disabling them in
src/build.js(setdevtooltofalsewhenmode === 'production'). - For additional obfuscation, consider
webpack-obfuscatoras an optional plugin (not included by default).
Deploy the public/ folder (static host or CDN):
public/index.htmlpublic/build/**(compiled JS + assets)public/docs/**(this documentation)
You do NOT publish src/**. The build script copies/optimizes assets as needed.
src/runtime/**: Engine/runtime source (bundled)src/assets/**: Source assets (models, textures, config)src/components/**: Custom components for dynamic importsrc/scenes/**: Scene modulessrc/blender/**: Blender add-on and samplespublic/**: Static entry point and build output
In production, only assets referenced by the runtime and scene modules are copied (basic tree-shaken copy).