@ggez/runtime-build
v0.1.7
Published
Headless build utilities and CLI for compiling Web Hammer runtime bundles.
Readme
@ggez/runtime-build
Headless runtime build utilities for Web Hammer.
This package owns:
- compiling
.whmapsnapshots intoRuntimeScene - asset externalization
- runtime bundle packing and unpacking
- world-index creation
- a CLI for manifest and bundle output
Install
bun add @ggez/runtime-buildBuild From A .whmap Snapshot
import {
buildRuntimeBundleFromSnapshot,
buildRuntimeSceneFromSnapshot
} from "@ggez/runtime-build";
const runtimeScene = await buildRuntimeSceneFromSnapshot(snapshot);
const runtimeBundle = await buildRuntimeBundleFromSnapshot(snapshot, {
assetDir: "assets"
});CLI
web-hammer-runtime-build manifest --input level.whmap --output scene.runtime.json
web-hammer-runtime-build bundle --input level.whmap --output scene.runtime.zip
web-hammer-runtime-build world-index --chunks hub:/world/chunks/hub/scene.runtime.json --output world-index.jsonUse this package from editor workers, CI, or a content-build step. It does not depend on Three runtime scene instantiation.
