@plasius/gpu-world-generator 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -59,6 +59,52 @@ const { levelSpec, cells, terrain } = generateTemperateMixedForest({
59
59
  import terrainWgsl from "@plasius/gpu-world-generator/terrain.wgsl?raw";
60
60
  ```
61
61
 
62
+ ## Worker DAG Manifests
63
+
64
+ `@plasius/gpu-world-generator` now publishes worker-first generation manifests
65
+ so chunk and voxel work can be scheduled as a multi-root DAG instead of a flat
66
+ queue.
67
+
68
+ ```js
69
+ import { getWorldGeneratorWorkerManifest } from "@plasius/gpu-world-generator";
70
+
71
+ const streaming = getWorldGeneratorWorkerManifest();
72
+ const bake = getWorldGeneratorWorkerManifest("bake");
73
+
74
+ console.log(streaming.jobs.map((job) => job.worker.jobType));
75
+ console.log(bake.jobs.find((job) => job.key === "assetSerialize"));
76
+ ```
77
+
78
+ - `streaming` models runtime chunk generation and mesh materialization.
79
+ - `bake` extends the DAG with asset serialization for background/offline output.
80
+ - Jobs include queue class, priority, dependencies, adaptive budget ladders, and
81
+ debug allocation tags for integration with `@plasius/gpu-performance` and
82
+ `@plasius/gpu-debug`.
83
+
84
+ ## Render Representation Plans
85
+
86
+ `@plasius/gpu-world-generator` now also publishes explicit chunk
87
+ representation-tier plans so renderer and worker packages can coordinate near,
88
+ mid, far, and horizon outputs without guessing from distance alone.
89
+
90
+ ```js
91
+ import { createWorldGeneratorRepresentationPlan } from "@plasius/gpu-world-generator";
92
+
93
+ const plan = createWorldGeneratorRepresentationPlan({
94
+ chunkId: "hex-12-9",
95
+ profile: "streaming",
96
+ gameplayImportance: "critical",
97
+ });
98
+
99
+ console.log(plan.bands);
100
+ console.log(plan.representations.find((entry) => entry.output === "rtProxy"));
101
+ ```
102
+
103
+ Each plan exposes raster-facing and RT-facing outputs separately, plus refresh
104
+ cadence, shadow relevance, chunk-identity preservation, and scheduling metadata
105
+ that downstream renderer and worker packages can prioritize by band and
106
+ importance.
107
+
62
108
  ## Demo
63
109
  The WebGPU mixed-forest demo lives in `demo/`. Run it with:
64
110
 
@@ -81,3 +127,5 @@ npm run pack:check
81
127
  ## Notes
82
128
  - For Vite/Pnpm setups, raw WGSL import is the most reliable.
83
129
  - See `docs/plan.md` for hierarchy and biome rules.
130
+ - See `docs/design/worker-manifest-integration.md` for the chunk/voxel DAG
131
+ contract.