@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.
@@ -0,0 +1,37 @@
1
+ # ADR-0004: Worker DAG Manifests for Chunk and Voxel Generation
2
+
3
+ - **Status**: Accepted
4
+ - **Date**: 2026-03-14
5
+
6
+ ## Context
7
+
8
+ World generation already has an inherent DAG: fractal prepass and field
9
+ synthesis can start independently, terrain synthesis joins them, and voxel,
10
+ mesh, bake, and serialization stages branch afterwards. Leaving this implicit
11
+ forces consumer packages to flatten the pipeline into opaque queue work.
12
+
13
+ ## Decision
14
+
15
+ Publish worker-first manifest helpers from `@plasius/gpu-world-generator`.
16
+
17
+ - `streaming` profile:
18
+ runtime chunk generation and mesh-ready output
19
+ - `bake` profile:
20
+ background/offline generation plus asset serialization
21
+
22
+ Each manifest exports:
23
+
24
+ - `queueClass: voxel`
25
+ - `schedulerMode: dag`
26
+ - explicit job priorities and dependencies
27
+ - adaptive budget ladders for degradable stages
28
+ - debug allocation metadata for observability
29
+
30
+ ## Consequences
31
+
32
+ - Positive: chunk and voxel generation can be coordinated by shared worker and
33
+ performance packages without package-specific glue.
34
+ - Positive: authoritative terrain stages remain explicit and protected from
35
+ visual-only degradation.
36
+ - Negative: world-generation stage names become part of the public contract and
37
+ require migration discipline.
@@ -0,0 +1,51 @@
1
+ # ADR-0005: Render Representation Tiers and Proxy Outputs
2
+
3
+ ## Status
4
+
5
+ Accepted
6
+
7
+ ## Context
8
+
9
+ The world architecture no longer assumes that every chunk is rendered from the
10
+ same live representation. Near, mid, far, and horizon content should be able to
11
+ use different visual and ray-tracing representations so the world scales in a
12
+ predictable way.
13
+
14
+ `@plasius/gpu-world-generator` already owns chunk and voxel generation, so it is
15
+ the natural package to plan how world chunks will expose render-oriented
16
+ representation tiers and proxy outputs before implementation begins.
17
+
18
+ ## Decision
19
+
20
+ `@plasius/gpu-world-generator` will plan around formal representation tiers for
21
+ rendering and RT preparation:
22
+
23
+ - `near`: full live chunk output
24
+ - `mid`: simplified live chunk output
25
+ - `far`: HLOD, impostor, or proxy-driven chunk output
26
+ - `horizon`: shell, skyline, or large-scale background representation
27
+
28
+ The package should eventually be able to provide metadata or assets for:
29
+
30
+ - chunk-local full geometry
31
+ - simplified geometry or material reductions
32
+ - RT proxy or reduced-fidelity instance data
33
+ - merged or impostor-oriented distant proxies
34
+ - low-refresh far-field or horizon assets
35
+
36
+ ## Consequences
37
+
38
+ - Positive: distant rendering becomes a formal output tier instead of an
39
+ ad-hoc optimization.
40
+ - Positive: renderer and world packages can coordinate around explicit chunk
41
+ representation bands.
42
+ - Positive: RT proxy planning can start from generated world assets instead of
43
+ being recreated in a later stage.
44
+ - Neutral: this ADR does not yet prescribe the final file format or buffer
45
+ layout for each proxy type.
46
+
47
+ ## Follow-On Work
48
+
49
+ - Define the technical contract for chunk representation metadata and proxy
50
+ refresh policy.
51
+ - Add test-first contract and unit specs before implementing new proxy outputs.
@@ -3,3 +3,5 @@
3
3
  - [ADR-0001: GPU World Generator Package Scope](./adr-0001-package-scope.md)
4
4
  - [ADR-0002: Tiled World Generation, LOD, and Stitching](./adr-0002-world-tiling-lod-stitching.md)
5
5
  - [ADR-0003: Terrain Generation Style Mixing (Shader-Based)](./adr-0003-terrain-generation-style-mixing.md)
