fleethub-core 0.5.2 → 0.8.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/README.md +69 -0
- package/bindings.d.ts +1 -1
- package/node/{fh_core.d.ts → fleethub_core.d.ts} +17 -13
- package/node/{fh_core.js → fleethub_core.js} +279 -159
- package/node/fleethub_core_bg.wasm +0 -0
- package/{pkg/fh_core_bg.wasm.d.ts → node/fleethub_core_bg.wasm.d.ts} +98 -91
- package/package.json +5 -5
- package/pkg/{fh_core.d.ts → fleethub_core.d.ts} +17 -13
- package/pkg/fleethub_core.js +2 -0
- package/pkg/{fh_core_bg.js → fleethub_core_bg.js} +279 -159
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/{node/fh_core_bg.wasm.d.ts → pkg/fleethub_core_bg.wasm.d.ts} +98 -91
- package/node/fh_core_bg.wasm +0 -0
- package/pkg/fh_core.js +0 -2
- package/pkg/fh_core_bg.wasm +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<h1><code>wasm-pack-template</code></h1>
|
|
4
|
+
|
|
5
|
+
<strong>A template for kick starting a Rust and WebAssembly project using <a href="https://github.com/rustwasm/wasm-pack">wasm-pack</a>.</strong>
|
|
6
|
+
|
|
7
|
+
<p>
|
|
8
|
+
<a href="https://travis-ci.org/rustwasm/wasm-pack-template"><img src="https://img.shields.io/travis/rustwasm/wasm-pack-template.svg?style=flat-square" alt="Build Status" /></a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<h3>
|
|
12
|
+
<a href="https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html">Tutorial</a>
|
|
13
|
+
<span> | </span>
|
|
14
|
+
<a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a>
|
|
15
|
+
</h3>
|
|
16
|
+
|
|
17
|
+
<sub>Built with 🦀🕸 by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
## About
|
|
21
|
+
|
|
22
|
+
[**📚 Read this template tutorial! 📚**][template-docs]
|
|
23
|
+
|
|
24
|
+
This template is designed for compiling Rust libraries into WebAssembly and
|
|
25
|
+
publishing the resulting package to NPM.
|
|
26
|
+
|
|
27
|
+
Be sure to check out [other `wasm-pack` tutorials online][tutorials] for other
|
|
28
|
+
templates and usages of `wasm-pack`.
|
|
29
|
+
|
|
30
|
+
[tutorials]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html
|
|
31
|
+
[template-docs]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html
|
|
32
|
+
|
|
33
|
+
## 🚴 Usage
|
|
34
|
+
|
|
35
|
+
### 🐑 Use `cargo generate` to Clone this Template
|
|
36
|
+
|
|
37
|
+
[Learn more about `cargo generate` here.](https://github.com/ashleygwilliams/cargo-generate)
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
|
|
41
|
+
cd my-project
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 🛠️ Build with `wasm-pack build`
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
wasm-pack build
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 🔬 Test in Headless Browsers with `wasm-pack test`
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
wasm-pack test --headless --firefox
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 🎁 Publish to NPM with `wasm-pack publish`
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
wasm-pack publish
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 🔋 Batteries Included
|
|
63
|
+
|
|
64
|
+
* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating
|
|
65
|
+
between WebAssembly and JavaScript.
|
|
66
|
+
* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook)
|
|
67
|
+
for logging panic messages to the developer console.
|
|
68
|
+
* [`wee_alloc`](https://github.com/rustwasm/wee_alloc), an allocator optimized
|
|
69
|
+
for small code size.
|
package/bindings.d.ts
CHANGED
|
@@ -690,7 +690,7 @@ export interface AttackPower {
|
|
|
690
690
|
export interface HitRateParams {
|
|
691
691
|
accuracy_term: number;
|
|
692
692
|
evasion_term: number;
|
|
693
|
-
|
|
693
|
+
target_morale_mod: number;
|
|
694
694
|
critical_rate_constant: number;
|
|
695
695
|
critical_percentage_bonus: number;
|
|
696
696
|
hit_percentage_bonus: number;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
*/
|
|
5
|
-
export function set_panic_hook(): void;
|
|
6
|
-
/**
|
|
7
4
|
* @param {Gear} gear
|
|
8
5
|
* @returns {boolean}
|
|
9
6
|
*/
|
|
10
7
|
export function air_squadron_can_equip(gear: Gear): boolean;
|
|
11
8
|
/**
|
|
9
|
+
*/
|
|
10
|
+
export function set_panic_hook(): void;
|
|
11
|
+
/**
|
|
12
12
|
* @param {bindings.OrgType} org_type
|
|
13
13
|
* @returns {boolean}
|
|
14
14
|
*/
|
|
@@ -77,9 +77,8 @@ export class AirSquadron {
|
|
|
77
77
|
*/
|
|
78
78
|
mode: bindings.AirSquadronMode;
|
|
79
79
|
/**
|
|
80
|
-
* @returns {string}
|
|
81
80
|
*/
|
|
82
|
-
|
|
81
|
+
xxh3: BigInt;
|
|
83
82
|
}
|
|
84
83
|
/**
|
|
85
84
|
*/
|
|
@@ -370,9 +369,8 @@ export class Fleet {
|
|
|
370
369
|
*/
|
|
371
370
|
len: number;
|
|
372
371
|
/**
|
|
373
|
-
* @returns {string}
|
|
374
372
|
*/
|
|
375
|
-
|
|
373
|
+
xxh3: BigInt;
|
|
376
374
|
}
|
|
377
375
|
/**
|
|
378
376
|
*/
|
|
@@ -460,6 +458,10 @@ export class Gear {
|
|
|
460
458
|
elos(): number;
|
|
461
459
|
/**
|
|
462
460
|
* @returns {boolean}
|
|
461
|
+
*/
|
|
462
|
+
is_abyssal(): boolean;
|
|
463
|
+
/**
|
|
464
|
+
* @returns {boolean}
|
|
463
465
|
*/
|
|
464
466
|
is_abyssal_cuttlefish_torpedo(): boolean;
|
|
465
467
|
/**
|
|
@@ -574,9 +576,8 @@ export class Gear {
|
|
|
574
576
|
*/
|
|
575
577
|
readonly types: any;
|
|
576
578
|
/**
|
|
577
|
-
* @returns {string}
|
|
578
579
|
*/
|
|
579
|
-
|
|
580
|
+
xxh3: BigInt;
|
|
580
581
|
}
|
|
581
582
|
/**
|
|
582
583
|
*/
|
|
@@ -761,9 +762,8 @@ export class Org {
|
|
|
761
762
|
*/
|
|
762
763
|
sortie: string;
|
|
763
764
|
/**
|
|
764
|
-
* @returns {string}
|
|
765
765
|
*/
|
|
766
|
-
|
|
766
|
+
xxh3: BigInt;
|
|
767
767
|
}
|
|
768
768
|
/**
|
|
769
769
|
*/
|
|
@@ -922,6 +922,11 @@ export class Ship {
|
|
|
922
922
|
*/
|
|
923
923
|
cruiser_fit_bonus(): number;
|
|
924
924
|
/**
|
|
925
|
+
* @param {boolean} is_night
|
|
926
|
+
* @returns {number}
|
|
927
|
+
*/
|
|
928
|
+
fit_gun_bonus(is_night: boolean): number;
|
|
929
|
+
/**
|
|
925
930
|
* @returns {number | undefined}
|
|
926
931
|
*/
|
|
927
932
|
basic_accuracy_term(): number | undefined;
|
|
@@ -1106,9 +1111,8 @@ export class Ship {
|
|
|
1106
1111
|
*/
|
|
1107
1112
|
readonly useful: boolean;
|
|
1108
1113
|
/**
|
|
1109
|
-
* @returns {string}
|
|
1110
1114
|
*/
|
|
1111
|
-
|
|
1115
|
+
xxh3: BigInt;
|
|
1112
1116
|
/**
|
|
1113
1117
|
* @returns {string}
|
|
1114
1118
|
*/
|