deepwoken 0.1.3 → 0.1.5
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/generated.ts +7 -0
- package/index.ts +11 -6
- package/package.json +2 -1
- package/pkg/deepwoken_bg.wasm +0 -0
- package/types.ts +3 -6
package/generated.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// AUTO-GENERATED by build.rs do not edit thanks
|
|
2
|
+
|
|
3
|
+
export type Stat = "Strength" | "Fortitude" | "Agility" | "Intelligence" | "Willpower" | "Charisma" | "Heavy" | "Medium" | "Light" | "Frostdraw" | "Flamecharm" | "Thundercall" | "Galebreathe" | "Shadowcast" | "Ironsing" | "Bloodrend";
|
|
4
|
+
|
|
5
|
+
export const CORE_STATS: Stat[] = ["Strength", "Fortitude", "Agility", "Intelligence", "Willpower", "Charisma"];
|
|
6
|
+
export const WEAPON_STATS: Stat[] = ["Heavy", "Medium", "Light"];
|
|
7
|
+
export const ATTUNEMENT_STATS: Stat[] = ["Flamecharm", "Frostdraw", "Thundercall", "Galebreathe", "Shadowcast", "Ironsing", "Bloodrend"];
|
package/index.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ATTUNEMENT_STATS, CORE_STATS, WEAPON_STATS } from './types.js';
|
|
2
|
+
export type { Aspect, Mantra, Outfit, Stat, Talent, Weapon } from './types.js';
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
-
|
|
4
|
+
import type { Aspect, Mantra, Outfit, Talent, Weapon } from './types.js';
|
|
5
|
+
|
|
6
|
+
// dynamically import wasm bc the server will try to load wasm regardless man
|
|
7
|
+
let WasmDeepData: typeof import('./pkg/deepwoken.js').DeepData;
|
|
5
8
|
|
|
6
9
|
if (typeof window !== 'undefined') {
|
|
7
|
-
await
|
|
10
|
+
const wasm = await import('./pkg/deepwoken.js');
|
|
11
|
+
await wasm.default();
|
|
12
|
+
WasmDeepData = wasm.DeepData;
|
|
8
13
|
}
|
|
9
14
|
|
|
10
15
|
export class DeepData {
|
|
11
|
-
private _wasm:
|
|
16
|
+
private _wasm: any;
|
|
12
17
|
|
|
13
|
-
private constructor(wasm:
|
|
18
|
+
private constructor(wasm: any) {
|
|
14
19
|
this._wasm = wasm;
|
|
15
20
|
}
|
|
16
21
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deepwoken",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"types": "index.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"index.ts",
|
|
9
9
|
"types.ts",
|
|
10
|
+
"generated.ts",
|
|
10
11
|
"pkg/deepwoken_bg.wasm",
|
|
11
12
|
"pkg/deepwoken.js",
|
|
12
13
|
"pkg/deepwoken.d.ts"
|
package/pkg/deepwoken_bg.wasm
CHANGED
|
Binary file
|
package/types.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export type { Stat } from './generated.js';
|
|
2
|
+
export { CORE_STATS, WEAPON_STATS, ATTUNEMENT_STATS } from './generated.js';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
| "Strength" | "Fortitude" | "Agility" | "Intelligence" | "Willpower" | "Charisma"
|
|
5
|
-
| "Heavy" | "Medium" | "Light"
|
|
6
|
-
| "Frostdraw" | "Flamecharm" | "Thundercall" | "Galebreathe" | "Shadowcast" | "Ironsing" | "Bloodrend"
|
|
7
|
-
| "Total";
|
|
4
|
+
import type { Stat } from './generated.js';
|
|
8
5
|
|
|
9
6
|
export interface Talent {
|
|
10
7
|
name: string;
|