6
+ - [ADR-0004: Worker DAG Manifests for Chunk and Voxel Generation](./adr-0004-worker-dag-manifests-for-chunk-and-voxel-generation.md)
7
+ - [ADR-0005: Render Representation Tiers and Proxy Outputs](./adr-0005-render-representation-tiers-and-proxy-outputs.md)
@@ -0,0 +1,42 @@
1
+ # Worker Manifest Integration
2
+
3
+ ## Overview
4
+
5
+ `@plasius/gpu-world-generator` now publishes chunk/voxel generation as a
6
+ multi-root DAG so shared scheduling and performance packages can reason about
7
+ world generation explicitly.
8
+
9
+ ## Streaming Profile
10
+
11
+ - roots:
12
+ `fractalPrepass`, `fieldSynthesis`
13
+ - join:
14
+ `terrainSynthesis`
15
+ - branches after terrain:
16
+ `voxelMaterialize`, `tileBake`
17
+ - final runtime visual stage:
18
+ `meshBuild`
19
+
20
+ This profile models the latency-sensitive path used while streaming terrain
21
+ around the active camera or player.
22
+
23
+ ## Bake Profile
24
+
25
+ The bake profile reuses the same early stages and extends the tail with:
26
+
27
+ - `assetSerialize`
28
+
29
+ This represents offline or background generation where asset persistence is part
30
+ of the pipeline.
31
+
32
+ ## Authority Boundaries
33
+
34
+ - `fractalPrepass`, `fieldSynthesis`, `terrainSynthesis`
35
+ authoritative, fixed budgets
36
+ - `voxelMaterialize`, `tileBake`
37
+ non-authoritative, degradable
38
+ - `meshBuild`
39
+ visual, degradable
40
+
41
+ This keeps core terrain correctness stable while allowing runtime pressure
42
+ control to trim mesh and auxiliary output cost first.
@@ -0,0 +1,4 @@
1
+ # TDR Index
2
+
3
+ - [TDR-0001: World-Generator Worker Manifest Contract](./tdr-0001-world-generator-worker-manifest-contract.md)
4
+ - [TDR-0002: Render Representation Tier Contract](./tdr-0002-render-representation-tier-contract.md)
@@ -0,0 +1,39 @@
1
+ # TDR-0001: World-Generator Worker Manifest Contract
2
+
3
+ - **Status**: Accepted
4
+ - **Date**: 2026-03-14
5
+
6
+ ## Context
7
+
8
+ The world-generator package needs to expose its chunk and voxel pipeline in a
9
+ form that `@plasius/gpu-worker` and `@plasius/gpu-performance` can consume
10
+ directly, without adding a hard dependency on either package.
11
+
12
+ ## Decision
13
+
14
+ Publish two manifest profiles:
15
+
16
+ - `streaming`
17
+ - `fractalPrepass`
18
+ - `fieldSynthesis`
19
+ - `terrainSynthesis`
20
+ - `voxelMaterialize`
21
+ - `meshBuild`
22
+ - `tileBake`
23
+ - `bake`
24
+ - all streaming jobs plus `assetSerialize`
25
+
26
+ Contract rules:
27
+
28
+ - authoritative terrain jobs use fixed levels
29
+ - degradable voxel/mesh/bake jobs expose low/medium/high ladders
30
+ - job ids are namespaced as `world-generator.<profile>.<job>`
31
+ - queue class is always `voxel`
32
+ - scheduler mode is always `dag`
33
+
34
+ ## Consequences
35
+
36
+ - Positive: consumers can import manifests directly and feed them into shared
37
+ worker-budget adapters.
38
+ - Positive: the package stays in control of its actual generation topology.
39
+ - Negative: adding or renaming stages becomes a public API change.
@@ -0,0 +1,60 @@
1
+ # TDR-0002: Render Representation Tier Contract
2
+
3
+ ## Status
4
+
5
+ Accepted
6
+
7
+ ## Goal
8
+
9
+ Define the future contract for render and RT-oriented chunk representation tiers
10
+ in `@plasius/gpu-world-generator`.
11
+
12
+ ## Planned Tier Outputs
13
+
14
+ Each chunk or region should eventually be able to describe one or more of:
15
+
16
+ - full live geometry output
17
+ - simplified live geometry output
18
+ - RT proxy output
19
+ - merged HLOD or impostor output
20
+ - horizon-shell or skyline output
21
+
22
+ ## Planned Metadata
23
+
24
+ Representation descriptors should be able to carry:
25
+
26
+ - chunk or region identifier
27
+ - representation tier:
28
+ - `near`
29
+ - `mid`
30
+ - `far`
31
+ - `horizon`
32
+ - refresh policy or expected update cadence
33
+ - RT participation policy
34
+ - shadow relevance policy
35
+ - suggested ownership for renderer and worker scheduling
36
+
37
+ ## Planned Tests
38
+
39
+ Contract tests should prove that:
40
+
41
+ - chunk descriptors can distinguish near, mid, far, and horizon output tiers
42
+ - proxy outputs can declare RT and shadow participation separately from the
43
+ live geometry output
44
+ - refresh expectations are explicit for far and horizon content
45
+
46
+ Unit tests should prove that:
47
+
48
+ - world-generation manifests can describe merged or impostor-driven far-field
49
+ outputs without losing chunk identity
50
+ - horizon representations can be low-frequency and still remain valid render
51
+ products
52
+ - RT proxy descriptors can differ from the raster-facing representation tier
53
+
54
+ ## Implementation Notes
55
+
56
+ The first public implementation now ships as
57
+ `createWorldGeneratorRepresentationPlan(...)`. It publishes explicit near, mid,
58
+ far, and horizon descriptors, exposes distinct raster and RT proxy outputs,
59
+ retains chunk identity for proxy products, and includes refresh cadence,
60
+ shadow-source relevance, and scheduling metadata for downstream packages.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasius/gpu-world-generator",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "GPU-assisted world generation with hex-grid terrain synthesis.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -38,13 +38,13 @@
38
38
  "prepublishOnly": "npm run build && npm run pack:check"
39
39
  },
40
40
  "dependencies": {
41
- "@plasius/gpu-worker": "^0.1.8"
41
+ "@plasius/gpu-worker": "^0.1.10"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@eslint/js": "^9.39.1",
45
+ "@types/node": "^22.10.0",
45
46
  "@typescript-eslint/eslint-plugin": "^8.46.2",
46
47
  "@typescript-eslint/parser": "^8.46.2",
47
- "@types/node": "^22.10.0",
48
48
  "c8": "^10.1.3",
49
49
  "eslint": "^9.39.1",
50
50
  "globals": "^17.3.0",
@@ -65,5 +65,8 @@
65
65
  "homepage": "https://github.com/Plasius-LTD/gpu-world-generator#readme",
66
66
  "overrides": {
67
67
  "minimatch": "^10.2.1"
68
+ },
69
+ "engines": {
70
+ "node": ">=24"
68
71
  }
69
72
  }
package/src/index.ts CHANGED
@@ -9,3 +9,4 @@ export * from "./fractal-prepass";
9
9
  export * from "./tiles";
10
10
  export * from "./tile-cache";
11
11
  export * from "./mesh";
12
+ export * from "./worker";