deepwoken 0.1.8 → 0.1.9
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 +1 -1
- package/pkg/deepwoken.d.ts +10 -5
- package/pkg/deepwoken.js +45 -11
- package/pkg/deepwoken_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/deepwoken.d.ts
CHANGED
|
@@ -38,9 +38,12 @@ export class StatMap {
|
|
|
38
38
|
constructor(map: any);
|
|
39
39
|
remaining(): number;
|
|
40
40
|
set(stat: string, value: number): void;
|
|
41
|
+
shrineOrder(racial: StatMap): StatMap;
|
|
41
42
|
toJSON(): any;
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
export function shrineOrderDwb(pre: StatMap, racial: StatMap): StatMap;
|
|
46
|
+
|
|
44
47
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
45
48
|
|
|
46
49
|
export interface InitOutput {
|
|
@@ -60,6 +63,7 @@ export interface InitOutput {
|
|
|
60
63
|
readonly deepdata_outfits: (a: number) => [number, number, number];
|
|
61
64
|
readonly deepdata_talents: (a: number) => [number, number, number];
|
|
62
65
|
readonly deepdata_weapons: (a: number) => [number, number, number];
|
|
66
|
+
readonly shrineOrderDwb: (a: number, b: number) => number;
|
|
63
67
|
readonly statmap_cost: (a: number) => number;
|
|
64
68
|
readonly statmap_get: (a: number, b: number, c: number) => [number, number, number];
|
|
65
69
|
readonly statmap_level: (a: number) => number;
|
|
@@ -67,11 +71,12 @@ export interface InitOutput {
|
|
|
67
71
|
readonly statmap_remaining: (a: number) => number;
|
|
68
72
|
readonly statmap_set: (a: number, b: number, c: number, d: number) => [number, number];
|
|
69
73
|
readonly statmap_toJSON: (a: number) => [number, number, number];
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
73
|
-
readonly
|
|
74
|
-
readonly
|
|
74
|
+
readonly statmap_shrineOrder: (a: number, b: number) => number;
|
|
75
|
+
readonly wasm_bindgen__closure__destroy__hfbac65673247baa3: (a: number, b: number) => void;
|
|
76
|
+
readonly wasm_bindgen__closure__destroy__h22f2fd8de233cef9: (a: number, b: number) => void;
|
|
77
|
+
readonly wasm_bindgen__convert__closures_____invoke__h462ab53fb1f380e1: (a: number, b: number, c: any) => [number, number];
|
|
78
|
+
readonly wasm_bindgen__convert__closures_____invoke__h3f8186ac2655158b: (a: number, b: number, c: any, d: any) => void;
|
|
79
|
+
readonly wasm_bindgen__convert__closures_____invoke__hcf18b6c4eb572639: (a: number, b: number) => void;
|
|
75
80
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
76
81
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
77
82
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/pkg/deepwoken.js
CHANGED
|
@@ -173,6 +173,13 @@ export class DeepData {
|
|
|
173
173
|
if (Symbol.dispose) DeepData.prototype[Symbol.dispose] = DeepData.prototype.free;
|
|
174
174
|
|
|
175
175
|
export class StatMap {
|
|
176
|
+
static __wrap(ptr) {
|
|
177
|
+
ptr = ptr >>> 0;
|
|
178
|
+
const obj = Object.create(StatMap.prototype);
|
|
179
|
+
obj.__wbg_ptr = ptr;
|
|
180
|
+
StatMapFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
181
|
+
return obj;
|
|
182
|
+
}
|
|
176
183
|
__destroy_into_raw() {
|
|
177
184
|
const ptr = this.__wbg_ptr;
|
|
178
185
|
this.__wbg_ptr = 0;
|
|
@@ -241,6 +248,15 @@ export class StatMap {
|
|
|
241
248
|
throw takeFromExternrefTable0(ret[0]);
|
|
242
249
|
}
|
|
243
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* @param {StatMap} racial
|
|
253
|
+
* @returns {StatMap}
|
|
254
|
+
*/
|
|
255
|
+
shrineOrder(racial) {
|
|
256
|
+
_assertClass(racial, StatMap);
|
|
257
|
+
const ret = wasm.statmap_shrineOrder(this.__wbg_ptr, racial.__wbg_ptr);
|
|
258
|
+
return StatMap.__wrap(ret);
|
|
259
|
+
}
|
|
244
260
|
/**
|
|
245
261
|
* @returns {any}
|
|
246
262
|
*/
|
|
@@ -254,6 +270,18 @@ export class StatMap {
|
|
|
254
270
|
}
|
|
255
271
|
if (Symbol.dispose) StatMap.prototype[Symbol.dispose] = StatMap.prototype.free;
|
|
256
272
|
|
|
273
|
+
/**
|
|
274
|
+
* @param {StatMap} pre
|
|
275
|
+
* @param {StatMap} racial
|
|
276
|
+
* @returns {StatMap}
|
|
277
|
+
*/
|
|
278
|
+
export function shrineOrderDwb(pre, racial) {
|
|
279
|
+
_assertClass(pre, StatMap);
|
|
280
|
+
_assertClass(racial, StatMap);
|
|
281
|
+
const ret = wasm.shrineOrderDwb(pre.__wbg_ptr, racial.__wbg_ptr);
|
|
282
|
+
return StatMap.__wrap(ret);
|
|
283
|
+
}
|
|
284
|
+
|
|
257
285
|
function __wbg_get_imports() {
|
|
258
286
|
const import0 = {
|
|
259
287
|
__proto__: null,
|
|
@@ -485,7 +513,7 @@ function __wbg_get_imports() {
|
|
|
485
513
|
const a = state0.a;
|
|
486
514
|
state0.a = 0;
|
|
487
515
|
try {
|
|
488
|
-
return
|
|
516
|
+
return wasm_bindgen__convert__closures_____invoke__h3f8186ac2655158b(a, state0.b, arg0, arg1);
|
|
489
517
|
} finally {
|
|
490
518
|
state0.a = a;
|
|
491
519
|
}
|
|
@@ -609,13 +637,13 @@ function __wbg_get_imports() {
|
|
|
609
637
|
return ret;
|
|
610
638
|
},
|
|
611
639
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
612
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
613
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
640
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 147, function: Function { arguments: [], shim_idx: 148, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
641
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hfbac65673247baa3, wasm_bindgen__convert__closures_____invoke__hcf18b6c4eb572639);
|
|
614
642
|
return ret;
|
|
615
643
|
},
|
|
616
644
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
617
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
618
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
645
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 167, function: Function { arguments: [Externref], shim_idx: 168, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
646
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h22f2fd8de233cef9, wasm_bindgen__convert__closures_____invoke__h462ab53fb1f380e1);
|
|
619
647
|
return ret;
|
|
620
648
|
},
|
|
621
649
|
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
@@ -649,19 +677,19 @@ function __wbg_get_imports() {
|
|
|
649
677
|
};
|
|
650
678
|
}
|
|
651
679
|
|
|
652
|
-
function
|
|
653
|
-
wasm.
|
|
680
|
+
function wasm_bindgen__convert__closures_____invoke__hcf18b6c4eb572639(arg0, arg1) {
|
|
681
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hcf18b6c4eb572639(arg0, arg1);
|
|
654
682
|
}
|
|
655
683
|
|
|
656
|
-
function
|
|
657
|
-
const ret = wasm.
|
|
684
|
+
function wasm_bindgen__convert__closures_____invoke__h462ab53fb1f380e1(arg0, arg1, arg2) {
|
|
685
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h462ab53fb1f380e1(arg0, arg1, arg2);
|
|
658
686
|
if (ret[1]) {
|
|
659
687
|
throw takeFromExternrefTable0(ret[0]);
|
|
660
688
|
}
|
|
661
689
|
}
|
|
662
690
|
|
|
663
|
-
function
|
|
664
|
-
wasm.
|
|
691
|
+
function wasm_bindgen__convert__closures_____invoke__h3f8186ac2655158b(arg0, arg1, arg2, arg3) {
|
|
692
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h3f8186ac2655158b(arg0, arg1, arg2, arg3);
|
|
665
693
|
}
|
|
666
694
|
|
|
667
695
|
|
|
@@ -685,6 +713,12 @@ function addToExternrefTable0(obj) {
|
|
|
685
713
|
return idx;
|
|
686
714
|
}
|
|
687
715
|
|
|
716
|
+
function _assertClass(instance, klass) {
|
|
717
|
+
if (!(instance instanceof klass)) {
|
|
718
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
|
|
688
722
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
689
723
|
? { register: () => {}, unregister: () => {} }
|
|
690
724
|
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
package/pkg/deepwoken_bg.wasm
CHANGED
|
Binary file
|