@onimaxxing/worldgen-node 0.15.1 → 0.16.0

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
@@ -323,6 +323,10 @@ interface WorldMapData {
323
323
  backwall_element_idx: Uint16Array; // U59 backwall layer; Vacuum-filled outside DLC5 aquatic biomes
324
324
  backwall_mass: Float32Array; // f32 per cell, kg; 0 on Vacuum cells
325
325
  backwall_temperature: Float32Array; // f32 per cell, K; 0 on Vacuum cells
326
+ zone_idx: Uint16Array; // u16 per cell -> zone_table; 0xFFFF = no biome polygon
327
+ zone_table: string[]; // distinct ZoneType strings (same vocab as biome_cells[].zone_type)
328
+ subworld_idx: Uint16Array; // u16 per cell -> subworld_table; 0xFFFF = no biome polygon
329
+ subworld_table: string[]; // distinct subworld type paths (same vocab as biome_cells[].type)
326
330
  biome_cells: BiomeCell[];
327
331
  geysers: GeyserSpawn[];
328
332
  buildings: EntitySpawn[];
package/index.d.ts CHANGED
@@ -234,6 +234,36 @@ export interface WorldMapData {
234
234
  backwall_mass: Float32Array;
235
235
  /** U59 backwall temperature per cell, in K. Zero on Vacuum cells. */
236
236
  backwall_temperature: Float32Array;
237
+ /**
238
+ * u16 per cell, row-major (`width * height`, same layout as
239
+ * `element_idx`): index into this world's `zone_table`, i.e. the
240
+ * `ZoneType` of the biome (Voronoi) region the cell falls in. Copied
241
+ * from the generator's own cell→region assignment (the containment
242
+ * pass that fills each region's element bands), not recomputed from
243
+ * `biome_cells` polygons. `0xFFFF` marks cells inside no biome
244
+ * polygon — the Unobtanium/Void world-border ring plus the odd
245
+ * integer point landing exactly on a shared polygon edge.
246
+ */
247
+ zone_idx: Uint16Array;
248
+ /**
249
+ * Distinct `ZoneType` strings for this world, indexed by `zone_idx`.
250
+ * Same vocabulary as `biome_cells[].zone_type`; a region whose
251
+ * subworld path can't be resolved (where `biome_cells[].zone_type`
252
+ * is `null`) contributes the literal `"Unknown"`.
253
+ */
254
+ zone_table: (ZoneType | 'Unknown')[];
255
+ /**
256
+ * u16 per cell, same layout and `0xFFFF` sentinel as `zone_idx`:
257
+ * index into `subworld_table`. Finer-grained than `zone_idx` — one
258
+ * entry per distinct subworld type rather than per `ZoneType`.
259
+ */
260
+ subworld_idx: Uint16Array;
261
+ /**
262
+ * Distinct subworld type paths for this world, indexed by
263
+ * `subworld_idx` — e.g. `"expansion1::subworlds/jungle/med_Jungle"`.
264
+ * Same vocabulary as `biome_cells[].type`.
265
+ */
266
+ subworld_table: string[];
237
267
  biome_cells: BiomeCell[];
238
268
  geysers: GeyserSpawn[];
239
269
  buildings: EntitySpawn[];
package/oni_wasm_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@onimaxxing/worldgen-node",
3
3
  "description": "WASM entry point for ONI worldgen",
4
- "version": "0.15.1",
4
+ "version": "0.16.0",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",