@ggez/runtime-format
v0.1.7
Published
Renderer-agnostic runtime contracts, parsing, and validation for Web Hammer.
Readme
@ggez/runtime-format
Renderer-agnostic runtime contracts for Web Hammer.
This package owns:
RuntimeSceneRuntimeBundleRuntimeWorldIndex- runtime scene validation and migration
- world-index parsing
- renderer-agnostic physics descriptor enumeration
Install
bun add @ggez/runtime-formatExample
import {
getRuntimePhysicsDescriptors,
parseRuntimeScene,
parseRuntimeWorldIndex,
validateRuntimeScene
} from "@ggez/runtime-format";
const scene = parseRuntimeScene(runtimeSceneJson);
const validation = validateRuntimeScene(scene);
if (!validation.ok) {
throw new Error(validation.errors.join("\n"));
}
const physics = getRuntimePhysicsDescriptors(scene);
const worldIndex = parseRuntimeWorldIndex(worldIndexJson);Use this package when you need the content contract without pulling in Three.js, Rapier, or editor code.
