fleethub-core 1.8.12 → 1.9.1
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/node/fleethub_core.d.ts +416 -431
- package/node/fleethub_core.js +61 -69
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +4 -4
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +416 -431
- package/pkg/fleethub_core_bg.js +61 -69
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +4 -4
package/node/fleethub_core.js
CHANGED
|
@@ -2,11 +2,15 @@ let imports = {};
|
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
4
|
const { createEquipmentBonuses } = require(`equipment-bonus`);
|
|
5
|
-
const {
|
|
5
|
+
const { TextEncoder, TextDecoder } = require(`util`);
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const heap = new Array(32).fill(undefined);
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
heap.push(undefined, null, true, false);
|
|
10
|
+
|
|
11
|
+
function getObject(idx) { return heap[idx]; }
|
|
12
|
+
|
|
13
|
+
let WASM_VECTOR_LEN = 0;
|
|
10
14
|
|
|
11
15
|
let cachedUint8Memory0 = new Uint8Array();
|
|
12
16
|
|
|
@@ -17,41 +21,6 @@ function getUint8Memory0() {
|
|
|
17
21
|
return cachedUint8Memory0;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
|
-
function getStringFromWasm0(ptr, len) {
|
|
21
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const heap = new Array(32).fill(undefined);
|
|
25
|
-
|
|
26
|
-
heap.push(undefined, null, true, false);
|
|
27
|
-
|
|
28
|
-
let heap_next = heap.length;
|
|
29
|
-
|
|
30
|
-
function addHeapObject(obj) {
|
|
31
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
32
|
-
const idx = heap_next;
|
|
33
|
-
heap_next = heap[idx];
|
|
34
|
-
|
|
35
|
-
heap[idx] = obj;
|
|
36
|
-
return idx;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function getObject(idx) { return heap[idx]; }
|
|
40
|
-
|
|
41
|
-
function dropObject(idx) {
|
|
42
|
-
if (idx < 36) return;
|
|
43
|
-
heap[idx] = heap_next;
|
|
44
|
-
heap_next = idx;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function takeObject(idx) {
|
|
48
|
-
const ret = getObject(idx);
|
|
49
|
-
dropObject(idx);
|
|
50
|
-
return ret;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
let WASM_VECTOR_LEN = 0;
|
|
54
|
-
|
|
55
24
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
56
25
|
|
|
57
26
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -114,13 +83,35 @@ function getInt32Memory0() {
|
|
|
114
83
|
return cachedInt32Memory0;
|
|
115
84
|
}
|
|
116
85
|
|
|
117
|
-
let
|
|
86
|
+
let heap_next = heap.length;
|
|
118
87
|
|
|
119
|
-
function
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
88
|
+
function dropObject(idx) {
|
|
89
|
+
if (idx < 36) return;
|
|
90
|
+
heap[idx] = heap_next;
|
|
91
|
+
heap_next = idx;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function takeObject(idx) {
|
|
95
|
+
const ret = getObject(idx);
|
|
96
|
+
dropObject(idx);
|
|
97
|
+
return ret;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
101
|
+
|
|
102
|
+
cachedTextDecoder.decode();
|
|
103
|
+
|
|
104
|
+
function getStringFromWasm0(ptr, len) {
|
|
105
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function addHeapObject(obj) {
|
|
109
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
110
|
+
const idx = heap_next;
|
|
111
|
+
heap_next = heap[idx];
|
|
112
|
+
|
|
113
|
+
heap[idx] = obj;
|
|
114
|
+
return idx;
|
|
124
115
|
}
|
|
125
116
|
|
|
126
117
|
function _assertClass(instance, klass) {
|
|
@@ -130,6 +121,15 @@ function _assertClass(instance, klass) {
|
|
|
130
121
|
return instance.ptr;
|
|
131
122
|
}
|
|
132
123
|
|
|
124
|
+
let cachedFloat64Memory0 = new Float64Array();
|
|
125
|
+
|
|
126
|
+
function getFloat64Memory0() {
|
|
127
|
+
if (cachedFloat64Memory0.byteLength === 0) {
|
|
128
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
129
|
+
}
|
|
130
|
+
return cachedFloat64Memory0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
133
|
function isLikeNone(x) {
|
|
134
134
|
return x === undefined || x === null;
|
|
135
135
|
}
|
|
@@ -403,21 +403,6 @@ class Analyzer {
|
|
|
403
403
|
return takeObject(ret);
|
|
404
404
|
}
|
|
405
405
|
/**
|
|
406
|
-
* @param {NodeAttackAnalyzerConfig} config
|
|
407
|
-
* @param {Comp} left_comp
|
|
408
|
-
* @param {Comp} right_comp
|
|
409
|
-
* @param {string} attacker_id
|
|
410
|
-
* @returns {NodeAttackAnalysis2 | undefined}
|
|
411
|
-
*/
|
|
412
|
-
analyze_node_attack2(config, left_comp, right_comp, attacker_id) {
|
|
413
|
-
_assertClass(left_comp, Comp);
|
|
414
|
-
_assertClass(right_comp, Comp);
|
|
415
|
-
const ptr0 = passStringToWasm0(attacker_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
416
|
-
const len0 = WASM_VECTOR_LEN;
|
|
417
|
-
const ret = wasm.analyzer_analyze_node_attack2(this.ptr, addHeapObject(config), left_comp.ptr, right_comp.ptr, ptr0, len0);
|
|
418
|
-
return takeObject(ret);
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
406
|
* @param {Comp} comp
|
|
422
407
|
* @param {CompAnalyzerConfig} config
|
|
423
408
|
* @returns {CompAnalysis}
|
|
@@ -2545,6 +2530,13 @@ class Ship {
|
|
|
2545
2530
|
return ret !== 0;
|
|
2546
2531
|
}
|
|
2547
2532
|
/**
|
|
2533
|
+
* @returns {boolean}
|
|
2534
|
+
*/
|
|
2535
|
+
is_amagiri() {
|
|
2536
|
+
const ret = wasm.ship_is_amagiri(this.ptr);
|
|
2537
|
+
return ret !== 0;
|
|
2538
|
+
}
|
|
2539
|
+
/**
|
|
2548
2540
|
* @param {Gear} gear
|
|
2549
2541
|
* @param {string} key
|
|
2550
2542
|
* @returns {boolean}
|
|
@@ -2844,15 +2836,6 @@ class Ship {
|
|
|
2844
2836
|
}
|
|
2845
2837
|
module.exports.Ship = Ship;
|
|
2846
2838
|
|
|
2847
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2848
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
2849
|
-
return addHeapObject(ret);
|
|
2850
|
-
};
|
|
2851
|
-
|
|
2852
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2853
|
-
takeObject(arg0);
|
|
2854
|
-
};
|
|
2855
|
-
|
|
2856
2839
|
module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
2857
2840
|
const obj = getObject(arg1);
|
|
2858
2841
|
const ret = JSON.stringify(obj === undefined ? null : obj);
|
|
@@ -2862,7 +2845,16 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
|
2862
2845
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
2863
2846
|
};
|
|
2864
2847
|
|
|
2865
|
-
module.exports.
|
|
2848
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2849
|
+
takeObject(arg0);
|
|
2850
|
+
};
|
|
2851
|
+
|
|
2852
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2853
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2854
|
+
return addHeapObject(ret);
|
|
2855
|
+
};
|
|
2856
|
+
|
|
2857
|
+
module.exports.__wbg_createEquipmentBonuses_0efacdeef0fe5ffd = function(arg0, arg1) {
|
|
2866
2858
|
const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
|
|
2867
2859
|
return addHeapObject(ret);
|
|
2868
2860
|
};
|
|
Binary file
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export function ship_state_day_gunfit_accuracy(a: number, b: number): void;
|
|
5
|
-
export function ship_state_night_gunfit_accuracy(a: number, b: number): void;
|
|
6
|
-
export function ship_gunfit_accuracy(a: number, b: number): number;
|
|
7
4
|
export function __wbg_analyzer_free(a: number): void;
|
|
8
5
|
export function analyzer_analyze_ship_attack(a: number, b: number, c: number, d: number, e: number): number;
|
|
9
6
|
export function analyzer_analyze_node_attack(a: number, b: number, c: number, d: number, e: number, f: number): number;
|
|
10
|
-
export function analyzer_analyze_node_attack2(a: number, b: number, c: number, d: number, e: number, f: number): number;
|
|
11
7
|
export function analyzer_analyze_comp(a: number, b: number, c: number): number;
|
|
12
8
|
export function analyzer_simulate_support_shelling(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
|
9
|
+
export function ship_state_day_gunfit_accuracy(a: number, b: number): void;
|
|
10
|
+
export function ship_state_night_gunfit_accuracy(a: number, b: number): void;
|
|
11
|
+
export function ship_gunfit_accuracy(a: number, b: number): number;
|
|
13
12
|
export function __wbg_fhcore_free(a: number): void;
|
|
14
13
|
export function fhcore_new(a: number, b: number): void;
|
|
15
14
|
export function fhcore_create_gear(a: number, b: number): number;
|
|
@@ -143,6 +142,7 @@ export function ship_get_ebonus(a: number, b: number, c: number): number;
|
|
|
143
142
|
export function ship_get_stat_mod(a: number, b: number, c: number): number;
|
|
144
143
|
export function ship_is_abyssal(a: number): number;
|
|
145
144
|
export function ship_is_submarine(a: number): number;
|
|
145
|
+
export function ship_is_amagiri(a: number): number;
|
|
146
146
|
export function ship_can_equip(a: number, b: number, c: number, d: number): number;
|
|
147
147
|
export function ship_max_hp(a: number): number;
|
|
148
148
|
export function ship_max_ammo(a: number): number;
|