@ggez/runtime-streaming
v0.1.7
Published
Chunk and world streaming helpers for Web Hammer runtime content.
Readme
@ggez/runtime-streaming
Optional world-streaming orchestration for Web Hammer runtime chunks.
This package owns:
- world-index driven chunk state
- focus-based load and unload decisions
- host-provided chunk loading and unloading
- concurrency limits for chunk loading
Install
bun add @ggez/runtime-streamingExample
import { createRuntimeWorldManager } from "@ggez/runtime-streaming";
const manager = createRuntimeWorldManager({
async loadChunk(chunk) {
return fetch(chunk.manifestUrl!).then((response) => response.json());
},
async unloadChunk(_chunk, data) {
data.dispose?.();
},
worldIndex
});
await manager.updateStreamingFocus({ x: 0, y: 1.8, z: 0 });The package is adapter-agnostic. Your host decides how a loaded chunk becomes render objects, gameplay state, or cached data.
