honse-sim 0.1.0 → 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.
- package/package.json +5 -4
- package/uma_sim_wasm.d.ts +55 -5
- package/uma_sim_wasm.js +139 -54
- package/uma_sim_wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "honse-sim",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"description": "WebAssembly adapter for the
|
|
5
|
-
"version": "0.
|
|
4
|
+
"description": "WebAssembly adapter for the honse-sim race simulation engine.",
|
|
5
|
+
"version": "0.2.0",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"uma_sim_wasm_bg.wasm",
|
|
13
13
|
"uma_sim_wasm.js",
|
|
14
|
-
"uma_sim_wasm.d.ts"
|
|
14
|
+
"uma_sim_wasm.d.ts",
|
|
15
|
+
"snippets"
|
|
15
16
|
],
|
|
16
17
|
"main": "uma_sim_wasm.js",
|
|
17
18
|
"types": "uma_sim_wasm.d.ts",
|
|
18
19
|
"sideEffects": [
|
|
19
20
|
"./snippets/*"
|
|
20
21
|
]
|
|
21
|
-
}
|
|
22
|
+
}
|
package/uma_sim_wasm.d.ts
CHANGED
|
@@ -43,17 +43,38 @@ export class WasmRaceSimulator {
|
|
|
43
43
|
setOnRunnerFinished(cb: Function): void;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* The late-race HP consumption multiplier for a guts stat.
|
|
48
|
+
*
|
|
49
|
+
* See [`honse_sim::readouts::guts_hp_burn_multiplier`].
|
|
50
|
+
*/
|
|
51
|
+
export function gutsHpBurnMultiplier(guts: number): number;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Stamina's HP conversion coefficient for a strategy id (1-5).
|
|
55
|
+
*
|
|
56
|
+
* See [`honse_sim::readouts::hp_strategy_coefficient`].
|
|
57
|
+
*/
|
|
58
|
+
export function hpStrategyCoefficient(strategy: number): number;
|
|
59
|
+
|
|
46
60
|
/**
|
|
47
61
|
* All condition tokens the Rust engine's catalog recognizes.
|
|
48
62
|
*
|
|
49
|
-
* Exposed so
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* any token the UI treats as simulatable must be resolvable by this engine.
|
|
63
|
+
* Exposed so an external consumer can cross-check its simulatability gate
|
|
64
|
+
* against the engine that runs the simulation. Any token a consumer treats as
|
|
65
|
+
* simulatable must be resolvable by this engine.
|
|
53
66
|
* Returned as a sorted JS string array.
|
|
54
67
|
*/
|
|
55
68
|
export function knownConditionTokens(): string[];
|
|
56
69
|
|
|
70
|
+
/**
|
|
71
|
+
* The HP a runner starts a race with, from stamina, strategy id, and course
|
|
72
|
+
* distance in meters.
|
|
73
|
+
*
|
|
74
|
+
* See [`honse_sim::readouts::max_hp`].
|
|
75
|
+
*/
|
|
76
|
+
export function maxHp(stamina: number, strategy: number, distance: number): number;
|
|
77
|
+
|
|
57
78
|
/**
|
|
58
79
|
* Run a batch compare-family simulation and return the serialized result.
|
|
59
80
|
*
|
|
@@ -80,15 +101,42 @@ export function runContestedCompare(params: any): any;
|
|
|
80
101
|
*/
|
|
81
102
|
export function runRaceSim(params: any): any;
|
|
82
103
|
|
|
104
|
+
/**
|
|
105
|
+
* The pre-race wisdom check pass rate, as a percentage, for a base wit stat.
|
|
106
|
+
*
|
|
107
|
+
* See [`honse_sim::readouts::skill_activation_percent`].
|
|
108
|
+
*/
|
|
109
|
+
export function skillActivationPercent(base_wit: number): number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Which of the submitted skills this engine models only partially.
|
|
113
|
+
*
|
|
114
|
+
* `skills` is an array of the same skill objects a simulation takes. Returns one
|
|
115
|
+
* entry per skill that loses at least one effect, each listing the dropped
|
|
116
|
+
* effects and whether the skill is left inert; a fully modeled skill is omitted,
|
|
117
|
+
* so an empty array means full coverage.
|
|
118
|
+
*
|
|
119
|
+
* The engine drops effects it cannot model rather than rejecting the skill (an
|
|
120
|
+
* unmapped effect `type`, or a `valueUsage` with no scaling policy), so a
|
|
121
|
+
* simulation always runs — but a dropped effect makes that skill's contribution
|
|
122
|
+
* understated. Exposed so a consumer can say which skills are affected instead
|
|
123
|
+
* of presenting partial results as complete. The answer is a property of the
|
|
124
|
+
* skill data alone, so call it once per skill pool rather than per simulation.
|
|
125
|
+
*/
|
|
126
|
+
export function skillSupportReport(skills: any): any;
|
|
127
|
+
|
|
83
128
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
84
129
|
|
|
85
130
|
export interface InitOutput {
|
|
86
131
|
readonly memory: WebAssembly.Memory;
|
|
87
132
|
readonly __wbg_wasmracesimulator_free: (a: number, b: number) => void;
|
|
133
|
+
readonly hpStrategyCoefficient: (a: number) => [number, number, number];
|
|
88
134
|
readonly knownConditionTokens: () => [number, number];
|
|
135
|
+
readonly maxHp: (a: number, b: number, c: number) => [number, number, number];
|
|
89
136
|
readonly runCompare: (a: any) => [number, number, number];
|
|
90
137
|
readonly runContestedCompare: (a: any) => [number, number, number];
|
|
91
138
|
readonly runRaceSim: (a: any) => [number, number, number];
|
|
139
|
+
readonly skillSupportReport: (a: any) => [number, number, number];
|
|
92
140
|
readonly wasmracesimulator_new: (a: any) => [number, number, number];
|
|
93
141
|
readonly wasmracesimulator_run: (a: number) => [number, number, number];
|
|
94
142
|
readonly wasmracesimulator_setOnAfterRunnerTick: (a: number, b: any) => void;
|
|
@@ -96,14 +144,16 @@ export interface InitOutput {
|
|
|
96
144
|
readonly wasmracesimulator_setOnRoundEnd: (a: number, b: any) => void;
|
|
97
145
|
readonly wasmracesimulator_setOnRoundStart: (a: number, b: any) => void;
|
|
98
146
|
readonly wasmracesimulator_setOnRunnerFinished: (a: number, b: any) => void;
|
|
147
|
+
readonly gutsHpBurnMultiplier: (a: number) => number;
|
|
148
|
+
readonly skillActivationPercent: (a: number) => number;
|
|
99
149
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
100
150
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
101
151
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
102
152
|
readonly __externref_table_alloc: () => number;
|
|
103
153
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
154
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
104
155
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
105
156
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
106
|
-
readonly __externref_table_dealloc: (a: number) => void;
|
|
107
157
|
readonly __wbindgen_start: () => void;
|
|
108
158
|
}
|
|
109
159
|
|
package/uma_sim_wasm.js
CHANGED
|
@@ -83,23 +83,67 @@ export class WasmRaceSimulator {
|
|
|
83
83
|
}
|
|
84
84
|
if (Symbol.dispose) WasmRaceSimulator.prototype[Symbol.dispose] = WasmRaceSimulator.prototype.free;
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* The late-race HP consumption multiplier for a guts stat.
|
|
88
|
+
*
|
|
89
|
+
* See [`honse_sim::readouts::guts_hp_burn_multiplier`].
|
|
90
|
+
* @param {number} guts
|
|
91
|
+
* @returns {number}
|
|
92
|
+
*/
|
|
93
|
+
export function gutsHpBurnMultiplier(guts) {
|
|
94
|
+
const ret = wasm.gutsHpBurnMultiplier(guts);
|
|
95
|
+
return ret;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Stamina's HP conversion coefficient for a strategy id (1-5).
|
|
100
|
+
*
|
|
101
|
+
* See [`honse_sim::readouts::hp_strategy_coefficient`].
|
|
102
|
+
* @param {number} strategy
|
|
103
|
+
* @returns {number}
|
|
104
|
+
*/
|
|
105
|
+
export function hpStrategyCoefficient(strategy) {
|
|
106
|
+
const ret = wasm.hpStrategyCoefficient(strategy);
|
|
107
|
+
if (ret[2]) {
|
|
108
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
109
|
+
}
|
|
110
|
+
return ret[0];
|
|
111
|
+
}
|
|
112
|
+
|
|
86
113
|
/**
|
|
87
114
|
* All condition tokens the Rust engine's catalog recognizes.
|
|
88
115
|
*
|
|
89
|
-
* Exposed so
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* any token the UI treats as simulatable must be resolvable by this engine.
|
|
116
|
+
* Exposed so an external consumer can cross-check its simulatability gate
|
|
117
|
+
* against the engine that runs the simulation. Any token a consumer treats as
|
|
118
|
+
* simulatable must be resolvable by this engine.
|
|
93
119
|
* Returned as a sorted JS string array.
|
|
94
120
|
* @returns {string[]}
|
|
95
121
|
*/
|
|
96
122
|
export function knownConditionTokens() {
|
|
97
123
|
const ret = wasm.knownConditionTokens();
|
|
98
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1])
|
|
124
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
|
|
99
125
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
100
126
|
return v1;
|
|
101
127
|
}
|
|
102
128
|
|
|
129
|
+
/**
|
|
130
|
+
* The HP a runner starts a race with, from stamina, strategy id, and course
|
|
131
|
+
* distance in meters.
|
|
132
|
+
*
|
|
133
|
+
* See [`honse_sim::readouts::max_hp`].
|
|
134
|
+
* @param {number} stamina
|
|
135
|
+
* @param {number} strategy
|
|
136
|
+
* @param {number} distance
|
|
137
|
+
* @returns {number}
|
|
138
|
+
*/
|
|
139
|
+
export function maxHp(stamina, strategy, distance) {
|
|
140
|
+
const ret = wasm.maxHp(stamina, strategy, distance);
|
|
141
|
+
if (ret[2]) {
|
|
142
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
143
|
+
}
|
|
144
|
+
return ret[0];
|
|
145
|
+
}
|
|
146
|
+
|
|
103
147
|
/**
|
|
104
148
|
* Run a batch compare-family simulation and return the serialized result.
|
|
105
149
|
*
|
|
@@ -149,14 +193,51 @@ export function runRaceSim(params) {
|
|
|
149
193
|
}
|
|
150
194
|
return takeFromExternrefTable0(ret[0]);
|
|
151
195
|
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The pre-race wisdom check pass rate, as a percentage, for a base wit stat.
|
|
199
|
+
*
|
|
200
|
+
* See [`honse_sim::readouts::skill_activation_percent`].
|
|
201
|
+
* @param {number} base_wit
|
|
202
|
+
* @returns {number}
|
|
203
|
+
*/
|
|
204
|
+
export function skillActivationPercent(base_wit) {
|
|
205
|
+
const ret = wasm.skillActivationPercent(base_wit);
|
|
206
|
+
return ret;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Which of the submitted skills this engine models only partially.
|
|
211
|
+
*
|
|
212
|
+
* `skills` is an array of the same skill objects a simulation takes. Returns one
|
|
213
|
+
* entry per skill that loses at least one effect, each listing the dropped
|
|
214
|
+
* effects and whether the skill is left inert; a fully modeled skill is omitted,
|
|
215
|
+
* so an empty array means full coverage.
|
|
216
|
+
*
|
|
217
|
+
* The engine drops effects it cannot model rather than rejecting the skill (an
|
|
218
|
+
* unmapped effect `type`, or a `valueUsage` with no scaling policy), so a
|
|
219
|
+
* simulation always runs — but a dropped effect makes that skill's contribution
|
|
220
|
+
* understated. Exposed so a consumer can say which skills are affected instead
|
|
221
|
+
* of presenting partial results as complete. The answer is a property of the
|
|
222
|
+
* skill data alone, so call it once per skill pool rather than per simulation.
|
|
223
|
+
* @param {any} skills
|
|
224
|
+
* @returns {any}
|
|
225
|
+
*/
|
|
226
|
+
export function skillSupportReport(skills) {
|
|
227
|
+
const ret = wasm.skillSupportReport(skills);
|
|
228
|
+
if (ret[2]) {
|
|
229
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
230
|
+
}
|
|
231
|
+
return takeFromExternrefTable0(ret[0]);
|
|
232
|
+
}
|
|
152
233
|
function __wbg_get_imports() {
|
|
153
234
|
const import0 = {
|
|
154
235
|
__proto__: null,
|
|
155
|
-
|
|
236
|
+
__wbg_Error_408e67f47ca7b58b: function(arg0, arg1) {
|
|
156
237
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
157
238
|
return ret;
|
|
158
239
|
},
|
|
159
|
-
|
|
240
|
+
__wbg_Number_3890faa6d3ff057d: function(arg0) {
|
|
160
241
|
const ret = Number(arg0);
|
|
161
242
|
return ret;
|
|
162
243
|
},
|
|
@@ -167,64 +248,64 @@ function __wbg_get_imports() {
|
|
|
167
248
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
168
249
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
169
250
|
},
|
|
170
|
-
|
|
251
|
+
__wbg___wbindgen_bigint_get_as_i64_c4ecf48528083721: function(arg0, arg1) {
|
|
171
252
|
const v = arg1;
|
|
172
253
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
173
254
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
174
255
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
175
256
|
},
|
|
176
|
-
|
|
257
|
+
__wbg___wbindgen_boolean_get_c9c83ebd41b34df3: function(arg0) {
|
|
177
258
|
const v = arg0;
|
|
178
259
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
179
260
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
180
261
|
},
|
|
181
|
-
|
|
262
|
+
__wbg___wbindgen_debug_string_a57024b9c6e4a48b: function(arg0, arg1) {
|
|
182
263
|
const ret = debugString(arg1);
|
|
183
264
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
184
265
|
const len1 = WASM_VECTOR_LEN;
|
|
185
266
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
186
267
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
187
268
|
},
|
|
188
|
-
|
|
269
|
+
__wbg___wbindgen_in_ac983077f137f2e6: function(arg0, arg1) {
|
|
189
270
|
const ret = arg0 in arg1;
|
|
190
271
|
return ret;
|
|
191
272
|
},
|
|
192
|
-
|
|
273
|
+
__wbg___wbindgen_is_bigint_8ffbbef442139384: function(arg0) {
|
|
193
274
|
const ret = typeof(arg0) === 'bigint';
|
|
194
275
|
return ret;
|
|
195
276
|
},
|
|
196
|
-
|
|
277
|
+
__wbg___wbindgen_is_function_5e4570eb24ffa122: function(arg0) {
|
|
197
278
|
const ret = typeof(arg0) === 'function';
|
|
198
279
|
return ret;
|
|
199
280
|
},
|
|
200
|
-
|
|
281
|
+
__wbg___wbindgen_is_object_a2790eb24c211ea0: function(arg0) {
|
|
201
282
|
const val = arg0;
|
|
202
283
|
const ret = typeof(val) === 'object' && val !== null;
|
|
203
284
|
return ret;
|
|
204
285
|
},
|
|
205
|
-
|
|
286
|
+
__wbg___wbindgen_is_string_e6f02f0ea5f20a32: function(arg0) {
|
|
206
287
|
const ret = typeof(arg0) === 'string';
|
|
207
288
|
return ret;
|
|
208
289
|
},
|
|
209
|
-
|
|
290
|
+
__wbg___wbindgen_is_undefined_6cff064c44e0d823: function(arg0) {
|
|
210
291
|
const ret = arg0 === undefined;
|
|
211
292
|
return ret;
|
|
212
293
|
},
|
|
213
|
-
|
|
294
|
+
__wbg___wbindgen_jsval_eq_0a18949a61670320: function(arg0, arg1) {
|
|
214
295
|
const ret = arg0 === arg1;
|
|
215
296
|
return ret;
|
|
216
297
|
},
|
|
217
|
-
|
|
298
|
+
__wbg___wbindgen_jsval_loose_eq_acf2776254a8d832: function(arg0, arg1) {
|
|
218
299
|
const ret = arg0 == arg1;
|
|
219
300
|
return ret;
|
|
220
301
|
},
|
|
221
|
-
|
|
302
|
+
__wbg___wbindgen_number_get_136b9679cab35cfb: function(arg0, arg1) {
|
|
222
303
|
const obj = arg1;
|
|
223
304
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
224
305
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
225
306
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
226
307
|
},
|
|
227
|
-
|
|
308
|
+
__wbg___wbindgen_string_get_d154f1e671052120: function(arg0, arg1) {
|
|
228
309
|
const obj = arg1;
|
|
229
310
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
230
311
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -232,34 +313,34 @@ function __wbg_get_imports() {
|
|
|
232
313
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
233
314
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
234
315
|
},
|
|
235
|
-
|
|
316
|
+
__wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
|
|
236
317
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
237
318
|
},
|
|
238
|
-
|
|
319
|
+
__wbg_call_1c5886ab9c57d1c7: function() { return handleError(function (arg0, arg1) {
|
|
239
320
|
const ret = arg0.call(arg1);
|
|
240
321
|
return ret;
|
|
241
322
|
}, arguments); },
|
|
242
|
-
|
|
323
|
+
__wbg_call_35dba3c747ad7521: function() { return handleError(function (arg0, arg1, arg2) {
|
|
243
324
|
const ret = arg0.call(arg1, arg2);
|
|
244
325
|
return ret;
|
|
245
326
|
}, arguments); },
|
|
246
|
-
|
|
327
|
+
__wbg_done_669171204c3dcae2: function(arg0) {
|
|
247
328
|
const ret = arg0.done;
|
|
248
329
|
return ret;
|
|
249
330
|
},
|
|
250
|
-
|
|
331
|
+
__wbg_entries_7774d489e1da5f4f: function(arg0) {
|
|
251
332
|
const ret = Object.entries(arg0);
|
|
252
333
|
return ret;
|
|
253
334
|
},
|
|
254
|
-
|
|
255
|
-
const ret = Reflect.get(arg0, arg1);
|
|
256
|
-
return ret;
|
|
257
|
-
}, arguments); },
|
|
258
|
-
__wbg_get_2b48c7d0d006a781: function(arg0, arg1) {
|
|
335
|
+
__wbg_get_c0c8f8d7da0c03dd: function(arg0, arg1) {
|
|
259
336
|
const ret = arg0[arg1 >>> 0];
|
|
260
337
|
return ret;
|
|
261
338
|
},
|
|
262
|
-
|
|
339
|
+
__wbg_get_d173c0308df22d37: function() { return handleError(function (arg0, arg1) {
|
|
340
|
+
const ret = Reflect.get(arg0, arg1);
|
|
341
|
+
return ret;
|
|
342
|
+
}, arguments); },
|
|
343
|
+
__wbg_get_unchecked_e20b893aeafc3fca: function(arg0, arg1) {
|
|
263
344
|
const ret = arg0[arg1 >>> 0];
|
|
264
345
|
return ret;
|
|
265
346
|
},
|
|
@@ -267,7 +348,7 @@ function __wbg_get_imports() {
|
|
|
267
348
|
const ret = arg0[arg1];
|
|
268
349
|
return ret;
|
|
269
350
|
},
|
|
270
|
-
|
|
351
|
+
__wbg_instanceof_ArrayBuffer_993d02d2d254cad1: function(arg0) {
|
|
271
352
|
let result;
|
|
272
353
|
try {
|
|
273
354
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -277,7 +358,7 @@ function __wbg_get_imports() {
|
|
|
277
358
|
const ret = result;
|
|
278
359
|
return ret;
|
|
279
360
|
},
|
|
280
|
-
|
|
361
|
+
__wbg_instanceof_Uint8Array_f935dbb0aa7cdeed: function(arg0) {
|
|
281
362
|
let result;
|
|
282
363
|
try {
|
|
283
364
|
result = arg0 instanceof Uint8Array;
|
|
@@ -287,64 +368,64 @@ function __wbg_get_imports() {
|
|
|
287
368
|
const ret = result;
|
|
288
369
|
return ret;
|
|
289
370
|
},
|
|
290
|
-
|
|
371
|
+
__wbg_isArray_6339f732981044bf: function(arg0) {
|
|
291
372
|
const ret = Array.isArray(arg0);
|
|
292
373
|
return ret;
|
|
293
374
|
},
|
|
294
|
-
|
|
375
|
+
__wbg_isSafeInteger_f3d6cd19ccfe4512: function(arg0) {
|
|
295
376
|
const ret = Number.isSafeInteger(arg0);
|
|
296
377
|
return ret;
|
|
297
378
|
},
|
|
298
|
-
|
|
379
|
+
__wbg_iterator_5cebbb86e33c6dd6: function() {
|
|
299
380
|
const ret = Symbol.iterator;
|
|
300
381
|
return ret;
|
|
301
382
|
},
|
|
302
|
-
|
|
383
|
+
__wbg_length_36bd29c6848c2144: function(arg0) {
|
|
303
384
|
const ret = arg0.length;
|
|
304
385
|
return ret;
|
|
305
386
|
},
|
|
306
|
-
|
|
387
|
+
__wbg_length_ecfa2c63d3d0d82c: function(arg0) {
|
|
307
388
|
const ret = arg0.length;
|
|
308
389
|
return ret;
|
|
309
390
|
},
|
|
310
|
-
|
|
391
|
+
__wbg_new_116be93542d39019: function() {
|
|
392
|
+
const ret = new Array();
|
|
393
|
+
return ret;
|
|
394
|
+
},
|
|
395
|
+
__wbg_new_77cc4f4f472aeb81: function(arg0) {
|
|
311
396
|
const ret = new Uint8Array(arg0);
|
|
312
397
|
return ret;
|
|
313
398
|
},
|
|
314
|
-
|
|
399
|
+
__wbg_new_cdf041679ded4c5f: function() {
|
|
315
400
|
const ret = new Map();
|
|
316
401
|
return ret;
|
|
317
402
|
},
|
|
318
|
-
|
|
403
|
+
__wbg_new_ebe3e0f6837f0879: function() {
|
|
319
404
|
const ret = new Object();
|
|
320
405
|
return ret;
|
|
321
406
|
},
|
|
322
|
-
|
|
323
|
-
const ret =
|
|
407
|
+
__wbg_next_42cf16ee0dafc9e2: function() { return handleError(function (arg0) {
|
|
408
|
+
const ret = arg0.next();
|
|
324
409
|
return ret;
|
|
325
|
-
},
|
|
326
|
-
|
|
410
|
+
}, arguments); },
|
|
411
|
+
__wbg_next_8f26b64fa5e9f64b: function(arg0) {
|
|
327
412
|
const ret = arg0.next;
|
|
328
413
|
return ret;
|
|
329
414
|
},
|
|
330
|
-
|
|
331
|
-
const ret = arg0.next();
|
|
332
|
-
return ret;
|
|
333
|
-
}, arguments); },
|
|
334
|
-
__wbg_prototypesetcall_3249fc62a0fafa30: function(arg0, arg1, arg2) {
|
|
415
|
+
__wbg_prototypesetcall_de8e0d9553586985: function(arg0, arg1, arg2) {
|
|
335
416
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
336
417
|
},
|
|
337
|
-
|
|
418
|
+
__wbg_set_014226dfeca53178: function(arg0, arg1, arg2) {
|
|
338
419
|
const ret = arg0.set(arg1, arg2);
|
|
339
420
|
return ret;
|
|
340
421
|
},
|
|
341
422
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
342
423
|
arg0[arg1] = arg2;
|
|
343
424
|
},
|
|
344
|
-
|
|
425
|
+
__wbg_set_a80955eb93b145c6: function(arg0, arg1, arg2) {
|
|
345
426
|
arg0[arg1 >>> 0] = arg2;
|
|
346
427
|
},
|
|
347
|
-
|
|
428
|
+
__wbg_value_1e2369fab29b420e: function(arg0) {
|
|
348
429
|
const ret = arg0.value;
|
|
349
430
|
return ret;
|
|
350
431
|
},
|
|
@@ -593,11 +674,15 @@ function __wbg_finalize_init(instance, module) {
|
|
|
593
674
|
|
|
594
675
|
async function __wbg_load(module, imports) {
|
|
595
676
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
677
|
+
if (!module.ok) {
|
|
678
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
679
|
+
}
|
|
680
|
+
|
|
596
681
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
597
682
|
try {
|
|
598
683
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
599
684
|
} catch (e) {
|
|
600
|
-
const validResponse =
|
|
685
|
+
const validResponse = expectedResponseType(module.type);
|
|
601
686
|
|
|
602
687
|
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
603
688
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
package/uma_sim_wasm_bg.wasm
CHANGED
|
Binary file
|