@shieldbattery/broodmap 0.0.0-stage → 0.2.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.
@@ -0,0 +1,565 @@
1
+ /// <reference lib="esnext.disposable" />
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ /** Sync access to a SC:R install's files, for `CascStorage`. Paths are relative to the install. */
6
+ export interface CascFiles {
7
+ open(path: string): unknown;
8
+ size(handle: unknown): number;
9
+ read(handle: unknown, buffer: Uint8Array, position: number): number;
10
+ close(handle: unknown): void;
11
+ listDir(path: string): string[];
12
+ }
13
+
14
+ /** Options for `CascStorage`, passed as JSON. */
15
+ export interface CascStorageOptions {
16
+ cacheBytes?: number;
17
+ }
18
+
19
+
20
+
21
+ /** The JSON `summarizeMapJson` and `MapRenderer.summaryJson` return. See the README. */
22
+ export interface MapSummary {
23
+ name: string | null;
24
+ description: string | null;
25
+ width: number;
26
+ height: number;
27
+ tileset: number;
28
+ stringEncoding: "utf8" | "utf8-cp949" | "utf8-cp1252" | "cp949" | "cp1252";
29
+ players: MapSlotSummary[];
30
+ forces: MapForceSummary[];
31
+ usesEud: boolean;
32
+ triggerActionKinds: string[];
33
+ triggerCount: number;
34
+ placedUnits: number;
35
+ playerUnits: number;
36
+ startLocations: number;
37
+ }
38
+
39
+ export interface MapSlotSummary {
40
+ controller: number;
41
+ race: number;
42
+ force: number;
43
+ }
44
+
45
+ export interface MapForceSummary {
46
+ name: string | null;
47
+ }
48
+
49
+ /** Overrides of broodmap's default resource limits, passed as JSON when parsing a map. */
50
+ export interface MapLimitOptions {
51
+ maxMapBytes?: number;
52
+ maxMpqFileBytes?: number;
53
+ maxChkBytes?: number;
54
+ maxMergedChunkBytes?: number;
55
+ }
56
+
57
+
58
+
59
+ /**
60
+ * Owned terrain-only components and evidence for the supplied boundary spans.
61
+ * Labels remain valid after the source analysis is freed or its obstacle mode changes.
62
+ */
63
+ export class AreaSnapshot {
64
+ private constructor();
65
+ free(): void;
66
+ [Symbol.dispose](): void;
67
+ /**
68
+ * Returns an owned row-major Uint32Array: zero for blocked terrain, positive component IDs
69
+ * for every original walkable cell. Spans remove graph crossings, not cells.
70
+ */
71
+ labels(): Uint32Array;
72
+ /**
73
+ * Per-component cell counts and per-input-span effects with all supplied cuts applied.
74
+ * A separating edge count is not evidence that this span alone disconnects the terrain.
75
+ */
76
+ metadataJson(): string;
77
+ }
78
+
79
+ /**
80
+ * Incremental terrain-only topology. Owns its grid; dropping/freeing cancels unfinished work.
81
+ */
82
+ export class BaseTopologyJob {
83
+ private constructor();
84
+ free(): void;
85
+ [Symbol.dispose](): void;
86
+ /**
87
+ * Prepares clearance or executes one origin/consolidation pass. No hard CPU-time budget.
88
+ * Returns completion status; completed jobs can be advanced again without changing results.
89
+ */
90
+ advance(): boolean;
91
+ /**
92
+ * Owned final labels; errors before successful completion, including after any failed step.
93
+ */
94
+ labels(): Uint32Array;
95
+ metadataJson(): string;
96
+ progressJson(): string;
97
+ }
98
+
99
+ /**
100
+ * A SC:R install's CASC storage, read through host-provided file callbacks. Pass it to
101
+ * `MapRenderer.loadAssets` in place of the `requiredAssets`/`addAsset` prefetch.
102
+ *
103
+ * `files` provides sync access to the install directory (the one containing `.build.info`).
104
+ * Paths are relative to it and use `/` separators:
105
+ *
106
+ * - `open(path)`: opens a file for reading and returns any handle value; throws if it can't.
107
+ * - `size(handle)`: the file's length in bytes.
108
+ * - `read(handle, buffer, position)`: reads up to `buffer.length` bytes at `position` into the
109
+ * `Uint8Array` `buffer`, returning how many were read (0 only at end of file).
110
+ * - `close(handle)`: closes a handle `open` returned.
111
+ * - `listDir(path)`: the names of the entries in a directory, or `[]` if it doesn't exist.
112
+ *
113
+ * In Node these map one to one onto `fs.openSync`, `fs.fstatSync(fd).size`, `fs.readSync`,
114
+ * `fs.closeSync` and `fs.readdirSync`. Every callback is called with `files` as `this`. `read`'s
115
+ * `buffer` is a view of WASM memory that's filled in place, so the callbacks must not call back
116
+ * into this module.
117
+ *
118
+ * `options` is optional `CascStorageOptions` JSON: `{ "cacheBytes": 134217728 }` bounds the
119
+ * shared cache of decoded assets (least recently used are evicted first; 0 disables caching).
120
+ *
121
+ * Data archives stay open until the storage is freed (`free()`).
122
+ */
123
+ export class CascStorage {
124
+ free(): void;
125
+ [Symbol.dispose](): void;
126
+ /**
127
+ * Opens the storage, reading the install's build info, indices, encoding table and root
128
+ * catalog (a few MB). Throws if `files` lacks a callback or the directory isn't a readable
129
+ * SC:R install.
130
+ */
131
+ constructor(files: CascFiles, options?: string | null);
132
+ /**
133
+ * The total size of the decoded assets currently cached.
134
+ */
135
+ readonly cachedBytes: number;
136
+ /**
137
+ * The install's game version from its build info (e.g. `"1.23.10.13515"`), if recorded.
138
+ * Useful in cache keys for rendered images, since a game patch can change the assets.
139
+ */
140
+ readonly version: string | undefined;
141
+ }
142
+
143
+ /**
144
+ * A parsed map plus the assets fed to it so far. See the module docs for the prefetch/render
145
+ * flow.
146
+ */
147
+ export class MapRenderer {
148
+ free(): void;
149
+ [Symbol.dispose](): void;
150
+ /**
151
+ * Feeds one fetched asset back in, keyed by the CASC path `requiredAssets`/
152
+ * `requiredGraphics` returned. Unknown paths are an error (they'd silently never be read).
153
+ */
154
+ addAsset(casc_path: string, bytes: Uint8Array): void;
155
+ /**
156
+ * Resolves terrain and initial static melee obstacles from UNIT/THG2.
157
+ * Caller-supplied units.dat defines collision bounds; no artwork is needed.
158
+ * Neutral buildings and resources block routes by default. This is a conservative
159
+ * 8-pixel approximation, not a simulation of moving units or destruction. Missing UNIT
160
+ * or THG2 chunks contribute no objects. Their parsers are permissive: incomplete trailing
161
+ * records are ignored, and obstacleCount is not a map-integrity check.
162
+ */
163
+ analyzeMap(cv5: Uint8Array, vf4: Uint8Array, units: Uint8Array): TerrainAnalysis;
164
+ /**
165
+ * Resolves terrain without loading any artwork or unit data. The returned snapshot
166
+ * owns its grid and remains valid independently of this renderer and its asset cache.
167
+ * Missing tile references and incomplete table records are errors: analysis must not
168
+ * silently turn absent terrain metadata into traversable ground.
169
+ */
170
+ analyzeTerrain(cv5: Uint8Array, vf4: Uint8Array): TerrainAnalysis;
171
+ /**
172
+ * Loads every asset a render under `options` needs straight from `storage`, in place of
173
+ * the `requiredAssets`/`requiredGraphics`/`addAsset` prefetch. Returns the CASC paths of
174
+ * art assets the install doesn't have: those drawables degrade and the render still
175
+ * succeeds. Throws if a base asset (tileset or `.dat` table) is missing or any read fails.
176
+ */
177
+ loadAssets(storage: CascStorage, options: string): string[];
178
+ /**
179
+ * Renders the zero-asset minimap and encodes it as a PNG.
180
+ */
181
+ minimapPng(options: string): Uint8Array;
182
+ /**
183
+ * Renders the zero-asset minimap to RGBA pixels. Needs no assets at all; if round 1's
184
+ * `.dat` tables happen to be loaded they refine dot sizing and melee filtering.
185
+ */
186
+ minimapRgba(options: string): RenderedImage;
187
+ /**
188
+ * Parses a `.scm`/`.scx` map file (MPQ + CHK). `options` is optional `MapLimitOptions` JSON
189
+ * overriding broodmap's default resource limits.
190
+ */
191
+ constructor(map_bytes: Uint8Array, options?: string | null);
192
+ /**
193
+ * Builds the render plan (the decide/draw split — see `broodmap-render`'s `plan` module)
194
+ * as JSON, for external executors like a GPU renderer. Requires round 1's assets.
195
+ */
196
+ planJson(options: string): string;
197
+ /**
198
+ * Renders the map preview and encodes it as a PNG.
199
+ */
200
+ renderPng(options: string): Uint8Array;
201
+ /**
202
+ * Renders the map preview to RGBA pixels.
203
+ */
204
+ renderRgba(options: string): RenderedImage;
205
+ /**
206
+ * The CV5 and VF4 paths, in that order. Fetch these and pass their bytes to
207
+ * `analyzeTerrain`; they do not need to be registered with `addAsset`.
208
+ */
209
+ requiredAnalysisAssets(): string[];
210
+ /**
211
+ * Round 1 of the prefetch: the CASC paths of the base assets (tileset tables + `.dat`
212
+ * tables) this map needs under `options`. Fetch and [`add_asset`](Self::add_asset) all of
213
+ * them before calling [`required_graphics`](Self::required_graphics).
214
+ */
215
+ requiredAssets(options: string): string[];
216
+ /**
217
+ * Round 2 of the prefetch: the CASC paths of the art assets (anims, SD canvas GRPs) the
218
+ * map's units and sprites need under `options`. Requires round 1's tables to already be
219
+ * added. A path that fails to fetch can simply be skipped — that one drawable degrades,
220
+ * the render still succeeds.
221
+ */
222
+ requiredGraphics(options: string): string[];
223
+ /**
224
+ * CV5, VF4, and units.dat, in that order, for `analyzeMap`.
225
+ */
226
+ requiredMapAnalysisAssets(): string[];
227
+ /**
228
+ * The map's scenario facts as a JSON `MapSummary`, like `summarizeMapJson`.
229
+ */
230
+ summaryJson(): string;
231
+ /**
232
+ * Map height in tiles (0 if the map has no readable terrain).
233
+ */
234
+ readonly heightTiles: number;
235
+ /**
236
+ * Map width in tiles (0 if the map has no readable terrain).
237
+ */
238
+ readonly widthTiles: number;
239
+ }
240
+
241
+ /**
242
+ * An immutable region result detached from its source [`TerrainAnalysis`] snapshot.
243
+ *
244
+ * Labels are row-major 8-pixel walk cells. Zero denotes blocked terrain; positive labels are
245
+ * one-based region IDs. Passages describe one representative connection per adjacent region pair.
246
+ */
247
+ export class RegionSnapshot {
248
+ private constructor();
249
+ free(): void;
250
+ [Symbol.dispose](): void;
251
+ /**
252
+ * Returns an independently owned row-major `Uint32Array` of region labels.
253
+ *
254
+ * Zero is blocked terrain; region IDs begin at one and correspond to `metadataJson` entries.
255
+ */
256
+ labels(): Uint32Array;
257
+ /**
258
+ * Serializes compact region and passage metadata, without duplicating the full label buffer.
259
+ */
260
+ metadataJson(): string;
261
+ }
262
+
263
+ /**
264
+ * A rendered RGBA image, ready for `new ImageData(new Uint8ClampedArray(data), width, height)`.
265
+ */
266
+ export class RenderedImage {
267
+ private constructor();
268
+ free(): void;
269
+ [Symbol.dispose](): void;
270
+ /**
271
+ * The RGBA8 pixels, row-major (copies out of WASM memory).
272
+ */
273
+ readonly data: Uint8Array;
274
+ readonly height: number;
275
+ /**
276
+ * Non-fatal notes about things the render skipped.
277
+ */
278
+ readonly warnings: string[];
279
+ readonly width: number;
280
+ }
281
+
282
+ /**
283
+ * An 8-pixel point-movement snapshot, optionally including initial static melee obstacles.
284
+ * Moving units and mover size are not represented. This does not certify engine pathing or walls.
285
+ */
286
+ export class TerrainAnalysis {
287
+ private constructor();
288
+ free(): void;
289
+ [Symbol.dispose](): void;
290
+ /**
291
+ * Computes clearance-derived regions for the currently active terrain/obstacle grid.
292
+ *
293
+ * `minProminencePixels` must be from 8 through 4096. An omitted
294
+ * `minRelativeProminencePercent` uses the core default of 40; supplied values must be from 0
295
+ * through 100. The returned result owns its labels and metadata, so it remains valid after
296
+ * this analysis snapshot is freed or its obstacle toggle changes. Regions are a static
297
+ * square-clearance graph, not unit-fit or engine pathing data.
298
+ */
299
+ analyzeRegions(min_prominence_pixels: number, min_relative_prominence_percent?: number | null): RegionSnapshot;
300
+ /**
301
+ * Ground and air distances between the selected candidates' near-center walk anchors.
302
+ * Respects the current obstacle toggle. Hypothetical depots are not added as obstacles.
303
+ * Disconnected bases return null ground distance; undiscovered/out-of-range IDs are errors.
304
+ */
305
+ baseRouteJson(start_id: number, end_id: number): string;
306
+ /**
307
+ * Starts reusable map-wide analysis from JSON [{id,routeAnchor:[walkX,walkY]|null}].
308
+ * At most 256 unique IDs and 32KiB JSON. Uses terrain alone, independent of obstacle mode.
309
+ * A missing routeAnchor is skipped like null. Advance between event-loop yields;
310
+ * completion is required for results.
311
+ */
312
+ beginBaseTopology(bases_json: string, min_widening_percent?: number | null): BaseTopologyJob;
313
+ /**
314
+ * Row-major bytes: bit 0 walkable, bit 1 CV5 terrain-buildability hint,
315
+ * bit 2 ramp, bits 3..4 minitile elevation (0..2), bit 5 terrain cell obstructed by a
316
+ * static map object (retained even when objects are ignored). Bit 0 respects the current
317
+ * obstacle toggle. Buildability excludes occupancy,
318
+ * footprint, creep/power, resources, and other placement restrictions.
319
+ */
320
+ cellFlags(): Uint8Array;
321
+ /**
322
+ * Check proposed building rectangles and mover passage in an explicitly bounded pixel window.
323
+ * Uses original terrain plus exact static object rectangles when the obstacle toggle is enabled.
324
+ * Static placement checks omit race rules, power, creep, resource spacing, and dynamic state.
325
+ * A blocked result is local to this window and model, not a certified game wall.
326
+ */
327
+ checkWallJson(query_json: string): string;
328
+ /**
329
+ * Row-major logical-pixel radii of empty, axis-aligned squares centered on walk cells.
330
+ * Blocked cells are zero; walkable cells adjacent to a blocker or map edge are 4px.
331
+ * Values follow the obstacle toggle and include the map boundary. This is a square
332
+ * (Chebyshev) distance measure of the raster, not Euclidean distance, corridor width,
333
+ * or proof that a StarCraft unit can pass. The returned buffer is independently owned.
334
+ */
335
+ clearancePixels(): Uint16Array;
336
+ /**
337
+ * Batches up to 256 terrain-only entrance surveys without rebuilding the immutable terrain
338
+ * preparation. Input is JSON `[[[startX,startY],[endX,endY]], ...]` with strict unsigned
339
+ * integer coordinates and a 32 KiB limit. Results preserve input order and use the same
340
+ * objects returned by `entrancesJson`. Aggregate route output is capped at 2,097,152 points.
341
+ * These limits do not bound CPU time: each distinct origin can require a full-grid search.
342
+ * Callers needing responsive cancellation should submit smaller origin groups and yield
343
+ * between synchronous calls. An empty batch returns `[]` without preparing a survey.
344
+ */
345
+ entrancesBatchJson(queries_json: string, min_widening_percent?: number | null): string;
346
+ /**
347
+ * Finds local width transitions along a clearance-favoring route from start to end.
348
+ *
349
+ * Coordinates are 8-pixel walk cells. This always surveys terrain alone, regardless of the
350
+ * obstacle toggle: resources and neutral objects do not define geological entrances.
351
+ * `minWideningPercent` defaults to 25 and accepts integral values from 0 through 200.
352
+ * Candidate centers lie within the first 1024 logical pixels; profiles may look 192px farther.
353
+ * `outwardSampleCount` is 3 normally, or 2 when a late turn excludes the +160px sample.
354
+ * Cross-section endpoints in the JSON are logical pixels; route points are walk cells. Spans
355
+ * are raster approximations, not certified chokepoints, construction legality, unit fit, or
356
+ * shortest movement routes.
357
+ */
358
+ entrancesJson(start_x: number, start_y: number, end_x: number, end_y: number, min_widening_percent?: number | null): string;
359
+ /**
360
+ * Discovers and caches resource-base candidates in a snapshot made by `analyzeMap`.
361
+ * Options: `{depotWidthTiles:4,depotHeightTiles:3,maxMineralBlockerAmount:8}`.
362
+ * Set maxMineralBlockerAmount to null to disallow clearing; unknown amounts never qualify.
363
+ * allowDestructibleClearing and allowStartObstacleClearing default to true.
364
+ * requiredObstacles lists overlapping buildings requiring destruction; startClearedObstacles
365
+ * lists overlaps removed automatically if that exact start is occupied (including invincible ones).
366
+ * Candidate requiredMinerals lists direct placement prerequisites. All objects remain
367
+ * blockers for current route queries; routeAnchor is null if the whole depot area is blocked.
368
+ * IDs are zero-based in top-to-bottom, left-to-right depot order. Discovery always uses
369
+ * the initial static obstacles, independently of the route toggle. This is a heuristic:
370
+ * stock resource IDs, no creep/power or complete placement rules, and no main/natural roles.
371
+ * Unknown options and unsupported inputs fail without replacing the last successful catalog.
372
+ */
373
+ findBasesJson(options_json: string): string;
374
+ /**
375
+ * Partitions terrain alone using up to 256 finite pixel-coordinate spans.
376
+ *
377
+ * Input is JSON `[[[x1,y1],[x2,y2]], ...]`, at most 32 KiB; coordinates must be
378
+ * nonnegative integers within inclusive map edges, and each span must have distinct ends.
379
+ * An empty list returns ordinary terrain components. This does not mutate routing,
380
+ * the base catalog, or obstacle mode, and does not validate wall placement.
381
+ */
382
+ partitionAreas(spans_json: string): AreaSnapshot;
383
+ /**
384
+ * Two wall-contact spans at the ends of each recognized terrain ramp.
385
+ *
386
+ * Always uses the original terrain, independent of obstacle mode. Positions are walk cells;
387
+ * span endpoints and widths are logical pixels. These are elevation/ramp-flag observations,
388
+ * not route-local widening claims or certified movement/building-placement boundaries.
389
+ */
390
+ rampsJson(): string;
391
+ /**
392
+ * Routes between 8-pixel cell centers. Both endpoints must be walkable; they are
393
+ * never silently moved. Points include both endpoints. Disconnected endpoints return
394
+ * an empty point list and null groundDistancePixels. Distances use logical pixels,
395
+ * independent of preview resolution. Ground costs are 8 / 11.312 pixels per step
396
+ * (fixed-point octile approximation), with no diagonal corner cutting.
397
+ */
398
+ routeJson(start_x: number, start_y: number, end_x: number, end_y: number): string;
399
+ /**
400
+ * Choose object-aware routing or the original terrain-only model. Turning this off
401
+ * ignores every obstacle, including invincible buildings; it does not simulate removal.
402
+ */
403
+ setObstaclesEnabled(enabled: boolean): void;
404
+ /**
405
+ * Starts a bounded, resumable search for static wall layouts. Construction prepares terrain
406
+ * and candidates synchronously, so its bounded preprocessing can still occupy one event-loop turn.
407
+ * The job snapshots the selected
408
+ * terrain/obstacle model, so later obstacle-toggle changes do not affect it.
409
+ */
410
+ startWallSearch(query_json: string): WallSearchJob;
411
+ /**
412
+ * Chooses collision-safe walk-cell-center endpoints around a selected entrance. Search query
413
+ * start/end are placeholders here; the explicit entrance controls the direction.
414
+ */
415
+ suggestWallEndpointsJson(query_json: string, entrance_json: string): string;
416
+ /**
417
+ * Returns terrain-only walk-cell connectivity reachable from an entrance near a bounded
418
+ * pixel window. The result is local to the returned rectangle and ignores objects,
419
+ * buildability, and terrain height.
420
+ */
421
+ wallPlacementReachJson(input_json: string): string;
422
+ /**
423
+ * Conventional melee palette with dimensions from the caller's units.dat. Empty for terrain-only snapshots.
424
+ */
425
+ wallProfilesJson(): string;
426
+ readonly heightWalkTiles: number;
427
+ /**
428
+ * Number of static obstacle rectangles identified in this snapshot.
429
+ */
430
+ readonly obstacleCount: number;
431
+ readonly widthWalkTiles: number;
432
+ }
433
+
434
+ /**
435
+ * Incremental bounded wall search. It owns the core search snapshot, so it can safely outlive
436
+ * its TerrainAnalysis creator. Dropping/freeing it abandons unfinished work.
437
+ */
438
+ export class WallSearchJob {
439
+ private constructor();
440
+ free(): void;
441
+ [Symbol.dispose](): void;
442
+ /**
443
+ * Serializes the completed result. Calling this before a terminal step is an error so callers
444
+ * do not accidentally copy route data while reporting progress.
445
+ */
446
+ resultJson(): string;
447
+ /**
448
+ * Advances at most 16 search states. Call between browser event-loop yields.
449
+ * Returns true when a terminal result is available.
450
+ */
451
+ step(max_states: number): boolean;
452
+ readonly exploredStates: number;
453
+ readonly layoutCount: number;
454
+ }
455
+
456
+ /**
457
+ * Summarizes a map file's scenario as a JSON `MapSummary` (see the README for the fields).
458
+ * `options` is optional `MapLimitOptions` JSON raising (or lowering) broodmap's default resource
459
+ * limits. Fails if the file isn't a readable map within those limits, or lacks the scenario name,
460
+ * player or force sections every playable map has. To also render the map, construct a
461
+ * `MapRenderer` and call its `summaryJson()` instead, which parses the map only once.
462
+ */
463
+ export function summarizeMapJson(map_bytes: Uint8Array, options?: string | null): string;
464
+
465
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
466
+
467
+ export interface InitOutput {
468
+ readonly memory: WebAssembly.Memory;
469
+ readonly __wbg_areasnapshot_free: (a: number, b: number) => void;
470
+ readonly __wbg_basetopologyjob_free: (a: number, b: number) => void;
471
+ readonly __wbg_cascstorage_free: (a: number, b: number) => void;
472
+ readonly __wbg_maprenderer_free: (a: number, b: number) => void;
473
+ readonly __wbg_regionsnapshot_free: (a: number, b: number) => void;
474
+ readonly __wbg_renderedimage_free: (a: number, b: number) => void;
475
+ readonly __wbg_terrainanalysis_free: (a: number, b: number) => void;
476
+ readonly __wbg_wallsearchjob_free: (a: number, b: number) => void;
477
+ readonly areasnapshot_labels: (a: number) => [number, number];
478
+ readonly areasnapshot_metadataJson: (a: number) => [number, number, number, number];
479
+ readonly basetopologyjob_advance: (a: number) => [number, number, number];
480
+ readonly basetopologyjob_labels: (a: number) => [number, number, number, number];
481
+ readonly basetopologyjob_metadataJson: (a: number) => [number, number, number, number];
482
+ readonly basetopologyjob_progressJson: (a: number) => [number, number, number, number];
483
+ readonly cascstorage_cachedBytes: (a: number) => number;
484
+ readonly cascstorage_new: (a: any, b: number, c: number) => [number, number, number];
485
+ readonly cascstorage_version: (a: number) => [number, number];
486
+ readonly maprenderer_addAsset: (a: number, b: number, c: number, d: number, e: number) => [number, number];
487
+ readonly maprenderer_analyzeMap: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
488
+ readonly maprenderer_analyzeTerrain: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
489
+ readonly maprenderer_heightTiles: (a: number) => number;
490
+ readonly maprenderer_loadAssets: (a: number, b: number, c: number, d: number) => [number, number, number, number];
491
+ readonly maprenderer_minimapPng: (a: number, b: number, c: number) => [number, number, number, number];
492
+ readonly maprenderer_minimapRgba: (a: number, b: number, c: number) => [number, number, number];
493
+ readonly maprenderer_new: (a: number, b: number, c: number, d: number) => [number, number, number];
494
+ readonly maprenderer_planJson: (a: number, b: number, c: number) => [number, number, number, number];
495
+ readonly maprenderer_renderPng: (a: number, b: number, c: number) => [number, number, number, number];
496
+ readonly maprenderer_renderRgba: (a: number, b: number, c: number) => [number, number, number];
497
+ readonly maprenderer_requiredAnalysisAssets: (a: number) => [number, number];
498
+ readonly maprenderer_requiredAssets: (a: number, b: number, c: number) => [number, number, number, number];
499
+ readonly maprenderer_requiredGraphics: (a: number, b: number, c: number) => [number, number, number, number];
500
+ readonly maprenderer_requiredMapAnalysisAssets: (a: number) => [number, number];
501
+ readonly maprenderer_summaryJson: (a: number) => [number, number, number, number];
502
+ readonly maprenderer_widthTiles: (a: number) => number;
503
+ readonly regionsnapshot_labels: (a: number) => [number, number];
504
+ readonly regionsnapshot_metadataJson: (a: number) => [number, number, number, number];
505
+ readonly renderedimage_data: (a: number) => [number, number];
506
+ readonly renderedimage_height: (a: number) => number;
507
+ readonly renderedimage_warnings: (a: number) => [number, number];
508
+ readonly renderedimage_width: (a: number) => number;
509
+ readonly summarizeMapJson: (a: number, b: number, c: number, d: number) => [number, number, number, number];
510
+ readonly terrainanalysis_analyzeRegions: (a: number, b: number, c: number, d: number) => [number, number, number];
511
+ readonly terrainanalysis_baseRouteJson: (a: number, b: number, c: number) => [number, number, number, number];
512
+ readonly terrainanalysis_beginBaseTopology: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
513
+ readonly terrainanalysis_cellFlags: (a: number) => [number, number];
514
+ readonly terrainanalysis_checkWallJson: (a: number, b: number, c: number) => [number, number, number, number];
515
+ readonly terrainanalysis_clearancePixels: (a: number) => [number, number];
516
+ readonly terrainanalysis_entrancesBatchJson: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
517
+ readonly terrainanalysis_entrancesJson: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
518
+ readonly terrainanalysis_findBasesJson: (a: number, b: number, c: number) => [number, number, number, number];
519
+ readonly terrainanalysis_heightWalkTiles: (a: number) => number;
520
+ readonly terrainanalysis_obstacleCount: (a: number) => number;
521
+ readonly terrainanalysis_partitionAreas: (a: number, b: number, c: number) => [number, number, number];
522
+ readonly terrainanalysis_rampsJson: (a: number) => [number, number, number, number];
523
+ readonly terrainanalysis_routeJson: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
524
+ readonly terrainanalysis_setObstaclesEnabled: (a: number, b: number) => void;
525
+ readonly terrainanalysis_startWallSearch: (a: number, b: number, c: number) => [number, number, number];
526
+ readonly terrainanalysis_suggestWallEndpointsJson: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
527
+ readonly terrainanalysis_wallPlacementReachJson: (a: number, b: number, c: number) => [number, number, number, number];
528
+ readonly terrainanalysis_wallProfilesJson: (a: number) => [number, number, number, number];
529
+ readonly terrainanalysis_widthWalkTiles: (a: number) => number;
530
+ readonly wallsearchjob_exploredStates: (a: number) => number;
531
+ readonly wallsearchjob_layoutCount: (a: number) => number;
532
+ readonly wallsearchjob_resultJson: (a: number) => [number, number, number, number];
533
+ readonly wallsearchjob_step: (a: number, b: number) => [number, number, number];
534
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
535
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
536
+ readonly __wbindgen_exn_store: (a: number) => void;
537
+ readonly __externref_table_alloc: () => number;
538
+ readonly __wbindgen_externrefs: WebAssembly.Table;
539
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
540
+ readonly __externref_table_dealloc: (a: number) => void;
541
+ readonly __externref_drop_slice: (a: number, b: number) => void;
542
+ readonly __wbindgen_start: () => void;
543
+ }
544
+
545
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
546
+
547
+ /**
548
+ * Instantiates the given `module`, which can either be bytes or
549
+ * a precompiled `WebAssembly.Module`.
550
+ *
551
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
552
+ *
553
+ * @returns {InitOutput}
554
+ */
555
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
556
+
557
+ /**
558
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
559
+ * for everything else, calls `WebAssembly.instantiate` directly.
560
+ *
561
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
562
+ *
563
+ * @returns {Promise<InitOutput>}
564
+ */
565
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;