@onimaxxing/worldgen 0.21.1 → 0.21.3
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/LICENSE +21 -0
- package/README.md +26 -0
- package/index.d.ts +110 -0
- package/index.js +8 -0
- package/package.json +2 -1
- package/parallel/LICENSE +1 -1
- package/parallel/oni_wasm.d.ts +19 -483
- package/parallel/oni_wasm.js +30 -1141
- package/parallel/oni_wasm_bg.wasm +0 -0
- package/parallel/oni_wasm_bg.wasm.d.ts +3 -47
- package/serial/LICENSE +1 -1
- package/serial/oni_wasm.d.ts +20 -0
- package/serial/oni_wasm.js +37 -0
- package/serial/oni_wasm_bg.wasm +0 -0
- package/serial/oni_wasm_bg.wasm.d.ts +1 -0
package/parallel/oni_wasm.d.ts
CHANGED
|
@@ -1,336 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Arm the per-pair thermal tracer used to bisect the OASIS W1
|
|
6
|
-
* wasm-vs-native divergence. Targets one sim cell index, one tick.
|
|
7
|
-
*/
|
|
8
|
-
export function arm_thermal_pair_trace(target_sim_idx: number, target_tick: number): void;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Bench harness — time just the Rust `generate_with_settings` call without
|
|
12
|
-
* the JSON-serialization overhead every production entry point pays.
|
|
13
|
-
*
|
|
14
|
-
* Gated behind `debug` so release WASM doesn't ship with it. Returns a
|
|
15
|
-
* small JSON blob containing per-phase wall-clock in ms so the bench
|
|
16
|
-
* script can separate cluster-gen time from
|
|
17
|
-
* `build_result` + `serde_json::to_string` cost.
|
|
18
|
-
*/
|
|
19
|
-
export function bench_cluster_phases(seed: number, cluster_id: string): string;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Bench harness — returns the accumulated phase totals as JSON
|
|
23
|
-
* (`{"phase": {"ms": number, "calls": number}, ...}`) and clears the
|
|
24
|
-
* accumulator. Gated behind `debug`.
|
|
25
|
-
*/
|
|
26
|
-
export function bench_profile_dump(): string;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Bench harness — enable the fine-grained `oni_worldgen::profile`
|
|
30
|
-
* phase accumulator. Pair with `bench_profile_dump()` after running the
|
|
31
|
-
* measured work. Gated behind `debug`.
|
|
32
|
-
*/
|
|
33
|
-
export function bench_profile_enable(): void;
|
|
34
|
-
|
|
35
4
|
/**
|
|
36
5
|
* Drop the cached cluster. Snapshot edits persist.
|
|
37
6
|
*/
|
|
38
7
|
export function clear_cluster_cache(): void;
|
|
39
8
|
|
|
40
|
-
/**
|
|
41
|
-
* Compute a `ClusterDigest` from a coordinate, returning JSON.
|
|
42
|
-
*
|
|
43
|
-
* This is the canonical Rust path for digest regeneration — calling
|
|
44
|
-
* this function from JS via wasm-pack ensures the digest comes from
|
|
45
|
-
* the SAME math the production WASM build uses, not from a separate
|
|
46
|
-
* native binary that might have different precision.
|
|
47
|
-
*
|
|
48
|
-
* `mode` must be either "templates" or "notemplates".
|
|
49
|
-
*
|
|
50
|
-
* On parse error returns a JSON object with an `error` field.
|
|
51
|
-
* Variant of [`compute_digest_from_coordinate`] that takes the
|
|
52
|
-
* cluster id directly instead of going through `parse_coordinate`.
|
|
53
|
-
* Required when the coordinate's prefix maps to multiple clusters —
|
|
54
|
-
* e.g. when a mod registers several clusters with the same
|
|
55
|
-
* `coordinatePrefix` (Cluster Generation Manager has three clusters
|
|
56
|
-
* at `CGSM-C`). The C# side disambiguates via `SNAPSHOT_CLUSTER`
|
|
57
|
-
* for the same reason; this is the symmetric Rust knob.
|
|
58
|
-
*
|
|
59
|
-
* `coordinate` is still used for output schema fields (`coordinate`,
|
|
60
|
-
* story/mixing extraction via the matching CS-side parser), but the
|
|
61
|
-
* cluster lookup is performed against `cluster_id` directly. For
|
|
62
|
-
* vanilla unambiguous prefixes the two functions produce identical
|
|
63
|
-
* digests when `cluster_id` matches the prefix's mapped cluster.
|
|
64
|
-
*/
|
|
65
|
-
export function compute_digest_for_cluster(coordinate: string, cluster_id: string, seed: number, mode: string): string;
|
|
66
|
-
|
|
67
|
-
export function compute_digest_from_coordinate(coordinate: string, mode: string): string;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Apply a structured mutations payload to the generated cluster
|
|
71
|
-
* before computing the digest. Used by mod extensions to fold
|
|
72
|
-
* post-snapshot overrides (CGM geyser swap, SO_POI pins, vanilla-
|
|
73
|
-
* starmap replacement) into the digest without modifying the
|
|
74
|
-
* worldgen pipeline.
|
|
75
|
-
*
|
|
76
|
-
* The `overrides_json` schema is generic — not CGM-named — so any
|
|
77
|
-
* mod can use it:
|
|
78
|
-
* ```json
|
|
79
|
-
* {
|
|
80
|
-
* "entityReplacements": [
|
|
81
|
-
* { "worldIdx": 0, "cell": 100, "newTag": "GeyserGeneric_hot_water",
|
|
82
|
-
* "newResolvedTemplate": "hot_water" }
|
|
83
|
-
* ],
|
|
84
|
-
* "worldLocationOverrides": [
|
|
85
|
-
* { "worldIdx": 2, "q": 3, "r": -2 }
|
|
86
|
-
* ],
|
|
87
|
-
* "poiUpserts": [
|
|
88
|
-
* { "poiType": "HarvestableSpacePOI_X", "q": 5, "r": 5 }
|
|
89
|
-
* ],
|
|
90
|
-
* "vanillaDestinationsReplace": [
|
|
91
|
-
* { "destType": "CarbonaceousAsteroid", "distance": 0 }
|
|
92
|
-
* ]
|
|
93
|
-
* }
|
|
94
|
-
* ```
|
|
95
|
-
*
|
|
96
|
-
* Pass `""` or `"{}"` for `overrides_json` to skip mutations entirely
|
|
97
|
-
* (equivalent to [`compute_digest_for_cluster`]).
|
|
98
|
-
*/
|
|
99
|
-
export function compute_digest_with_overrides(coordinate: string, cluster_id: string, seed: number, mode: string, overrides_json: string): string;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Geyser stats compute, exposed for the mod-extensions transformer.
|
|
103
|
-
* After a CGM blacklist re-roll substitutes a generic geyser
|
|
104
|
-
* template, this function re-derives the 5 MNI-projected ints
|
|
105
|
-
* (emit/avg/idle/erupt/dormant/active) the digest hashes.
|
|
106
|
-
*
|
|
107
|
-
* `template` is a bare geyser id (no `GeyserGeneric_` prefix) —
|
|
108
|
-
* e.g. `"hot_water"`, `"small_volcano"`, `"oil_drip"`. Returns
|
|
109
|
-
* `{"error": "..."}` for unknown templates.
|
|
110
|
-
*
|
|
111
|
-
* `seed` is the per-cell `globalWorldSeed + cluster_x + cluster_y` —
|
|
112
|
-
* same as the existing geyser RNG path.
|
|
113
|
-
*
|
|
114
|
-
* Output JSON schema mirrors the `GeyserStats` interface in the
|
|
115
|
-
* `mod-extensions` transformer module:
|
|
116
|
-
* ```json
|
|
117
|
-
* {
|
|
118
|
-
* "rate": 4310,
|
|
119
|
-
* "idle": 112,
|
|
120
|
-
* "erupt": 500,
|
|
121
|
-
* "dorm": 71,
|
|
122
|
-
* "active": 125
|
|
123
|
-
* }
|
|
124
|
-
* ```
|
|
125
|
-
*/
|
|
126
|
-
export function compute_geyser_stats(seed: number, template: string): string;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* are sampled. Used for vibe-checking U59 backwall plumbing.
|
|
130
|
-
*/
|
|
131
|
-
export function debug_dump_backwall_distribution(coordinate: string, world_idx: number): string;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Probe the cluster-level (overworld) PointGenerator seed state for a
|
|
135
|
-
* coordinate. Returns the values that drive the very first PD pass in
|
|
136
|
-
* `WorldLayout.GenerateOverworld` so we can diff them against the C#
|
|
137
|
-
* snapshot's equivalent fields to localize early OW-site divergence.
|
|
138
|
-
*/
|
|
139
|
-
export function debug_dump_cluster_pd_seed_state(coordinate: string): string;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Probe per-channel noise hashes for one coordinate. Output:
|
|
143
|
-
* `{"base":"<sha>","override":"...","density":"...","heat":"..."}`.
|
|
144
|
-
* Used to find which noise channel diverges from CS for AQU-A.
|
|
145
|
-
*/
|
|
146
|
-
export function debug_dump_noise_channel_hashes(coordinate: string): string;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Per-TC backwall lookup tag inspector. For each spawn_backwall TC,
|
|
150
|
-
* dumps: node_type, tags, biome_tag found, derived band name, and
|
|
151
|
-
* whether the lookup resolves in base or DLC-scoped form.
|
|
152
|
-
* Bisect tool for "Reef/Abyss backwall stamps never fire" findings.
|
|
153
|
-
*/
|
|
154
|
-
export function debug_dump_noise_channels(coordinate: string, world_idx: number): string;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Dump `placed_templates` (template name + cluster-space anchor cell)
|
|
158
|
-
* per world for one coordinate. Returns
|
|
159
|
-
* `{"worlds":[{"name":..,"placed":[[name,x,y],...]},...]}`.
|
|
160
|
-
*/
|
|
161
|
-
export function debug_dump_placed_templates(coordinate: string): string;
|
|
162
|
-
|
|
163
|
-
export function debug_dump_tc_backwall_lookup(coordinate: string, world_idx: number): string;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Dump the U59 backwall layer for one world of a coordinate.
|
|
167
|
-
*
|
|
168
|
-
* Returns JSON:
|
|
169
|
-
* ```json
|
|
170
|
-
* {
|
|
171
|
-
* "world_name": "...", "width": w, "height": h,
|
|
172
|
-
* "spawn_backwall_tc_count": N,
|
|
173
|
-
* "total_tc_count": M,
|
|
174
|
-
* "backwall_histogram": { "Vacuum": k, "Coquina": k, ... },
|
|
175
|
-
* "samples_by_tc": [
|
|
176
|
-
* {"tc_idx": i, "node_type": "...", "biome_tag": "...",
|
|
177
|
-
* "all_cells_count": n, "spawn_backwall": true|false,
|
|
178
|
-
* "sample_cells": [{"cell": idx, "element": "...", "mass": f, "temp": f}, ...]}
|
|
179
|
-
* ]
|
|
180
|
-
* }
|
|
181
|
-
* ```
|
|
182
|
-
* Sampling: up to `max_tc_samples` TCs whose `spawn_backwall=true` are
|
|
183
|
-
* shown; for each, up to 5 random cells (deterministic seed = tc_idx)
|
|
184
|
-
* Dump raw backwall_noise samples + per-cell backwall element
|
|
185
|
-
* for selected TCs. Filters cells to `available_terrain_points`
|
|
186
|
-
* (the actually-stamped set), so reports the TRUE noise / element
|
|
187
|
-
* distribution rather than the broader polygon containment set
|
|
188
|
-
* that the prior vibe check used.
|
|
189
|
-
*/
|
|
190
|
-
export function debug_dump_tc_backwall_noise(coordinate: string, world_idx: number, target_biome: string): string;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Dump TC properties for parity diff. Returns per-TC type, position,
|
|
194
|
-
* poly vertices (hex bits), all_cells count, available_terrain count.
|
|
195
|
-
*/
|
|
196
|
-
export function debug_dump_tc_details(coordinate: string, world_idx: number): string;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Dump per-TC RNG states for one coordinate. Each entry mirrors CS
|
|
200
|
-
* rng_trace format: (pre_inext, pre_inextp, pre_seed, post_inext,
|
|
201
|
-
* post_inextp, post_seed) per terrain cell. Used to localize the first
|
|
202
|
-
* TC where RNG state diverges from CS.
|
|
203
|
-
*/
|
|
204
|
-
export function debug_dump_tc_rng_states(coordinate: string): string;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Dump raw `mob_spawns` for one world of a coordinate, as JSON
|
|
208
|
-
* `{template:[{cell,tag,...},...], ambient:[...], world_name, width, height}`.
|
|
209
|
-
* Debug-only — used to localize the V-AQU w[0] +1000 ambient mob delta.
|
|
210
|
-
*/
|
|
211
|
-
export function debug_dump_world_mobs(coordinate: string, world_idx: number): string;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Diagnostic: return the current SETTINGS.element_overrides as JSON.
|
|
215
|
-
* Lets callers verify a `snapshot_*` push actually landed in the
|
|
216
|
-
* thread-local cache before invoking a `generate_*` / digest call.
|
|
217
|
-
* Gated behind the `debug` feature so production builds stay slim.
|
|
218
|
-
*/
|
|
219
|
-
export function debug_settings_element_overrides(): string;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Drain the per-thread debug-capture buffer populated by
|
|
223
|
-
* instrumented points in `oni-worldgen`. Returns the accumulated
|
|
224
|
-
* lines as a single newline-separated string and empties the
|
|
225
|
-
* buffer. Pair with `compute_digest_for_cluster` or
|
|
226
|
-
* `dump_tc_polys_for_cluster` to capture intermediate state during
|
|
227
|
-
* worldgen.
|
|
228
|
-
*/
|
|
229
|
-
export function drain_debug_capture(): string;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Diagnostic: dump the cluster layout's world placements as seen by
|
|
233
|
-
* Rust after snapshot merge. Used to verify CGM augmentations
|
|
234
|
-
* (sizeMultiplier, forcedWorldTraits, etc) survived the JSON
|
|
235
|
-
* round-trip into Rust's `WorldPlacement` struct.
|
|
236
|
-
*/
|
|
237
|
-
export function dump_cluster_placements(cluster_id: string): string;
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Diagnostic: dump every terrain cell's polygon vertices. Returns a
|
|
241
|
-
* JSON object `{ site_id: [[vx_hex, vy_hex], ...], ... }` so the
|
|
242
|
-
* mod-parity scripts can diff per-cell polygons against the CS
|
|
243
|
-
* snapshot. Pairs with `dump_tc_positions_for_cluster` for full
|
|
244
|
-
* per-cell geometry diff.
|
|
245
|
-
*/
|
|
246
|
-
export function dump_tc_polys_for_cluster(coordinate: string, cluster_id: string, seed: number, world_idx: number): string;
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Diagnostic: dump every terrain cell's site_id + node_type +
|
|
250
|
-
* polygon centroid (raw bits) for a generated cluster. Lets the
|
|
251
|
-
* mod-parity scripts diff per-cell positions directly against the
|
|
252
|
-
* CS snapshot's `tc_positions` field when only `tc_positions_sha`
|
|
253
|
-
* fails. Output is a JSON array of "site_id,node_type,cx_hex,cy_hex"
|
|
254
|
-
* strings sorted by site_id (matching the digest hash input).
|
|
255
|
-
*/
|
|
256
|
-
export function dump_tc_positions_for_cluster(coordinate: string, cluster_id: string, seed: number, world_idx: number): string;
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Diagnostic: dump every terrain cell's node_type for a given world
|
|
260
|
-
* in a CGM-style pipeline run. Comparing direct vs pipeline output
|
|
261
|
-
* reveals whether the divergence is in subworld assignment (upstream
|
|
262
|
-
* of element bands) or in element-band sampling (downstream).
|
|
263
|
-
*/
|
|
264
|
-
export function dump_terrain_cell_node_types(cluster_id: string, seed: number, world_idx: number, coordinate: string): string;
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Diagnostic: compute f32 transcendentals on a list of test inputs and
|
|
268
|
-
* dump the bit patterns. Used to confirm wasm32 libm vs x86 ucrt have
|
|
269
|
-
* different f32::ln/f32::exp outputs (suspected root of OASIS W1
|
|
270
|
-
* thermal divergence).
|
|
271
|
-
*/
|
|
272
|
-
export function dump_transcendental_test(): string;
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Diagnostic: dump per-cell element_idx + mass-bits + temp-bits for
|
|
276
|
-
* one world's `sim_cells`. Used to find the FIRST concretely-different
|
|
277
|
-
* cell when a digest hash diverges. Output is TSV (idx, elem_idx,
|
|
278
|
-
* mass_bits, temp_bits) — bits so f32s round-trip exactly through JSON.
|
|
279
|
-
*/
|
|
280
|
-
export function dump_world_cells(coordinate: string, cluster_id: string, seed: number, mode: string, world_idx: number, overrides_json: string): string;
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Dump cell state after exactly N settle ticks for a specific world.
|
|
284
|
-
* Used to bisect wasm-vs-native f32 divergence at tick granularity.
|
|
285
|
-
*/
|
|
286
|
-
export function dump_world_cells_at_tick(coordinate: string, world_idx: number, target_tick: number): string;
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Dump post-settle cell-state for a specific world (debug feature).
|
|
290
|
-
*
|
|
291
|
-
* Returns NDJSON-like JSON `{ "world_index": N, "width": W, "height": H,
|
|
292
|
-
* "element_idx": [Rust idx per cell], "element_names": [Rust ELEMENTS],
|
|
293
|
-
* "mass_hex": ["%08X" per cell, BE digit order],
|
|
294
|
-
* "temp_hex": ["%08X" per cell, BE digit order] }`.
|
|
295
|
-
*
|
|
296
|
-
* Mirrors `compute_digest_from_coordinate` setup so the post-settle
|
|
297
|
-
* state is identical to what the digest hashes — enables cell-by-cell
|
|
298
|
-
* diff between WASM and native, which is the diagnostic needed to
|
|
299
|
-
* hunt the OASIS W1 wasm-vs-native settle divergence (May 2026).
|
|
300
|
-
* Variant of [`dump_world_cells_settled`] that takes the cluster id +
|
|
301
|
-
* seed directly instead of going through `parse_coordinate`. Mirrors
|
|
302
|
-
* `compute_digest_for_cluster` — required when the coordinate prefix
|
|
303
|
-
* is ambiguous across mod clusters (e.g. CGSM has 3 clusters at
|
|
304
|
-
* `CGSM-C`).
|
|
305
|
-
*/
|
|
306
|
-
export function dump_world_cells_for_cluster(cluster_id: string, seed: number, world_idx: number): string;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Variant that ALSO sets story / mixing levels from a coordinate
|
|
310
|
-
* string (matching the `compute_digest_for_cluster` semantics). Use
|
|
311
|
-
* when you want the dump to reflect the same worldgen pass the
|
|
312
|
-
* digest is computed against.
|
|
313
|
-
*/
|
|
314
|
-
export function dump_world_cells_for_cluster_coord(cluster_id: string, seed: number, world_idx: number, coordinate: string): string;
|
|
315
|
-
|
|
316
|
-
export function dump_world_cells_settled(coordinate: string, world_idx: number): string;
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Diagnostic: dump per-TC info (node_id, position, node_type, tags)
|
|
320
|
-
* for one world. Used to detect per-overworld-cell subworld-assignment
|
|
321
|
-
* drift when `ow_types_sha` matches (set/count) but actual placement
|
|
322
|
-
* differs.
|
|
323
|
-
*/
|
|
324
|
-
export function dump_world_tcs(coordinate: string, cluster_id: string, seed: number, mode: string, world_idx: number): string;
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Diagnostic: dump per-world traits + subworld files for a generated
|
|
328
|
-
* cluster. Used to debug `world_traits_sha` / `subworld_files_sha`
|
|
329
|
-
* divergence — once a digest hash diverges, this tells you the
|
|
330
|
-
* actual content difference.
|
|
331
|
-
*/
|
|
332
|
-
export function dump_world_traits(coordinate: string, cluster_id: string, seed: number, mode: string): string;
|
|
333
|
-
|
|
334
9
|
/**
|
|
335
10
|
* Evaluate a noise tree over a `width × height` 2D grid and return
|
|
336
11
|
* one `f32` per cell, row-major (`y * width + x`). Values are
|
|
@@ -348,43 +23,6 @@ export function dump_world_traits(coordinate: string, cluster_id: string, seed:
|
|
|
348
23
|
*/
|
|
349
24
|
export function evaluate_noise(tree_kind: string, tree_value: string, width: number, height: number, seed: number): Float32Array;
|
|
350
25
|
|
|
351
|
-
/**
|
|
352
|
-
* Extract the parts of a generated cluster's state that mod
|
|
353
|
-
* extensions (CGM and equivalents) need to compute post-snapshot
|
|
354
|
-
* overrides. Companion to [`compute_digest_with_overrides`].
|
|
355
|
-
*
|
|
356
|
-
* Mod-extensions consume this snapshot, compute structured
|
|
357
|
-
* mutations (e.g. CGM's geyser blacklist re-rolls, SO_POI pins,
|
|
358
|
-
* vanilla-starmap replacements) in TS, then pass the resulting
|
|
359
|
-
* `overrides_json` back to [`compute_digest_with_overrides`] to
|
|
360
|
-
* fold them into the digest.
|
|
361
|
-
*
|
|
362
|
-
* Schema (JSON):
|
|
363
|
-
* ```json
|
|
364
|
-
* {
|
|
365
|
-
* "globalWorldSeed": 1000824071,
|
|
366
|
-
* "isExpansion1": true,
|
|
367
|
-
* "worlds": [
|
|
368
|
-
* { "placementIndex": 0, "offsetX": 0, "offsetY": 0,
|
|
369
|
-
* "worldWidth": 96, "clusterLocation": { "q": 0, "r": 0 },
|
|
370
|
-
* "entitySpawners": [
|
|
371
|
-
* { "tag": "GeyserGeneric", "cell": 100,
|
|
372
|
-
* "resolvedGeyserTemplate": "hot_water" }
|
|
373
|
-
* ]
|
|
374
|
-
* }
|
|
375
|
-
* ],
|
|
376
|
-
* "poiLocations": [
|
|
377
|
-
* { "poiType": "HarvestableSpacePOI_X", "location": { "q": 5, "r": 5 } }
|
|
378
|
-
* ],
|
|
379
|
-
* "vanillaDestinations": [ { "destType": "...", "distance": 0 } ]
|
|
380
|
-
* }
|
|
381
|
-
* ```
|
|
382
|
-
*
|
|
383
|
-
* The schema is the symmetric input to the TS `Snapshot` interface
|
|
384
|
-
* in `packages/oxygen-not-included-mod-extensions/src/cgm/transformer.ts`.
|
|
385
|
-
*/
|
|
386
|
-
export function extract_overrideable_state(coordinate: string, cluster_id: string, seed: number, mode: string): string;
|
|
387
|
-
|
|
388
26
|
/**
|
|
389
27
|
* The ONI game build this WASM was parity-baselined against (e.g.
|
|
390
28
|
* `"737195"`).
|
|
@@ -405,13 +43,6 @@ export function generate_cluster(seed: number, cluster_id: string): string;
|
|
|
405
43
|
*/
|
|
406
44
|
export function generate_cluster_cells(seed: number, cluster_id: string): string;
|
|
407
45
|
|
|
408
|
-
/**
|
|
409
|
-
* Generate a cluster and return the rendered SimCell grid for each world.
|
|
410
|
-
* Returns JSON with element_idx, mass_hex, temp_hex, disease_idx, disease_count arrays.
|
|
411
|
-
* This is the same data format as the C# snapshot for parity verification.
|
|
412
|
-
*/
|
|
413
|
-
export function generate_cluster_rendered(seed: number, cluster_id: string): string;
|
|
414
|
-
|
|
415
46
|
/**
|
|
416
47
|
* Generate a cluster with provided cluster YAML config override.
|
|
417
48
|
*/
|
|
@@ -443,28 +74,6 @@ export function generate_layout_cells(seed: number, cluster_id: string): string;
|
|
|
443
74
|
*/
|
|
444
75
|
export function generate_map_data(coordinate: string): any;
|
|
445
76
|
|
|
446
|
-
/**
|
|
447
|
-
* Generate a cluster from coordinate and return per-world element grids.
|
|
448
|
-
* Used for parity verification against C# snapshots.
|
|
449
|
-
*/
|
|
450
|
-
export function generate_rendered_from_coordinate(coordinate: string): string;
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* Generate a single SandstoneDefault world and return timing + cell count data.
|
|
454
|
-
*/
|
|
455
|
-
export function generate_sandstone_default(seed: number): string;
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* Generate terrain cells for the starting world and return as JSON.
|
|
459
|
-
* Used to verify WASM vs native parity.
|
|
460
|
-
*/
|
|
461
|
-
export function generate_terrain_cells(seed: number, cluster_id: string): string;
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Generate a VanillaSandstoneCluster (8-world DLC cluster) and return timing + cell count data.
|
|
465
|
-
*/
|
|
466
|
-
export function generate_vanilla_sandstone_cluster(seed: number): string;
|
|
467
|
-
|
|
468
77
|
/**
|
|
469
78
|
* Re-run ambient mob spawning against the cached cluster's current
|
|
470
79
|
* cell state and return the refreshed entity lists. Call after
|
|
@@ -486,27 +95,23 @@ export function initThreadPool(num_threads: number): Promise<any>;
|
|
|
486
95
|
export function noise_node_kinds(): string;
|
|
487
96
|
|
|
488
97
|
/**
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
* Diagnostic: dump cache.subworlds in its raw HashMap iteration
|
|
505
|
-
* order (NOT sorted), with each subworld's JSON. Used to detect
|
|
506
|
-
* HashMap iteration-order drift that's invisible to sorted-key
|
|
507
|
-
* fingerprints.
|
|
98
|
+
* Partial worldgen: generate only the selected worlds of a cluster.
|
|
99
|
+
* Cluster-level pre-passes (mixing, trait selection) run over every
|
|
100
|
+
* placement; per-world phases run only for the selected slots.
|
|
101
|
+
* Stateless; does not touch `CLUSTER_CACHE`.
|
|
102
|
+
*
|
|
103
|
+
* Geyser output matches a full generate exactly, and each world
|
|
104
|
+
* carries the digest-format geyser hashes. Verified element-wise by
|
|
105
|
+
* `tests/partial_parity.rs` and against the digest corpus by
|
|
106
|
+
* `scripts/partials_geyser_verify.mjs`.
|
|
107
|
+
*
|
|
108
|
+
* Story-trait templates and starmap locations are never produced;
|
|
109
|
+
* both depend on cross-world state a partial run lacks. Stock story
|
|
110
|
+
* traits carry no geysers, so geyser output is unaffected. Cell
|
|
111
|
+
* grids are pre-settle, as with `generate`; there is no partial
|
|
112
|
+
* settle (use `generate` + `advance` for settled state).
|
|
508
113
|
*/
|
|
509
|
-
export function
|
|
114
|
+
export function partials_from_coordinate(coordinate: string, options_json: string): string;
|
|
510
115
|
|
|
511
116
|
/**
|
|
512
117
|
* Toggle template placement. WASM-side counterpart of the native
|
|
@@ -514,14 +119,6 @@ export function probe_subworlds_iteration_order_hash(): string;
|
|
|
514
119
|
*/
|
|
515
120
|
export function set_skip_templates(skip: boolean): void;
|
|
516
121
|
|
|
517
|
-
/**
|
|
518
|
-
* Toggle the per-thread oni-voronoi debug-capture flag. Off by
|
|
519
|
-
* default so production hot paths don't pay for the per-iteration
|
|
520
|
-
* trace. Mod-parity diff scripts flip this on around the worldgen
|
|
521
|
-
* call.
|
|
522
|
-
*/
|
|
523
|
-
export function set_voronoi_debug_capture(enabled: boolean): void;
|
|
524
|
-
|
|
525
122
|
/**
|
|
526
123
|
* Drop both the SettingsCache and the cluster cache. The next
|
|
527
124
|
* `generate_*` call reloads the embedded stock defaults.
|
|
@@ -697,23 +294,6 @@ export function snapshot_state_version(): number;
|
|
|
697
294
|
*/
|
|
698
295
|
export function snapshot_to_files(snapshot_json: string): string;
|
|
699
296
|
|
|
700
|
-
/**
|
|
701
|
-
* Drain the thermal pair trace buffer (one entry per pair-fire).
|
|
702
|
-
*/
|
|
703
|
-
export function take_thermal_pair_trace(): string;
|
|
704
|
-
|
|
705
|
-
/**
|
|
706
|
-
* Diagnostic: test f64::cos / f64::sin for a specific input. Used
|
|
707
|
-
* to verify WASM precision against native Rust + system libm.
|
|
708
|
-
*/
|
|
709
|
-
export function test_cos_sin(angle_bits: bigint): string;
|
|
710
|
-
|
|
711
|
-
/**
|
|
712
|
-
* Diagnostic: ucrt-port logf on a JSON list of input bit patterns.
|
|
713
|
-
* Returns per-input output bit pattern for cross-platform verification.
|
|
714
|
-
*/
|
|
715
|
-
export function ucrt_logf_batch(input_bits_json: string): string;
|
|
716
|
-
|
|
717
297
|
export class wbg_rayon_PoolBuilder {
|
|
718
298
|
private constructor();
|
|
719
299
|
free(): void;
|
|
@@ -728,57 +308,18 @@ export function wbg_rayon_start_worker(receiver: number): void;
|
|
|
728
308
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
729
309
|
|
|
730
310
|
export interface InitOutput {
|
|
731
|
-
readonly bench_cluster_phases: (a: number, b: number, c: number) => [number, number];
|
|
732
|
-
readonly bench_profile_dump: () => [number, number];
|
|
733
|
-
readonly compute_digest_for_cluster: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
734
|
-
readonly compute_digest_from_coordinate: (a: number, b: number, c: number, d: number) => [number, number];
|
|
735
|
-
readonly compute_digest_with_overrides: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
|
|
736
|
-
readonly compute_geyser_stats: (a: number, b: number, c: number) => [number, number];
|
|
737
|
-
readonly debug_dump_backwall_distribution: (a: number, b: number, c: number) => [number, number];
|
|
738
|
-
readonly debug_dump_cluster_pd_seed_state: (a: number, b: number) => [number, number];
|
|
739
|
-
readonly debug_dump_noise_channel_hashes: (a: number, b: number) => [number, number];
|
|
740
|
-
readonly debug_dump_noise_channels: (a: number, b: number, c: number) => [number, number];
|
|
741
|
-
readonly debug_dump_placed_templates: (a: number, b: number) => [number, number];
|
|
742
|
-
readonly debug_dump_tc_backwall_lookup: (a: number, b: number, c: number) => [number, number];
|
|
743
|
-
readonly debug_dump_tc_backwall_noise: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
744
|
-
readonly debug_dump_tc_details: (a: number, b: number, c: number) => [number, number];
|
|
745
|
-
readonly debug_dump_tc_rng_states: (a: number, b: number) => [number, number];
|
|
746
|
-
readonly debug_dump_world_mobs: (a: number, b: number, c: number) => [number, number];
|
|
747
|
-
readonly debug_settings_element_overrides: () => [number, number];
|
|
748
|
-
readonly drain_debug_capture: () => [number, number];
|
|
749
|
-
readonly dump_cluster_placements: (a: number, b: number) => [number, number];
|
|
750
|
-
readonly dump_tc_polys_for_cluster: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
751
|
-
readonly dump_tc_positions_for_cluster: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
752
|
-
readonly dump_terrain_cell_node_types: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
753
|
-
readonly dump_transcendental_test: () => [number, number];
|
|
754
|
-
readonly dump_world_cells: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
|
|
755
|
-
readonly dump_world_cells_at_tick: (a: number, b: number, c: number, d: number) => [number, number];
|
|
756
|
-
readonly dump_world_cells_for_cluster: (a: number, b: number, c: number, d: number) => [number, number];
|
|
757
|
-
readonly dump_world_cells_for_cluster_coord: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
758
|
-
readonly dump_world_cells_settled: (a: number, b: number, c: number) => [number, number];
|
|
759
|
-
readonly dump_world_tcs: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
760
|
-
readonly dump_world_traits: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
761
311
|
readonly evaluate_noise: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
762
|
-
readonly extract_overrideable_state: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
763
312
|
readonly game_version: () => [number, number];
|
|
764
313
|
readonly generate_cluster: (a: number, b: number, c: number) => [number, number];
|
|
765
314
|
readonly generate_cluster_cells: (a: number, b: number, c: number) => [number, number];
|
|
766
|
-
readonly generate_cluster_rendered: (a: number, b: number, c: number) => [number, number];
|
|
767
315
|
readonly generate_cluster_with_configs: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
|
|
768
316
|
readonly generate_from_coordinate: (a: number, b: number) => [number, number];
|
|
769
317
|
readonly generate_layout_cells: (a: number, b: number, c: number) => [number, number];
|
|
770
318
|
readonly generate_map_data: (a: number, b: number) => any;
|
|
771
|
-
readonly generate_rendered_from_coordinate: (a: number, b: number) => [number, number];
|
|
772
|
-
readonly generate_sandstone_default: (a: number) => [number, number];
|
|
773
|
-
readonly generate_terrain_cells: (a: number, b: number, c: number) => [number, number];
|
|
774
|
-
readonly generate_vanilla_sandstone_cluster: (a: number) => [number, number];
|
|
775
319
|
readonly get_entity_spawners: () => [number, number];
|
|
776
320
|
readonly noise_node_kinds: () => [number, number];
|
|
777
|
-
readonly
|
|
778
|
-
readonly probe_subworld_raw_json: (a: number, b: number) => [number, number];
|
|
779
|
-
readonly probe_subworlds_iteration_order_hash: () => [number, number];
|
|
321
|
+
readonly partials_from_coordinate: (a: number, b: number, c: number, d: number) => [number, number];
|
|
780
322
|
readonly set_skip_templates: (a: number) => void;
|
|
781
|
-
readonly set_voronoi_debug_capture: (a: number) => void;
|
|
782
323
|
readonly settings_reset: () => void;
|
|
783
324
|
readonly settle_cluster_advance: (a: number) => [number, number];
|
|
784
325
|
readonly sim_env_drain_log: (a: number, b: number) => [number, number];
|
|
@@ -801,14 +342,9 @@ export interface InitOutput {
|
|
|
801
342
|
readonly snapshot_state_vanilla: () => number;
|
|
802
343
|
readonly snapshot_state_vanilla_extensions: () => number;
|
|
803
344
|
readonly snapshot_to_files: (a: number, b: number) => [number, number, number, number];
|
|
804
|
-
readonly take_thermal_pair_trace: () => [number, number];
|
|
805
|
-
readonly test_cos_sin: (a: bigint) => [number, number];
|
|
806
|
-
readonly ucrt_logf_batch: (a: number, b: number) => [number, number];
|
|
807
|
-
readonly bench_profile_enable: () => void;
|
|
808
345
|
readonly snapshot_checksum_canonical: (a: number, b: number) => [number, number, number, number];
|
|
809
|
-
readonly clear_cluster_cache: () => void;
|
|
810
346
|
readonly snapshot_state_version: () => number;
|
|
811
|
-
readonly
|
|
347
|
+
readonly clear_cluster_cache: () => void;
|
|
812
348
|
readonly __wbg_wbg_rayon_poolbuilder_free: (a: number, b: number) => void;
|
|
813
349
|
readonly initThreadPool: (a: number) => any;
|
|
814
350
|
readonly wbg_rayon_poolbuilder_build: (a: number) => void;
|
|
@@ -821,8 +357,8 @@ export interface InitOutput {
|
|
|
821
357
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
822
358
|
readonly __externref_table_alloc: () => number;
|
|
823
359
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
824
|
-
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
825
360
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
361
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
826
362
|
readonly __wbindgen_thread_destroy: (a?: number, b?: number, c?: number) => void;
|
|
827
363
|
readonly __wbindgen_start: (a: number) => void;
|
|
828
364
|
}
|