@r2o3/rgskin-nodejs 0.0.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/LICENSE +7 -0
- package/README.md +350 -0
- package/package.json +28 -0
- package/rgskin.d.ts +316 -0
- package/rgskin.js +3650 -0
- package/rgskin_bg.wasm +0 -0
package/rgskin.js
ADDED
|
@@ -0,0 +1,3650 @@
|
|
|
1
|
+
|
|
2
|
+
let imports = {};
|
|
3
|
+
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
|
+
|
|
5
|
+
const { createDirAll, isDirectory, joinPath, readDir, readFileBytes, readFileString, writeFile } = require(String.raw`./snippets/rgskin-ddf01b385d257895/inline0.js`);
|
|
6
|
+
|
|
7
|
+
function addToExternrefTable0(obj) {
|
|
8
|
+
const idx = wasm.__externref_table_alloc();
|
|
9
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
10
|
+
return idx;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function _assertClass(instance, klass) {
|
|
14
|
+
if (!(instance instanceof klass)) {
|
|
15
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function debugString(val) {
|
|
20
|
+
// primitive types
|
|
21
|
+
const type = typeof val;
|
|
22
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
23
|
+
return `${val}`;
|
|
24
|
+
}
|
|
25
|
+
if (type == 'string') {
|
|
26
|
+
return `"${val}"`;
|
|
27
|
+
}
|
|
28
|
+
if (type == 'symbol') {
|
|
29
|
+
const description = val.description;
|
|
30
|
+
if (description == null) {
|
|
31
|
+
return 'Symbol';
|
|
32
|
+
} else {
|
|
33
|
+
return `Symbol(${description})`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (type == 'function') {
|
|
37
|
+
const name = val.name;
|
|
38
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
39
|
+
return `Function(${name})`;
|
|
40
|
+
} else {
|
|
41
|
+
return 'Function';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// objects
|
|
45
|
+
if (Array.isArray(val)) {
|
|
46
|
+
const length = val.length;
|
|
47
|
+
let debug = '[';
|
|
48
|
+
if (length > 0) {
|
|
49
|
+
debug += debugString(val[0]);
|
|
50
|
+
}
|
|
51
|
+
for(let i = 1; i < length; i++) {
|
|
52
|
+
debug += ', ' + debugString(val[i]);
|
|
53
|
+
}
|
|
54
|
+
debug += ']';
|
|
55
|
+
return debug;
|
|
56
|
+
}
|
|
57
|
+
// Test for built-in
|
|
58
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
59
|
+
let className;
|
|
60
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
61
|
+
className = builtInMatches[1];
|
|
62
|
+
} else {
|
|
63
|
+
// Failed to match the standard '[object ClassName]'
|
|
64
|
+
return toString.call(val);
|
|
65
|
+
}
|
|
66
|
+
if (className == 'Object') {
|
|
67
|
+
// we're a user defined class or Object
|
|
68
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
69
|
+
// easier than looping through ownProperties of `val`.
|
|
70
|
+
try {
|
|
71
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
72
|
+
} catch (_) {
|
|
73
|
+
return 'Object';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// errors
|
|
77
|
+
if (val instanceof Error) {
|
|
78
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
79
|
+
}
|
|
80
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
81
|
+
return className;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
85
|
+
ptr = ptr >>> 0;
|
|
86
|
+
const mem = getDataViewMemory0();
|
|
87
|
+
const result = [];
|
|
88
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
89
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
90
|
+
}
|
|
91
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
92
|
+
return result;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function getArrayU16FromWasm0(ptr, len) {
|
|
96
|
+
ptr = ptr >>> 0;
|
|
97
|
+
return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
101
|
+
ptr = ptr >>> 0;
|
|
102
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
106
|
+
ptr = ptr >>> 0;
|
|
107
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
let cachedDataViewMemory0 = null;
|
|
111
|
+
function getDataViewMemory0() {
|
|
112
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
113
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
114
|
+
}
|
|
115
|
+
return cachedDataViewMemory0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function getStringFromWasm0(ptr, len) {
|
|
119
|
+
ptr = ptr >>> 0;
|
|
120
|
+
return decodeText(ptr, len);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
let cachedUint16ArrayMemory0 = null;
|
|
124
|
+
function getUint16ArrayMemory0() {
|
|
125
|
+
if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
|
|
126
|
+
cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
|
|
127
|
+
}
|
|
128
|
+
return cachedUint16ArrayMemory0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
let cachedUint32ArrayMemory0 = null;
|
|
132
|
+
function getUint32ArrayMemory0() {
|
|
133
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
134
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
135
|
+
}
|
|
136
|
+
return cachedUint32ArrayMemory0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
let cachedUint8ArrayMemory0 = null;
|
|
140
|
+
function getUint8ArrayMemory0() {
|
|
141
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
142
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
143
|
+
}
|
|
144
|
+
return cachedUint8ArrayMemory0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function handleError(f, args) {
|
|
148
|
+
try {
|
|
149
|
+
return f.apply(this, args);
|
|
150
|
+
} catch (e) {
|
|
151
|
+
const idx = addToExternrefTable0(e);
|
|
152
|
+
wasm.__wbindgen_exn_store(idx);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function isLikeNone(x) {
|
|
157
|
+
return x === undefined || x === null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function passArray16ToWasm0(arg, malloc) {
|
|
161
|
+
const ptr = malloc(arg.length * 2, 2) >>> 0;
|
|
162
|
+
getUint16ArrayMemory0().set(arg, ptr / 2);
|
|
163
|
+
WASM_VECTOR_LEN = arg.length;
|
|
164
|
+
return ptr;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
168
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
169
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
170
|
+
WASM_VECTOR_LEN = arg.length;
|
|
171
|
+
return ptr;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
175
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
176
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
177
|
+
WASM_VECTOR_LEN = arg.length;
|
|
178
|
+
return ptr;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
182
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
183
|
+
for (let i = 0; i < array.length; i++) {
|
|
184
|
+
const add = addToExternrefTable0(array[i]);
|
|
185
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
186
|
+
}
|
|
187
|
+
WASM_VECTOR_LEN = array.length;
|
|
188
|
+
return ptr;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
192
|
+
if (realloc === undefined) {
|
|
193
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
194
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
195
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
196
|
+
WASM_VECTOR_LEN = buf.length;
|
|
197
|
+
return ptr;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
let len = arg.length;
|
|
201
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
202
|
+
|
|
203
|
+
const mem = getUint8ArrayMemory0();
|
|
204
|
+
|
|
205
|
+
let offset = 0;
|
|
206
|
+
|
|
207
|
+
for (; offset < len; offset++) {
|
|
208
|
+
const code = arg.charCodeAt(offset);
|
|
209
|
+
if (code > 0x7F) break;
|
|
210
|
+
mem[ptr + offset] = code;
|
|
211
|
+
}
|
|
212
|
+
if (offset !== len) {
|
|
213
|
+
if (offset !== 0) {
|
|
214
|
+
arg = arg.slice(offset);
|
|
215
|
+
}
|
|
216
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
217
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
218
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
219
|
+
|
|
220
|
+
offset += ret.written;
|
|
221
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
WASM_VECTOR_LEN = offset;
|
|
225
|
+
return ptr;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function takeFromExternrefTable0(idx) {
|
|
229
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
230
|
+
wasm.__externref_table_dealloc(idx);
|
|
231
|
+
return value;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
235
|
+
cachedTextDecoder.decode();
|
|
236
|
+
function decodeText(ptr, len) {
|
|
237
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const cachedTextEncoder = new TextEncoder();
|
|
241
|
+
|
|
242
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
243
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
244
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
245
|
+
view.set(buf);
|
|
246
|
+
return {
|
|
247
|
+
read: arg.length,
|
|
248
|
+
written: buf.length
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
let WASM_VECTOR_LEN = 0;
|
|
254
|
+
|
|
255
|
+
const BinaryStoreFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
256
|
+
? { register: () => {}, unregister: () => {} }
|
|
257
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_binarystore_free(ptr >>> 0, 1));
|
|
258
|
+
|
|
259
|
+
const FluXisKeymodeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
260
|
+
? { register: () => {}, unregister: () => {} }
|
|
261
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_fluxiskeymode_free(ptr >>> 0, 1));
|
|
262
|
+
|
|
263
|
+
const FluXisLayoutFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
264
|
+
? { register: () => {}, unregister: () => {} }
|
|
265
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_fluxislayout_free(ptr >>> 0, 1));
|
|
266
|
+
|
|
267
|
+
const FluXisSkinFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
268
|
+
? { register: () => {}, unregister: () => {} }
|
|
269
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_fluxisskin_free(ptr >>> 0, 1));
|
|
270
|
+
|
|
271
|
+
const FluXisSkinWithLayoutFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
272
|
+
? { register: () => {}, unregister: () => {} }
|
|
273
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_fluxisskinwithlayout_free(ptr >>> 0, 1));
|
|
274
|
+
|
|
275
|
+
const GeneralFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
276
|
+
? { register: () => {}, unregister: () => {} }
|
|
277
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_general_free(ptr >>> 0, 1));
|
|
278
|
+
|
|
279
|
+
const GenericManiaSkinFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
280
|
+
? { register: () => {}, unregister: () => {} }
|
|
281
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_genericmaniaskin_free(ptr >>> 0, 1));
|
|
282
|
+
|
|
283
|
+
const InfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
284
|
+
? { register: () => {}, unregister: () => {} }
|
|
285
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_info_free(ptr >>> 0, 1));
|
|
286
|
+
|
|
287
|
+
const KeymodeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
288
|
+
? { register: () => {}, unregister: () => {} }
|
|
289
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_keymode_free(ptr >>> 0, 1));
|
|
290
|
+
|
|
291
|
+
const OsuKeymodeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
292
|
+
? { register: () => {}, unregister: () => {} }
|
|
293
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_osukeymode_free(ptr >>> 0, 1));
|
|
294
|
+
|
|
295
|
+
const OsuSkinFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
296
|
+
? { register: () => {}, unregister: () => {} }
|
|
297
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_osuskin_free(ptr >>> 0, 1));
|
|
298
|
+
|
|
299
|
+
const OsuSkinIniFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
300
|
+
? { register: () => {}, unregister: () => {} }
|
|
301
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_osuskinini_free(ptr >>> 0, 1));
|
|
302
|
+
|
|
303
|
+
const RawBytesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
304
|
+
? { register: () => {}, unregister: () => {} }
|
|
305
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rawbytes_free(ptr >>> 0, 1));
|
|
306
|
+
|
|
307
|
+
const SkinJsonFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
308
|
+
? { register: () => {}, unregister: () => {} }
|
|
309
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_skinjson_free(ptr >>> 0, 1));
|
|
310
|
+
|
|
311
|
+
const TextureFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
312
|
+
? { register: () => {}, unregister: () => {} }
|
|
313
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_texture_free(ptr >>> 0, 1));
|
|
314
|
+
|
|
315
|
+
const TextureStoreFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
316
|
+
? { register: () => {}, unregister: () => {} }
|
|
317
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_texturestore_free(ptr >>> 0, 1));
|
|
318
|
+
|
|
319
|
+
class BinaryStore {
|
|
320
|
+
static __wrap(ptr) {
|
|
321
|
+
ptr = ptr >>> 0;
|
|
322
|
+
const obj = Object.create(BinaryStore.prototype);
|
|
323
|
+
obj.__wbg_ptr = ptr;
|
|
324
|
+
BinaryStoreFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
325
|
+
return obj;
|
|
326
|
+
}
|
|
327
|
+
__destroy_into_raw() {
|
|
328
|
+
const ptr = this.__wbg_ptr;
|
|
329
|
+
this.__wbg_ptr = 0;
|
|
330
|
+
BinaryStoreFinalization.unregister(this);
|
|
331
|
+
return ptr;
|
|
332
|
+
}
|
|
333
|
+
free() {
|
|
334
|
+
const ptr = this.__destroy_into_raw();
|
|
335
|
+
wasm.__wbg_binarystore_free(ptr, 0);
|
|
336
|
+
}
|
|
337
|
+
constructor() {
|
|
338
|
+
const ret = wasm.binarystore_new();
|
|
339
|
+
this.__wbg_ptr = ret >>> 0;
|
|
340
|
+
BinaryStoreFinalization.register(this, this.__wbg_ptr, this);
|
|
341
|
+
return this;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* @param {RawBytes} binary
|
|
345
|
+
*/
|
|
346
|
+
insertBinary(binary) {
|
|
347
|
+
_assertClass(binary, RawBytes);
|
|
348
|
+
var ptr0 = binary.__destroy_into_raw();
|
|
349
|
+
wasm.binarystore_insertBinary(this.__wbg_ptr, ptr0);
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* @param {string} new_path
|
|
353
|
+
* @param {RawBytes} binary
|
|
354
|
+
* @returns {string}
|
|
355
|
+
*/
|
|
356
|
+
makeUnique(new_path, binary) {
|
|
357
|
+
let deferred3_0;
|
|
358
|
+
let deferred3_1;
|
|
359
|
+
try {
|
|
360
|
+
const ptr0 = passStringToWasm0(new_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
361
|
+
const len0 = WASM_VECTOR_LEN;
|
|
362
|
+
_assertClass(binary, RawBytes);
|
|
363
|
+
var ptr1 = binary.__destroy_into_raw();
|
|
364
|
+
const ret = wasm.binarystore_makeUnique(this.__wbg_ptr, ptr0, len0, ptr1);
|
|
365
|
+
deferred3_0 = ret[0];
|
|
366
|
+
deferred3_1 = ret[1];
|
|
367
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
368
|
+
} finally {
|
|
369
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* @param {string} path
|
|
374
|
+
* @param {ArrayBuffer} buffer
|
|
375
|
+
*/
|
|
376
|
+
loadFromArrayBuffer(path, buffer) {
|
|
377
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
378
|
+
const len0 = WASM_VECTOR_LEN;
|
|
379
|
+
const ret = wasm.binarystore_loadFromArrayBuffer(this.__wbg_ptr, ptr0, len0, buffer);
|
|
380
|
+
if (ret[1]) {
|
|
381
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* @param {string} path
|
|
386
|
+
* @param {Uint8Array} array
|
|
387
|
+
*/
|
|
388
|
+
loadFromUint8Array(path, array) {
|
|
389
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
390
|
+
const len0 = WASM_VECTOR_LEN;
|
|
391
|
+
const ret = wasm.binarystore_loadFromUint8Array(this.__wbg_ptr, ptr0, len0, array);
|
|
392
|
+
if (ret[1]) {
|
|
393
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* @returns {boolean}
|
|
398
|
+
*/
|
|
399
|
+
allLoaded() {
|
|
400
|
+
const ret = wasm.binarystore_allLoaded(this.__wbg_ptr);
|
|
401
|
+
return ret !== 0;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* @returns {number}
|
|
405
|
+
*/
|
|
406
|
+
loadedCount() {
|
|
407
|
+
const ret = wasm.binarystore_loadedCount(this.__wbg_ptr);
|
|
408
|
+
return ret >>> 0;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* @returns {Array<any>}
|
|
412
|
+
*/
|
|
413
|
+
unloadedPaths() {
|
|
414
|
+
const ret = wasm.binarystore_unloadedPaths(this.__wbg_ptr);
|
|
415
|
+
return ret;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* @param {string} path
|
|
419
|
+
* @returns {boolean}
|
|
420
|
+
*/
|
|
421
|
+
hasBinary(path) {
|
|
422
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
423
|
+
const len0 = WASM_VECTOR_LEN;
|
|
424
|
+
const ret = wasm.binarystore_contains(this.__wbg_ptr, ptr0, len0);
|
|
425
|
+
return ret !== 0;
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* @param {string} path
|
|
429
|
+
* @returns {string | undefined}
|
|
430
|
+
*/
|
|
431
|
+
getBinaryPath(path) {
|
|
432
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
433
|
+
const len0 = WASM_VECTOR_LEN;
|
|
434
|
+
const ret = wasm.binarystore_getBinaryPath(this.__wbg_ptr, ptr0, len0);
|
|
435
|
+
let v2;
|
|
436
|
+
if (ret[0] !== 0) {
|
|
437
|
+
v2 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
438
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
439
|
+
}
|
|
440
|
+
return v2;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* @param {string} path
|
|
444
|
+
* @returns {boolean}
|
|
445
|
+
*/
|
|
446
|
+
binaryHasData(path) {
|
|
447
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
448
|
+
const len0 = WASM_VECTOR_LEN;
|
|
449
|
+
const ret = wasm.binarystore_binaryHasData(this.__wbg_ptr, ptr0, len0);
|
|
450
|
+
return ret !== 0;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* @param {string} path
|
|
454
|
+
* @returns {Uint8Array | undefined}
|
|
455
|
+
*/
|
|
456
|
+
getBinaryData(path) {
|
|
457
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
458
|
+
const len0 = WASM_VECTOR_LEN;
|
|
459
|
+
const ret = wasm.binarystore_getBinaryData(this.__wbg_ptr, ptr0, len0);
|
|
460
|
+
return ret;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* @param {string} path
|
|
464
|
+
* @returns {boolean}
|
|
465
|
+
*/
|
|
466
|
+
contains(path) {
|
|
467
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
468
|
+
const len0 = WASM_VECTOR_LEN;
|
|
469
|
+
const ret = wasm.binarystore_contains(this.__wbg_ptr, ptr0, len0);
|
|
470
|
+
return ret !== 0;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* @param {string} path
|
|
474
|
+
* @returns {boolean}
|
|
475
|
+
*/
|
|
476
|
+
remove(path) {
|
|
477
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
478
|
+
const len0 = WASM_VECTOR_LEN;
|
|
479
|
+
const ret = wasm.binarystore_remove(this.__wbg_ptr, ptr0, len0);
|
|
480
|
+
return ret !== 0;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* @returns {number}
|
|
484
|
+
*/
|
|
485
|
+
getLength() {
|
|
486
|
+
const ret = wasm.binarystore_getLength(this.__wbg_ptr);
|
|
487
|
+
return ret >>> 0;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* @returns {boolean}
|
|
491
|
+
*/
|
|
492
|
+
isEmpty() {
|
|
493
|
+
const ret = wasm.binarystore_isEmpty(this.__wbg_ptr);
|
|
494
|
+
return ret !== 0;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* @returns {Array<any>}
|
|
498
|
+
*/
|
|
499
|
+
getPaths() {
|
|
500
|
+
const ret = wasm.binarystore_getPaths(this.__wbg_ptr);
|
|
501
|
+
return ret;
|
|
502
|
+
}
|
|
503
|
+
clear() {
|
|
504
|
+
wasm.binarystore_clear(this.__wbg_ptr);
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* @param {string} original_path
|
|
508
|
+
* @param {string} new_path
|
|
509
|
+
* @returns {string | undefined}
|
|
510
|
+
*/
|
|
511
|
+
copy(original_path, new_path) {
|
|
512
|
+
const ptr0 = passStringToWasm0(original_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
513
|
+
const len0 = WASM_VECTOR_LEN;
|
|
514
|
+
const ptr1 = passStringToWasm0(new_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
515
|
+
const len1 = WASM_VECTOR_LEN;
|
|
516
|
+
const ret = wasm.binarystore_copy(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
517
|
+
let v3;
|
|
518
|
+
if (ret[0] !== 0) {
|
|
519
|
+
v3 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
520
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
521
|
+
}
|
|
522
|
+
return v3;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* @param {string} original_path
|
|
526
|
+
* @param {string} new_base_path
|
|
527
|
+
* @returns {string | undefined}
|
|
528
|
+
*/
|
|
529
|
+
makeUniqueCopy(original_path, new_base_path) {
|
|
530
|
+
const ptr0 = passStringToWasm0(original_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
531
|
+
const len0 = WASM_VECTOR_LEN;
|
|
532
|
+
const ptr1 = passStringToWasm0(new_base_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
533
|
+
const len1 = WASM_VECTOR_LEN;
|
|
534
|
+
const ret = wasm.binarystore_makeUniqueCopy(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
535
|
+
let v3;
|
|
536
|
+
if (ret[0] !== 0) {
|
|
537
|
+
v3 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
538
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
539
|
+
}
|
|
540
|
+
return v3;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
if (Symbol.dispose) BinaryStore.prototype[Symbol.dispose] = BinaryStore.prototype.free;
|
|
544
|
+
exports.BinaryStore = BinaryStore;
|
|
545
|
+
|
|
546
|
+
class FluXisKeymode {
|
|
547
|
+
static __wrap(ptr) {
|
|
548
|
+
ptr = ptr >>> 0;
|
|
549
|
+
const obj = Object.create(FluXisKeymode.prototype);
|
|
550
|
+
obj.__wbg_ptr = ptr;
|
|
551
|
+
FluXisKeymodeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
552
|
+
return obj;
|
|
553
|
+
}
|
|
554
|
+
static __unwrap(jsValue) {
|
|
555
|
+
if (!(jsValue instanceof FluXisKeymode)) {
|
|
556
|
+
return 0;
|
|
557
|
+
}
|
|
558
|
+
return jsValue.__destroy_into_raw();
|
|
559
|
+
}
|
|
560
|
+
__destroy_into_raw() {
|
|
561
|
+
const ptr = this.__wbg_ptr;
|
|
562
|
+
this.__wbg_ptr = 0;
|
|
563
|
+
FluXisKeymodeFinalization.unregister(this);
|
|
564
|
+
return ptr;
|
|
565
|
+
}
|
|
566
|
+
free() {
|
|
567
|
+
const ptr = this.__destroy_into_raw();
|
|
568
|
+
wasm.__wbg_fluxiskeymode_free(ptr, 0);
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* @returns {number}
|
|
572
|
+
*/
|
|
573
|
+
get keymode() {
|
|
574
|
+
const ret = wasm.__wbg_get_fluxiskeymode_keymode(this.__wbg_ptr);
|
|
575
|
+
return ret;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* @param {number} arg0
|
|
579
|
+
*/
|
|
580
|
+
set keymode(arg0) {
|
|
581
|
+
wasm.__wbg_set_fluxiskeymode_keymode(this.__wbg_ptr, arg0);
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* @returns {number}
|
|
585
|
+
*/
|
|
586
|
+
get column_width() {
|
|
587
|
+
const ret = wasm.__wbg_get_fluxiskeymode_column_width(this.__wbg_ptr);
|
|
588
|
+
return ret >>> 0;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* @param {number} arg0
|
|
592
|
+
*/
|
|
593
|
+
set column_width(arg0) {
|
|
594
|
+
wasm.__wbg_set_fluxiskeymode_column_width(this.__wbg_ptr, arg0);
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* @returns {number}
|
|
598
|
+
*/
|
|
599
|
+
get hit_position() {
|
|
600
|
+
const ret = wasm.__wbg_get_fluxiskeymode_hit_position(this.__wbg_ptr);
|
|
601
|
+
return ret;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* @param {number} arg0
|
|
605
|
+
*/
|
|
606
|
+
set hit_position(arg0) {
|
|
607
|
+
wasm.__wbg_set_fluxiskeymode_hit_position(this.__wbg_ptr, arg0);
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* @returns {boolean}
|
|
611
|
+
*/
|
|
612
|
+
get tint_notes() {
|
|
613
|
+
const ret = wasm.__wbg_get_fluxiskeymode_tint_notes(this.__wbg_ptr);
|
|
614
|
+
return ret !== 0;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* @param {boolean} arg0
|
|
618
|
+
*/
|
|
619
|
+
set tint_notes(arg0) {
|
|
620
|
+
wasm.__wbg_set_fluxiskeymode_tint_notes(this.__wbg_ptr, arg0);
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* @returns {boolean}
|
|
624
|
+
*/
|
|
625
|
+
get tint_lns() {
|
|
626
|
+
const ret = wasm.__wbg_get_fluxiskeymode_tint_lns(this.__wbg_ptr);
|
|
627
|
+
return ret !== 0;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* @param {boolean} arg0
|
|
631
|
+
*/
|
|
632
|
+
set tint_lns(arg0) {
|
|
633
|
+
wasm.__wbg_set_fluxiskeymode_tint_lns(this.__wbg_ptr, arg0);
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* @returns {boolean}
|
|
637
|
+
*/
|
|
638
|
+
get tint_receptors() {
|
|
639
|
+
const ret = wasm.__wbg_get_fluxiskeymode_tint_receptors(this.__wbg_ptr);
|
|
640
|
+
return ret !== 0;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* @param {boolean} arg0
|
|
644
|
+
*/
|
|
645
|
+
set tint_receptors(arg0) {
|
|
646
|
+
wasm.__wbg_set_fluxiskeymode_tint_receptors(this.__wbg_ptr, arg0);
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* @returns {string[]}
|
|
650
|
+
*/
|
|
651
|
+
get colors() {
|
|
652
|
+
const ret = wasm.__wbg_get_fluxiskeymode_colors(this.__wbg_ptr);
|
|
653
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
654
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
655
|
+
return v1;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* @param {string[]} arg0
|
|
659
|
+
*/
|
|
660
|
+
set colors(arg0) {
|
|
661
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
662
|
+
const len0 = WASM_VECTOR_LEN;
|
|
663
|
+
wasm.__wbg_set_fluxiskeymode_colors(this.__wbg_ptr, ptr0, len0);
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* @returns {boolean}
|
|
667
|
+
*/
|
|
668
|
+
get receptors_first() {
|
|
669
|
+
const ret = wasm.__wbg_get_fluxiskeymode_receptors_first(this.__wbg_ptr);
|
|
670
|
+
return ret !== 0;
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* @param {boolean} arg0
|
|
674
|
+
*/
|
|
675
|
+
set receptors_first(arg0) {
|
|
676
|
+
wasm.__wbg_set_fluxiskeymode_receptors_first(this.__wbg_ptr, arg0);
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* @returns {number}
|
|
680
|
+
*/
|
|
681
|
+
get receptor_offset() {
|
|
682
|
+
const ret = wasm.__wbg_get_fluxiskeymode_receptor_offset(this.__wbg_ptr);
|
|
683
|
+
return ret;
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* @param {number} arg0
|
|
687
|
+
*/
|
|
688
|
+
set receptor_offset(arg0) {
|
|
689
|
+
wasm.__wbg_set_fluxiskeymode_receptor_offset(this.__wbg_ptr, arg0);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
if (Symbol.dispose) FluXisKeymode.prototype[Symbol.dispose] = FluXisKeymode.prototype.free;
|
|
693
|
+
exports.FluXisKeymode = FluXisKeymode;
|
|
694
|
+
|
|
695
|
+
class FluXisLayout {
|
|
696
|
+
static __wrap(ptr) {
|
|
697
|
+
ptr = ptr >>> 0;
|
|
698
|
+
const obj = Object.create(FluXisLayout.prototype);
|
|
699
|
+
obj.__wbg_ptr = ptr;
|
|
700
|
+
FluXisLayoutFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
701
|
+
return obj;
|
|
702
|
+
}
|
|
703
|
+
__destroy_into_raw() {
|
|
704
|
+
const ptr = this.__wbg_ptr;
|
|
705
|
+
this.__wbg_ptr = 0;
|
|
706
|
+
FluXisLayoutFinalization.unregister(this);
|
|
707
|
+
return ptr;
|
|
708
|
+
}
|
|
709
|
+
free() {
|
|
710
|
+
const ptr = this.__destroy_into_raw();
|
|
711
|
+
wasm.__wbg_fluxislayout_free(ptr, 0);
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* @returns {string}
|
|
715
|
+
*/
|
|
716
|
+
get name() {
|
|
717
|
+
let deferred1_0;
|
|
718
|
+
let deferred1_1;
|
|
719
|
+
try {
|
|
720
|
+
const ret = wasm.__wbg_get_fluxislayout_name(this.__wbg_ptr);
|
|
721
|
+
deferred1_0 = ret[0];
|
|
722
|
+
deferred1_1 = ret[1];
|
|
723
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
724
|
+
} finally {
|
|
725
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* @param {string} arg0
|
|
730
|
+
*/
|
|
731
|
+
set name(arg0) {
|
|
732
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
733
|
+
const len0 = WASM_VECTOR_LEN;
|
|
734
|
+
wasm.__wbg_set_fluxislayout_name(this.__wbg_ptr, ptr0, len0);
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* @returns {string}
|
|
738
|
+
*/
|
|
739
|
+
get author() {
|
|
740
|
+
let deferred1_0;
|
|
741
|
+
let deferred1_1;
|
|
742
|
+
try {
|
|
743
|
+
const ret = wasm.__wbg_get_fluxislayout_author(this.__wbg_ptr);
|
|
744
|
+
deferred1_0 = ret[0];
|
|
745
|
+
deferred1_1 = ret[1];
|
|
746
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
747
|
+
} finally {
|
|
748
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* @param {string} arg0
|
|
753
|
+
*/
|
|
754
|
+
set author(arg0) {
|
|
755
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
756
|
+
const len0 = WASM_VECTOR_LEN;
|
|
757
|
+
wasm.__wbg_set_fluxislayout_author(this.__wbg_ptr, ptr0, len0);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
if (Symbol.dispose) FluXisLayout.prototype[Symbol.dispose] = FluXisLayout.prototype.free;
|
|
761
|
+
exports.FluXisLayout = FluXisLayout;
|
|
762
|
+
|
|
763
|
+
class FluXisSkin {
|
|
764
|
+
static __wrap(ptr) {
|
|
765
|
+
ptr = ptr >>> 0;
|
|
766
|
+
const obj = Object.create(FluXisSkin.prototype);
|
|
767
|
+
obj.__wbg_ptr = ptr;
|
|
768
|
+
FluXisSkinFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
769
|
+
return obj;
|
|
770
|
+
}
|
|
771
|
+
__destroy_into_raw() {
|
|
772
|
+
const ptr = this.__wbg_ptr;
|
|
773
|
+
this.__wbg_ptr = 0;
|
|
774
|
+
FluXisSkinFinalization.unregister(this);
|
|
775
|
+
return ptr;
|
|
776
|
+
}
|
|
777
|
+
free() {
|
|
778
|
+
const ptr = this.__destroy_into_raw();
|
|
779
|
+
wasm.__wbg_fluxisskin_free(ptr, 0);
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* @returns {SkinJson}
|
|
783
|
+
*/
|
|
784
|
+
get skin_json() {
|
|
785
|
+
const ret = wasm.__wbg_get_fluxisskin_skin_json(this.__wbg_ptr);
|
|
786
|
+
return SkinJson.__wrap(ret);
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* @param {SkinJson} arg0
|
|
790
|
+
*/
|
|
791
|
+
set skin_json(arg0) {
|
|
792
|
+
_assertClass(arg0, SkinJson);
|
|
793
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
794
|
+
wasm.__wbg_set_fluxisskin_skin_json(this.__wbg_ptr, ptr0);
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* @returns {TextureStore}
|
|
798
|
+
*/
|
|
799
|
+
get textures() {
|
|
800
|
+
const ret = wasm.__wbg_get_fluxisskin_textures(this.__wbg_ptr);
|
|
801
|
+
return TextureStore.__wrap(ret);
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* @param {TextureStore} arg0
|
|
805
|
+
*/
|
|
806
|
+
set textures(arg0) {
|
|
807
|
+
_assertClass(arg0, TextureStore);
|
|
808
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
809
|
+
wasm.__wbg_set_fluxisskin_textures(this.__wbg_ptr, ptr0);
|
|
810
|
+
}
|
|
811
|
+
/**
|
|
812
|
+
* @returns {BinaryStore}
|
|
813
|
+
*/
|
|
814
|
+
get samples() {
|
|
815
|
+
const ret = wasm.__wbg_get_fluxisskin_samples(this.__wbg_ptr);
|
|
816
|
+
return BinaryStore.__wrap(ret);
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* @param {BinaryStore} arg0
|
|
820
|
+
*/
|
|
821
|
+
set samples(arg0) {
|
|
822
|
+
_assertClass(arg0, BinaryStore);
|
|
823
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
824
|
+
wasm.__wbg_set_fluxisskin_samples(this.__wbg_ptr, ptr0);
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* @param {SkinJson} skin_json
|
|
828
|
+
* @param {TextureStore | null} [textures]
|
|
829
|
+
* @param {BinaryStore | null} [samples]
|
|
830
|
+
*/
|
|
831
|
+
constructor(skin_json, textures, samples) {
|
|
832
|
+
_assertClass(skin_json, SkinJson);
|
|
833
|
+
var ptr0 = skin_json.__destroy_into_raw();
|
|
834
|
+
let ptr1 = 0;
|
|
835
|
+
if (!isLikeNone(textures)) {
|
|
836
|
+
_assertClass(textures, TextureStore);
|
|
837
|
+
ptr1 = textures.__destroy_into_raw();
|
|
838
|
+
}
|
|
839
|
+
let ptr2 = 0;
|
|
840
|
+
if (!isLikeNone(samples)) {
|
|
841
|
+
_assertClass(samples, BinaryStore);
|
|
842
|
+
ptr2 = samples.__destroy_into_raw();
|
|
843
|
+
}
|
|
844
|
+
const ret = wasm.fluxisskin_new(ptr0, ptr1, ptr2);
|
|
845
|
+
this.__wbg_ptr = ret >>> 0;
|
|
846
|
+
FluXisSkinFinalization.register(this, this.__wbg_ptr, this);
|
|
847
|
+
return this;
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* @returns {GenericManiaSkin}
|
|
851
|
+
*/
|
|
852
|
+
toGenericMania() {
|
|
853
|
+
const ret = wasm.fluxisskin_toGenericMania(this.__wbg_ptr);
|
|
854
|
+
if (ret[2]) {
|
|
855
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
856
|
+
}
|
|
857
|
+
return GenericManiaSkin.__wrap(ret[0]);
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* @param {FluXisLayout} layout
|
|
861
|
+
* @returns {GenericManiaSkin}
|
|
862
|
+
*/
|
|
863
|
+
toGenericManiaWithLayout(layout) {
|
|
864
|
+
_assertClass(layout, FluXisLayout);
|
|
865
|
+
const ret = wasm.fluxisskin_toGenericManiaWithLayout(this.__wbg_ptr, layout.__wbg_ptr);
|
|
866
|
+
if (ret[2]) {
|
|
867
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
868
|
+
}
|
|
869
|
+
return GenericManiaSkin.__wrap(ret[0]);
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* @param {GenericManiaSkin} skin
|
|
873
|
+
* @returns {FluXisSkinWithLayout}
|
|
874
|
+
*/
|
|
875
|
+
static fromGenericMania(skin) {
|
|
876
|
+
_assertClass(skin, GenericManiaSkin);
|
|
877
|
+
const ret = wasm.fluxisskin_fromGenericMania(skin.__wbg_ptr);
|
|
878
|
+
if (ret[2]) {
|
|
879
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
880
|
+
}
|
|
881
|
+
return FluXisSkinWithLayout.__wrap(ret[0]);
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* @param {number} keymode
|
|
885
|
+
* @returns {FluXisKeymode | undefined}
|
|
886
|
+
*/
|
|
887
|
+
getKeymode(keymode) {
|
|
888
|
+
const ret = wasm.fluxisskin_getKeymode(this.__wbg_ptr, keymode);
|
|
889
|
+
return ret === 0 ? undefined : FluXisKeymode.__wrap(ret);
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* @returns {string[]}
|
|
893
|
+
*/
|
|
894
|
+
getRequiredTexturePaths() {
|
|
895
|
+
const ret = wasm.fluxisskin_getRequiredTexturePaths(this.__wbg_ptr);
|
|
896
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
897
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
898
|
+
return v1;
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* @returns {string[]}
|
|
902
|
+
*/
|
|
903
|
+
getRequiredSamplePaths() {
|
|
904
|
+
const ret = wasm.fluxisskin_getRequiredSamplePaths(this.__wbg_ptr);
|
|
905
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
906
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
907
|
+
return v1;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
if (Symbol.dispose) FluXisSkin.prototype[Symbol.dispose] = FluXisSkin.prototype.free;
|
|
911
|
+
exports.FluXisSkin = FluXisSkin;
|
|
912
|
+
|
|
913
|
+
class FluXisSkinWithLayout {
|
|
914
|
+
static __wrap(ptr) {
|
|
915
|
+
ptr = ptr >>> 0;
|
|
916
|
+
const obj = Object.create(FluXisSkinWithLayout.prototype);
|
|
917
|
+
obj.__wbg_ptr = ptr;
|
|
918
|
+
FluXisSkinWithLayoutFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
919
|
+
return obj;
|
|
920
|
+
}
|
|
921
|
+
__destroy_into_raw() {
|
|
922
|
+
const ptr = this.__wbg_ptr;
|
|
923
|
+
this.__wbg_ptr = 0;
|
|
924
|
+
FluXisSkinWithLayoutFinalization.unregister(this);
|
|
925
|
+
return ptr;
|
|
926
|
+
}
|
|
927
|
+
free() {
|
|
928
|
+
const ptr = this.__destroy_into_raw();
|
|
929
|
+
wasm.__wbg_fluxisskinwithlayout_free(ptr, 0);
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* @returns {FluXisSkin}
|
|
933
|
+
*/
|
|
934
|
+
get skin() {
|
|
935
|
+
const ret = wasm.__wbg_get_fluxisskinwithlayout_skin(this.__wbg_ptr);
|
|
936
|
+
return FluXisSkin.__wrap(ret);
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* @param {FluXisSkin} arg0
|
|
940
|
+
*/
|
|
941
|
+
set skin(arg0) {
|
|
942
|
+
_assertClass(arg0, FluXisSkin);
|
|
943
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
944
|
+
wasm.__wbg_set_fluxisskinwithlayout_skin(this.__wbg_ptr, ptr0);
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* @returns {FluXisLayout}
|
|
948
|
+
*/
|
|
949
|
+
get layout() {
|
|
950
|
+
const ret = wasm.__wbg_get_fluxisskinwithlayout_layout(this.__wbg_ptr);
|
|
951
|
+
return FluXisLayout.__wrap(ret);
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* @param {FluXisLayout} arg0
|
|
955
|
+
*/
|
|
956
|
+
set layout(arg0) {
|
|
957
|
+
_assertClass(arg0, FluXisLayout);
|
|
958
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
959
|
+
wasm.__wbg_set_fluxisskinwithlayout_layout(this.__wbg_ptr, ptr0);
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
if (Symbol.dispose) FluXisSkinWithLayout.prototype[Symbol.dispose] = FluXisSkinWithLayout.prototype.free;
|
|
963
|
+
exports.FluXisSkinWithLayout = FluXisSkinWithLayout;
|
|
964
|
+
|
|
965
|
+
class General {
|
|
966
|
+
static __wrap(ptr) {
|
|
967
|
+
ptr = ptr >>> 0;
|
|
968
|
+
const obj = Object.create(General.prototype);
|
|
969
|
+
obj.__wbg_ptr = ptr;
|
|
970
|
+
GeneralFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
971
|
+
return obj;
|
|
972
|
+
}
|
|
973
|
+
__destroy_into_raw() {
|
|
974
|
+
const ptr = this.__wbg_ptr;
|
|
975
|
+
this.__wbg_ptr = 0;
|
|
976
|
+
GeneralFinalization.unregister(this);
|
|
977
|
+
return ptr;
|
|
978
|
+
}
|
|
979
|
+
free() {
|
|
980
|
+
const ptr = this.__destroy_into_raw();
|
|
981
|
+
wasm.__wbg_general_free(ptr, 0);
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* @returns {string}
|
|
985
|
+
*/
|
|
986
|
+
get name() {
|
|
987
|
+
let deferred1_0;
|
|
988
|
+
let deferred1_1;
|
|
989
|
+
try {
|
|
990
|
+
const ret = wasm.__wbg_get_general_name(this.__wbg_ptr);
|
|
991
|
+
deferred1_0 = ret[0];
|
|
992
|
+
deferred1_1 = ret[1];
|
|
993
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
994
|
+
} finally {
|
|
995
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* @param {string} arg0
|
|
1000
|
+
*/
|
|
1001
|
+
set name(arg0) {
|
|
1002
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1003
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1004
|
+
wasm.__wbg_set_general_name(this.__wbg_ptr, ptr0, len0);
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* @returns {string}
|
|
1008
|
+
*/
|
|
1009
|
+
get author() {
|
|
1010
|
+
let deferred1_0;
|
|
1011
|
+
let deferred1_1;
|
|
1012
|
+
try {
|
|
1013
|
+
const ret = wasm.__wbg_get_general_author(this.__wbg_ptr);
|
|
1014
|
+
deferred1_0 = ret[0];
|
|
1015
|
+
deferred1_1 = ret[1];
|
|
1016
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1017
|
+
} finally {
|
|
1018
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* @param {string} arg0
|
|
1023
|
+
*/
|
|
1024
|
+
set author(arg0) {
|
|
1025
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1026
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1027
|
+
wasm.__wbg_set_general_author(this.__wbg_ptr, ptr0, len0);
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* @returns {string}
|
|
1031
|
+
*/
|
|
1032
|
+
get version() {
|
|
1033
|
+
let deferred1_0;
|
|
1034
|
+
let deferred1_1;
|
|
1035
|
+
try {
|
|
1036
|
+
const ret = wasm.__wbg_get_general_version(this.__wbg_ptr);
|
|
1037
|
+
deferred1_0 = ret[0];
|
|
1038
|
+
deferred1_1 = ret[1];
|
|
1039
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1040
|
+
} finally {
|
|
1041
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* @param {string} arg0
|
|
1046
|
+
*/
|
|
1047
|
+
set version(arg0) {
|
|
1048
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1049
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1050
|
+
wasm.__wbg_set_general_version(this.__wbg_ptr, ptr0, len0);
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* @returns {number}
|
|
1054
|
+
*/
|
|
1055
|
+
get animation_framerate() {
|
|
1056
|
+
const ret = wasm.__wbg_get_general_animation_framerate(this.__wbg_ptr);
|
|
1057
|
+
return ret;
|
|
1058
|
+
}
|
|
1059
|
+
/**
|
|
1060
|
+
* @param {number} arg0
|
|
1061
|
+
*/
|
|
1062
|
+
set animation_framerate(arg0) {
|
|
1063
|
+
wasm.__wbg_set_general_animation_framerate(this.__wbg_ptr, arg0);
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* @returns {boolean}
|
|
1067
|
+
*/
|
|
1068
|
+
get allow_slider_ball_tint() {
|
|
1069
|
+
const ret = wasm.__wbg_get_general_allow_slider_ball_tint(this.__wbg_ptr);
|
|
1070
|
+
return ret !== 0;
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* @param {boolean} arg0
|
|
1074
|
+
*/
|
|
1075
|
+
set allow_slider_ball_tint(arg0) {
|
|
1076
|
+
wasm.__wbg_set_general_allow_slider_ball_tint(this.__wbg_ptr, arg0);
|
|
1077
|
+
}
|
|
1078
|
+
/**
|
|
1079
|
+
* @returns {boolean}
|
|
1080
|
+
*/
|
|
1081
|
+
get combo_burst_random() {
|
|
1082
|
+
const ret = wasm.__wbg_get_general_combo_burst_random(this.__wbg_ptr);
|
|
1083
|
+
return ret !== 0;
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* @param {boolean} arg0
|
|
1087
|
+
*/
|
|
1088
|
+
set combo_burst_random(arg0) {
|
|
1089
|
+
wasm.__wbg_set_general_combo_burst_random(this.__wbg_ptr, arg0);
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* @returns {boolean}
|
|
1093
|
+
*/
|
|
1094
|
+
get cursor_centre() {
|
|
1095
|
+
const ret = wasm.__wbg_get_general_cursor_centre(this.__wbg_ptr);
|
|
1096
|
+
return ret !== 0;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* @param {boolean} arg0
|
|
1100
|
+
*/
|
|
1101
|
+
set cursor_centre(arg0) {
|
|
1102
|
+
wasm.__wbg_set_general_cursor_centre(this.__wbg_ptr, arg0);
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* @returns {boolean}
|
|
1106
|
+
*/
|
|
1107
|
+
get cursor_expand() {
|
|
1108
|
+
const ret = wasm.__wbg_get_general_cursor_expand(this.__wbg_ptr);
|
|
1109
|
+
return ret !== 0;
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* @param {boolean} arg0
|
|
1113
|
+
*/
|
|
1114
|
+
set cursor_expand(arg0) {
|
|
1115
|
+
wasm.__wbg_set_general_cursor_expand(this.__wbg_ptr, arg0);
|
|
1116
|
+
}
|
|
1117
|
+
/**
|
|
1118
|
+
* @returns {boolean}
|
|
1119
|
+
*/
|
|
1120
|
+
get cursor_rotate() {
|
|
1121
|
+
const ret = wasm.__wbg_get_general_cursor_rotate(this.__wbg_ptr);
|
|
1122
|
+
return ret !== 0;
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* @param {boolean} arg0
|
|
1126
|
+
*/
|
|
1127
|
+
set cursor_rotate(arg0) {
|
|
1128
|
+
wasm.__wbg_set_general_cursor_rotate(this.__wbg_ptr, arg0);
|
|
1129
|
+
}
|
|
1130
|
+
/**
|
|
1131
|
+
* @returns {boolean}
|
|
1132
|
+
*/
|
|
1133
|
+
get cursor_trail_rotate() {
|
|
1134
|
+
const ret = wasm.__wbg_get_general_cursor_trail_rotate(this.__wbg_ptr);
|
|
1135
|
+
return ret !== 0;
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* @param {boolean} arg0
|
|
1139
|
+
*/
|
|
1140
|
+
set cursor_trail_rotate(arg0) {
|
|
1141
|
+
wasm.__wbg_set_general_cursor_trail_rotate(this.__wbg_ptr, arg0);
|
|
1142
|
+
}
|
|
1143
|
+
/**
|
|
1144
|
+
* @returns {Uint16Array}
|
|
1145
|
+
*/
|
|
1146
|
+
get custom_combo_burst_sounds() {
|
|
1147
|
+
const ret = wasm.__wbg_get_general_custom_combo_burst_sounds(this.__wbg_ptr);
|
|
1148
|
+
var v1 = getArrayU16FromWasm0(ret[0], ret[1]).slice();
|
|
1149
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 2, 2);
|
|
1150
|
+
return v1;
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* @param {Uint16Array} arg0
|
|
1154
|
+
*/
|
|
1155
|
+
set custom_combo_burst_sounds(arg0) {
|
|
1156
|
+
const ptr0 = passArray16ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1157
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1158
|
+
wasm.__wbg_set_general_custom_combo_burst_sounds(this.__wbg_ptr, ptr0, len0);
|
|
1159
|
+
}
|
|
1160
|
+
/**
|
|
1161
|
+
* @returns {boolean}
|
|
1162
|
+
*/
|
|
1163
|
+
get hit_circle_overlay_above_number() {
|
|
1164
|
+
const ret = wasm.__wbg_get_general_hit_circle_overlay_above_number(this.__wbg_ptr);
|
|
1165
|
+
return ret !== 0;
|
|
1166
|
+
}
|
|
1167
|
+
/**
|
|
1168
|
+
* @param {boolean} arg0
|
|
1169
|
+
*/
|
|
1170
|
+
set hit_circle_overlay_above_number(arg0) {
|
|
1171
|
+
wasm.__wbg_set_general_hit_circle_overlay_above_number(this.__wbg_ptr, arg0);
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* @returns {boolean}
|
|
1175
|
+
*/
|
|
1176
|
+
get layered_hit_sounds() {
|
|
1177
|
+
const ret = wasm.__wbg_get_general_layered_hit_sounds(this.__wbg_ptr);
|
|
1178
|
+
return ret !== 0;
|
|
1179
|
+
}
|
|
1180
|
+
/**
|
|
1181
|
+
* @param {boolean} arg0
|
|
1182
|
+
*/
|
|
1183
|
+
set layered_hit_sounds(arg0) {
|
|
1184
|
+
wasm.__wbg_set_general_layered_hit_sounds(this.__wbg_ptr, arg0);
|
|
1185
|
+
}
|
|
1186
|
+
/**
|
|
1187
|
+
* @returns {boolean}
|
|
1188
|
+
*/
|
|
1189
|
+
get slider_ball_flip() {
|
|
1190
|
+
const ret = wasm.__wbg_get_general_slider_ball_flip(this.__wbg_ptr);
|
|
1191
|
+
return ret !== 0;
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* @param {boolean} arg0
|
|
1195
|
+
*/
|
|
1196
|
+
set slider_ball_flip(arg0) {
|
|
1197
|
+
wasm.__wbg_set_general_slider_ball_flip(this.__wbg_ptr, arg0);
|
|
1198
|
+
}
|
|
1199
|
+
/**
|
|
1200
|
+
* @returns {boolean}
|
|
1201
|
+
*/
|
|
1202
|
+
get spinner_fade_playfield() {
|
|
1203
|
+
const ret = wasm.__wbg_get_general_spinner_fade_playfield(this.__wbg_ptr);
|
|
1204
|
+
return ret !== 0;
|
|
1205
|
+
}
|
|
1206
|
+
/**
|
|
1207
|
+
* @param {boolean} arg0
|
|
1208
|
+
*/
|
|
1209
|
+
set spinner_fade_playfield(arg0) {
|
|
1210
|
+
wasm.__wbg_set_general_spinner_fade_playfield(this.__wbg_ptr, arg0);
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* @returns {boolean}
|
|
1214
|
+
*/
|
|
1215
|
+
get spinner_frequency_modulate() {
|
|
1216
|
+
const ret = wasm.__wbg_get_general_spinner_frequency_modulate(this.__wbg_ptr);
|
|
1217
|
+
return ret !== 0;
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* @param {boolean} arg0
|
|
1221
|
+
*/
|
|
1222
|
+
set spinner_frequency_modulate(arg0) {
|
|
1223
|
+
wasm.__wbg_set_general_spinner_frequency_modulate(this.__wbg_ptr, arg0);
|
|
1224
|
+
}
|
|
1225
|
+
/**
|
|
1226
|
+
* @returns {boolean}
|
|
1227
|
+
*/
|
|
1228
|
+
get spinner_no_blink() {
|
|
1229
|
+
const ret = wasm.__wbg_get_general_spinner_no_blink(this.__wbg_ptr);
|
|
1230
|
+
return ret !== 0;
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1233
|
+
* @param {boolean} arg0
|
|
1234
|
+
*/
|
|
1235
|
+
set spinner_no_blink(arg0) {
|
|
1236
|
+
wasm.__wbg_set_general_spinner_no_blink(this.__wbg_ptr, arg0);
|
|
1237
|
+
}
|
|
1238
|
+
/**
|
|
1239
|
+
* @param {string} content
|
|
1240
|
+
* @returns {General}
|
|
1241
|
+
*/
|
|
1242
|
+
static fromStr(content) {
|
|
1243
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1244
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1245
|
+
const ret = wasm.general_fromStr(ptr0, len0);
|
|
1246
|
+
if (ret[2]) {
|
|
1247
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1248
|
+
}
|
|
1249
|
+
return General.__wrap(ret[0]);
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* @returns {string}
|
|
1253
|
+
*/
|
|
1254
|
+
toString() {
|
|
1255
|
+
let deferred1_0;
|
|
1256
|
+
let deferred1_1;
|
|
1257
|
+
try {
|
|
1258
|
+
const ret = wasm.general_toString(this.__wbg_ptr);
|
|
1259
|
+
deferred1_0 = ret[0];
|
|
1260
|
+
deferred1_1 = ret[1];
|
|
1261
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1262
|
+
} finally {
|
|
1263
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
if (Symbol.dispose) General.prototype[Symbol.dispose] = General.prototype.free;
|
|
1268
|
+
exports.General = General;
|
|
1269
|
+
|
|
1270
|
+
class GenericManiaSkin {
|
|
1271
|
+
static __wrap(ptr) {
|
|
1272
|
+
ptr = ptr >>> 0;
|
|
1273
|
+
const obj = Object.create(GenericManiaSkin.prototype);
|
|
1274
|
+
obj.__wbg_ptr = ptr;
|
|
1275
|
+
GenericManiaSkinFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1276
|
+
return obj;
|
|
1277
|
+
}
|
|
1278
|
+
__destroy_into_raw() {
|
|
1279
|
+
const ptr = this.__wbg_ptr;
|
|
1280
|
+
this.__wbg_ptr = 0;
|
|
1281
|
+
GenericManiaSkinFinalization.unregister(this);
|
|
1282
|
+
return ptr;
|
|
1283
|
+
}
|
|
1284
|
+
free() {
|
|
1285
|
+
const ptr = this.__destroy_into_raw();
|
|
1286
|
+
wasm.__wbg_genericmaniaskin_free(ptr, 0);
|
|
1287
|
+
}
|
|
1288
|
+
/**
|
|
1289
|
+
* @returns {TextureStore}
|
|
1290
|
+
*/
|
|
1291
|
+
get textures() {
|
|
1292
|
+
const ret = wasm.__wbg_get_genericmaniaskin_textures(this.__wbg_ptr);
|
|
1293
|
+
return TextureStore.__wrap(ret);
|
|
1294
|
+
}
|
|
1295
|
+
/**
|
|
1296
|
+
* @param {TextureStore} arg0
|
|
1297
|
+
*/
|
|
1298
|
+
set textures(arg0) {
|
|
1299
|
+
_assertClass(arg0, TextureStore);
|
|
1300
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
1301
|
+
wasm.__wbg_set_genericmaniaskin_textures(this.__wbg_ptr, ptr0);
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* @returns {BinaryStore}
|
|
1305
|
+
*/
|
|
1306
|
+
get samples() {
|
|
1307
|
+
const ret = wasm.__wbg_get_genericmaniaskin_samples(this.__wbg_ptr);
|
|
1308
|
+
return BinaryStore.__wrap(ret);
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* @param {BinaryStore} arg0
|
|
1312
|
+
*/
|
|
1313
|
+
set samples(arg0) {
|
|
1314
|
+
_assertClass(arg0, BinaryStore);
|
|
1315
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
1316
|
+
wasm.__wbg_set_genericmaniaskin_samples(this.__wbg_ptr, ptr0);
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* @returns {GenericManiaSkin}
|
|
1320
|
+
*/
|
|
1321
|
+
toGenericMania() {
|
|
1322
|
+
const ret = wasm.genericmaniaskin_toGenericMania(this.__wbg_ptr);
|
|
1323
|
+
if (ret[2]) {
|
|
1324
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1325
|
+
}
|
|
1326
|
+
return GenericManiaSkin.__wrap(ret[0]);
|
|
1327
|
+
}
|
|
1328
|
+
/**
|
|
1329
|
+
* @param {GenericManiaSkin} skin
|
|
1330
|
+
* @returns {GenericManiaSkin}
|
|
1331
|
+
*/
|
|
1332
|
+
static fromGenericMania(skin) {
|
|
1333
|
+
_assertClass(skin, GenericManiaSkin);
|
|
1334
|
+
const ret = wasm.genericmaniaskin_fromGenericMania(skin.__wbg_ptr);
|
|
1335
|
+
if (ret[2]) {
|
|
1336
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1337
|
+
}
|
|
1338
|
+
return GenericManiaSkin.__wrap(ret[0]);
|
|
1339
|
+
}
|
|
1340
|
+
/**
|
|
1341
|
+
* @param {number} keymode
|
|
1342
|
+
* @returns {Keymode | undefined}
|
|
1343
|
+
*/
|
|
1344
|
+
getKeymode(keymode) {
|
|
1345
|
+
const ret = wasm.genericmaniaskin_getKeymode(this.__wbg_ptr, keymode);
|
|
1346
|
+
return ret === 0 ? undefined : Keymode.__wrap(ret);
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* @returns {string[]}
|
|
1350
|
+
*/
|
|
1351
|
+
getRequiredTexturePaths() {
|
|
1352
|
+
const ret = wasm.genericmaniaskin_getRequiredTexturePaths(this.__wbg_ptr);
|
|
1353
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1354
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1355
|
+
return v1;
|
|
1356
|
+
}
|
|
1357
|
+
/**
|
|
1358
|
+
* @returns {string[]}
|
|
1359
|
+
*/
|
|
1360
|
+
getRequiredSamplePaths() {
|
|
1361
|
+
const ret = wasm.genericmaniaskin_getRequiredSamplePaths(this.__wbg_ptr);
|
|
1362
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1363
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1364
|
+
return v1;
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
if (Symbol.dispose) GenericManiaSkin.prototype[Symbol.dispose] = GenericManiaSkin.prototype.free;
|
|
1368
|
+
exports.GenericManiaSkin = GenericManiaSkin;
|
|
1369
|
+
|
|
1370
|
+
class Info {
|
|
1371
|
+
static __wrap(ptr) {
|
|
1372
|
+
ptr = ptr >>> 0;
|
|
1373
|
+
const obj = Object.create(Info.prototype);
|
|
1374
|
+
obj.__wbg_ptr = ptr;
|
|
1375
|
+
InfoFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1376
|
+
return obj;
|
|
1377
|
+
}
|
|
1378
|
+
__destroy_into_raw() {
|
|
1379
|
+
const ptr = this.__wbg_ptr;
|
|
1380
|
+
this.__wbg_ptr = 0;
|
|
1381
|
+
InfoFinalization.unregister(this);
|
|
1382
|
+
return ptr;
|
|
1383
|
+
}
|
|
1384
|
+
free() {
|
|
1385
|
+
const ptr = this.__destroy_into_raw();
|
|
1386
|
+
wasm.__wbg_info_free(ptr, 0);
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* @returns {string}
|
|
1390
|
+
*/
|
|
1391
|
+
get name() {
|
|
1392
|
+
let deferred1_0;
|
|
1393
|
+
let deferred1_1;
|
|
1394
|
+
try {
|
|
1395
|
+
const ret = wasm.__wbg_get_info_name(this.__wbg_ptr);
|
|
1396
|
+
deferred1_0 = ret[0];
|
|
1397
|
+
deferred1_1 = ret[1];
|
|
1398
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1399
|
+
} finally {
|
|
1400
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
/**
|
|
1404
|
+
* @param {string} arg0
|
|
1405
|
+
*/
|
|
1406
|
+
set name(arg0) {
|
|
1407
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1408
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1409
|
+
wasm.__wbg_set_info_name(this.__wbg_ptr, ptr0, len0);
|
|
1410
|
+
}
|
|
1411
|
+
/**
|
|
1412
|
+
* @returns {string}
|
|
1413
|
+
*/
|
|
1414
|
+
get creator() {
|
|
1415
|
+
let deferred1_0;
|
|
1416
|
+
let deferred1_1;
|
|
1417
|
+
try {
|
|
1418
|
+
const ret = wasm.__wbg_get_info_creator(this.__wbg_ptr);
|
|
1419
|
+
deferred1_0 = ret[0];
|
|
1420
|
+
deferred1_1 = ret[1];
|
|
1421
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1422
|
+
} finally {
|
|
1423
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
/**
|
|
1427
|
+
* @param {string} arg0
|
|
1428
|
+
*/
|
|
1429
|
+
set creator(arg0) {
|
|
1430
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1431
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1432
|
+
wasm.__wbg_set_info_creator(this.__wbg_ptr, ptr0, len0);
|
|
1433
|
+
}
|
|
1434
|
+
/**
|
|
1435
|
+
* @returns {string}
|
|
1436
|
+
*/
|
|
1437
|
+
get accent() {
|
|
1438
|
+
let deferred1_0;
|
|
1439
|
+
let deferred1_1;
|
|
1440
|
+
try {
|
|
1441
|
+
const ret = wasm.__wbg_get_info_accent(this.__wbg_ptr);
|
|
1442
|
+
deferred1_0 = ret[0];
|
|
1443
|
+
deferred1_1 = ret[1];
|
|
1444
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1445
|
+
} finally {
|
|
1446
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* @param {string} arg0
|
|
1451
|
+
*/
|
|
1452
|
+
set accent(arg0) {
|
|
1453
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1454
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1455
|
+
wasm.__wbg_set_info_accent(this.__wbg_ptr, ptr0, len0);
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
if (Symbol.dispose) Info.prototype[Symbol.dispose] = Info.prototype.free;
|
|
1459
|
+
exports.Info = Info;
|
|
1460
|
+
|
|
1461
|
+
class Keymode {
|
|
1462
|
+
static __wrap(ptr) {
|
|
1463
|
+
ptr = ptr >>> 0;
|
|
1464
|
+
const obj = Object.create(Keymode.prototype);
|
|
1465
|
+
obj.__wbg_ptr = ptr;
|
|
1466
|
+
KeymodeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1467
|
+
return obj;
|
|
1468
|
+
}
|
|
1469
|
+
__destroy_into_raw() {
|
|
1470
|
+
const ptr = this.__wbg_ptr;
|
|
1471
|
+
this.__wbg_ptr = 0;
|
|
1472
|
+
KeymodeFinalization.unregister(this);
|
|
1473
|
+
return ptr;
|
|
1474
|
+
}
|
|
1475
|
+
free() {
|
|
1476
|
+
const ptr = this.__destroy_into_raw();
|
|
1477
|
+
wasm.__wbg_keymode_free(ptr, 0);
|
|
1478
|
+
}
|
|
1479
|
+
/**
|
|
1480
|
+
* @param {string} content
|
|
1481
|
+
* @returns {OsuKeymode}
|
|
1482
|
+
*/
|
|
1483
|
+
static fromStr(content) {
|
|
1484
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1485
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1486
|
+
const ret = wasm.keymode_fromStr(ptr0, len0);
|
|
1487
|
+
if (ret[2]) {
|
|
1488
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1489
|
+
}
|
|
1490
|
+
return OsuKeymode.__wrap(ret[0]);
|
|
1491
|
+
}
|
|
1492
|
+
/**
|
|
1493
|
+
* @returns {string}
|
|
1494
|
+
*/
|
|
1495
|
+
toStr() {
|
|
1496
|
+
let deferred1_0;
|
|
1497
|
+
let deferred1_1;
|
|
1498
|
+
try {
|
|
1499
|
+
const ret = wasm.keymode_toStr(this.__wbg_ptr);
|
|
1500
|
+
deferred1_0 = ret[0];
|
|
1501
|
+
deferred1_1 = ret[1];
|
|
1502
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1503
|
+
} finally {
|
|
1504
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
/**
|
|
1508
|
+
* @returns {string[]}
|
|
1509
|
+
*/
|
|
1510
|
+
getTexturePaths() {
|
|
1511
|
+
const ret = wasm.keymode_getTexturePaths(this.__wbg_ptr);
|
|
1512
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1513
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1514
|
+
return v1;
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* @returns {number}
|
|
1518
|
+
*/
|
|
1519
|
+
get keymode() {
|
|
1520
|
+
const ret = wasm.__wbg_get_keymode_keymode(this.__wbg_ptr);
|
|
1521
|
+
return ret;
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* @param {number} arg0
|
|
1525
|
+
*/
|
|
1526
|
+
set keymode(arg0) {
|
|
1527
|
+
wasm.__wbg_set_keymode_keymode(this.__wbg_ptr, arg0);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
if (Symbol.dispose) Keymode.prototype[Symbol.dispose] = Keymode.prototype.free;
|
|
1531
|
+
exports.Keymode = Keymode;
|
|
1532
|
+
|
|
1533
|
+
class OsuKeymode {
|
|
1534
|
+
static __wrap(ptr) {
|
|
1535
|
+
ptr = ptr >>> 0;
|
|
1536
|
+
const obj = Object.create(OsuKeymode.prototype);
|
|
1537
|
+
obj.__wbg_ptr = ptr;
|
|
1538
|
+
OsuKeymodeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1539
|
+
return obj;
|
|
1540
|
+
}
|
|
1541
|
+
static __unwrap(jsValue) {
|
|
1542
|
+
if (!(jsValue instanceof OsuKeymode)) {
|
|
1543
|
+
return 0;
|
|
1544
|
+
}
|
|
1545
|
+
return jsValue.__destroy_into_raw();
|
|
1546
|
+
}
|
|
1547
|
+
__destroy_into_raw() {
|
|
1548
|
+
const ptr = this.__wbg_ptr;
|
|
1549
|
+
this.__wbg_ptr = 0;
|
|
1550
|
+
OsuKeymodeFinalization.unregister(this);
|
|
1551
|
+
return ptr;
|
|
1552
|
+
}
|
|
1553
|
+
free() {
|
|
1554
|
+
const ptr = this.__destroy_into_raw();
|
|
1555
|
+
wasm.__wbg_osukeymode_free(ptr, 0);
|
|
1556
|
+
}
|
|
1557
|
+
/**
|
|
1558
|
+
* @returns {number}
|
|
1559
|
+
*/
|
|
1560
|
+
get keymode() {
|
|
1561
|
+
const ret = wasm.__wbg_get_osukeymode_keymode(this.__wbg_ptr);
|
|
1562
|
+
return ret;
|
|
1563
|
+
}
|
|
1564
|
+
/**
|
|
1565
|
+
* @param {number} arg0
|
|
1566
|
+
*/
|
|
1567
|
+
set keymode(arg0) {
|
|
1568
|
+
wasm.__wbg_set_osukeymode_keymode(this.__wbg_ptr, arg0);
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* @returns {boolean}
|
|
1572
|
+
*/
|
|
1573
|
+
get keys_under_notes() {
|
|
1574
|
+
const ret = wasm.__wbg_get_osukeymode_keys_under_notes(this.__wbg_ptr);
|
|
1575
|
+
return ret !== 0;
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* @param {boolean} arg0
|
|
1579
|
+
*/
|
|
1580
|
+
set keys_under_notes(arg0) {
|
|
1581
|
+
wasm.__wbg_set_osukeymode_keys_under_notes(this.__wbg_ptr, arg0);
|
|
1582
|
+
}
|
|
1583
|
+
/**
|
|
1584
|
+
* @returns {boolean}
|
|
1585
|
+
*/
|
|
1586
|
+
get judgement_line() {
|
|
1587
|
+
const ret = wasm.__wbg_get_osukeymode_judgement_line(this.__wbg_ptr);
|
|
1588
|
+
return ret !== 0;
|
|
1589
|
+
}
|
|
1590
|
+
/**
|
|
1591
|
+
* @param {boolean} arg0
|
|
1592
|
+
*/
|
|
1593
|
+
set judgement_line(arg0) {
|
|
1594
|
+
wasm.__wbg_set_osukeymode_judgement_line(this.__wbg_ptr, arg0);
|
|
1595
|
+
}
|
|
1596
|
+
/**
|
|
1597
|
+
* @returns {boolean}
|
|
1598
|
+
*/
|
|
1599
|
+
get upside_down() {
|
|
1600
|
+
const ret = wasm.__wbg_get_osukeymode_upside_down(this.__wbg_ptr);
|
|
1601
|
+
return ret !== 0;
|
|
1602
|
+
}
|
|
1603
|
+
/**
|
|
1604
|
+
* @param {boolean} arg0
|
|
1605
|
+
*/
|
|
1606
|
+
set upside_down(arg0) {
|
|
1607
|
+
wasm.__wbg_set_osukeymode_upside_down(this.__wbg_ptr, arg0);
|
|
1608
|
+
}
|
|
1609
|
+
/**
|
|
1610
|
+
* @returns {number}
|
|
1611
|
+
*/
|
|
1612
|
+
get special_style() {
|
|
1613
|
+
const ret = wasm.__wbg_get_osukeymode_special_style(this.__wbg_ptr);
|
|
1614
|
+
return ret;
|
|
1615
|
+
}
|
|
1616
|
+
/**
|
|
1617
|
+
* @param {number} arg0
|
|
1618
|
+
*/
|
|
1619
|
+
set special_style(arg0) {
|
|
1620
|
+
wasm.__wbg_set_osukeymode_special_style(this.__wbg_ptr, arg0);
|
|
1621
|
+
}
|
|
1622
|
+
/**
|
|
1623
|
+
* @returns {number}
|
|
1624
|
+
*/
|
|
1625
|
+
get combo_burst_style() {
|
|
1626
|
+
const ret = wasm.__wbg_get_osukeymode_combo_burst_style(this.__wbg_ptr);
|
|
1627
|
+
return ret;
|
|
1628
|
+
}
|
|
1629
|
+
/**
|
|
1630
|
+
* @param {number} arg0
|
|
1631
|
+
*/
|
|
1632
|
+
set combo_burst_style(arg0) {
|
|
1633
|
+
wasm.__wbg_set_osukeymode_combo_burst_style(this.__wbg_ptr, arg0);
|
|
1634
|
+
}
|
|
1635
|
+
/**
|
|
1636
|
+
* @returns {boolean | undefined}
|
|
1637
|
+
*/
|
|
1638
|
+
get split_stages() {
|
|
1639
|
+
const ret = wasm.__wbg_get_osukeymode_split_stages(this.__wbg_ptr);
|
|
1640
|
+
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* @param {boolean | null} [arg0]
|
|
1644
|
+
*/
|
|
1645
|
+
set split_stages(arg0) {
|
|
1646
|
+
wasm.__wbg_set_osukeymode_split_stages(this.__wbg_ptr, isLikeNone(arg0) ? 0xFFFFFF : arg0 ? 1 : 0);
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* @returns {number}
|
|
1650
|
+
*/
|
|
1651
|
+
get stage_separation() {
|
|
1652
|
+
const ret = wasm.__wbg_get_osukeymode_stage_separation(this.__wbg_ptr);
|
|
1653
|
+
return ret;
|
|
1654
|
+
}
|
|
1655
|
+
/**
|
|
1656
|
+
* @param {number} arg0
|
|
1657
|
+
*/
|
|
1658
|
+
set stage_separation(arg0) {
|
|
1659
|
+
wasm.__wbg_set_osukeymode_stage_separation(this.__wbg_ptr, arg0);
|
|
1660
|
+
}
|
|
1661
|
+
/**
|
|
1662
|
+
* @returns {boolean}
|
|
1663
|
+
*/
|
|
1664
|
+
get separate_score() {
|
|
1665
|
+
const ret = wasm.__wbg_get_osukeymode_separate_score(this.__wbg_ptr);
|
|
1666
|
+
return ret !== 0;
|
|
1667
|
+
}
|
|
1668
|
+
/**
|
|
1669
|
+
* @param {boolean} arg0
|
|
1670
|
+
*/
|
|
1671
|
+
set separate_score(arg0) {
|
|
1672
|
+
wasm.__wbg_set_osukeymode_separate_score(this.__wbg_ptr, arg0);
|
|
1673
|
+
}
|
|
1674
|
+
/**
|
|
1675
|
+
* @returns {number}
|
|
1676
|
+
*/
|
|
1677
|
+
get hit_position() {
|
|
1678
|
+
const ret = wasm.__wbg_get_osukeymode_hit_position(this.__wbg_ptr);
|
|
1679
|
+
return ret >>> 0;
|
|
1680
|
+
}
|
|
1681
|
+
/**
|
|
1682
|
+
* @param {number} arg0
|
|
1683
|
+
*/
|
|
1684
|
+
set hit_position(arg0) {
|
|
1685
|
+
wasm.__wbg_set_osukeymode_hit_position(this.__wbg_ptr, arg0);
|
|
1686
|
+
}
|
|
1687
|
+
/**
|
|
1688
|
+
* @returns {number}
|
|
1689
|
+
*/
|
|
1690
|
+
get light_position() {
|
|
1691
|
+
const ret = wasm.__wbg_get_osukeymode_light_position(this.__wbg_ptr);
|
|
1692
|
+
return ret >>> 0;
|
|
1693
|
+
}
|
|
1694
|
+
/**
|
|
1695
|
+
* @param {number} arg0
|
|
1696
|
+
*/
|
|
1697
|
+
set light_position(arg0) {
|
|
1698
|
+
wasm.__wbg_set_osukeymode_light_position(this.__wbg_ptr, arg0);
|
|
1699
|
+
}
|
|
1700
|
+
/**
|
|
1701
|
+
* @returns {number | undefined}
|
|
1702
|
+
*/
|
|
1703
|
+
get score_position() {
|
|
1704
|
+
const ret = wasm.__wbg_get_osukeymode_score_position(this.__wbg_ptr);
|
|
1705
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* @param {number | null} [arg0]
|
|
1709
|
+
*/
|
|
1710
|
+
set score_position(arg0) {
|
|
1711
|
+
wasm.__wbg_set_osukeymode_score_position(this.__wbg_ptr, isLikeNone(arg0) ? 0x100000001 : (arg0) >>> 0);
|
|
1712
|
+
}
|
|
1713
|
+
/**
|
|
1714
|
+
* @returns {number | undefined}
|
|
1715
|
+
*/
|
|
1716
|
+
get combo_position() {
|
|
1717
|
+
const ret = wasm.__wbg_get_osukeymode_combo_position(this.__wbg_ptr);
|
|
1718
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* @param {number | null} [arg0]
|
|
1722
|
+
*/
|
|
1723
|
+
set combo_position(arg0) {
|
|
1724
|
+
wasm.__wbg_set_osukeymode_combo_position(this.__wbg_ptr, isLikeNone(arg0) ? 0x100000001 : (arg0) >>> 0);
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* @returns {number}
|
|
1728
|
+
*/
|
|
1729
|
+
get column_start() {
|
|
1730
|
+
const ret = wasm.__wbg_get_osukeymode_column_start(this.__wbg_ptr);
|
|
1731
|
+
return ret >>> 0;
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* @param {number} arg0
|
|
1735
|
+
*/
|
|
1736
|
+
set column_start(arg0) {
|
|
1737
|
+
wasm.__wbg_set_osukeymode_column_start(this.__wbg_ptr, arg0);
|
|
1738
|
+
}
|
|
1739
|
+
/**
|
|
1740
|
+
* @returns {number}
|
|
1741
|
+
*/
|
|
1742
|
+
get column_right() {
|
|
1743
|
+
const ret = wasm.__wbg_get_osukeymode_column_right(this.__wbg_ptr);
|
|
1744
|
+
return ret >>> 0;
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* @param {number} arg0
|
|
1748
|
+
*/
|
|
1749
|
+
set column_right(arg0) {
|
|
1750
|
+
wasm.__wbg_set_osukeymode_column_right(this.__wbg_ptr, arg0);
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* @returns {Uint32Array}
|
|
1754
|
+
*/
|
|
1755
|
+
get column_line_width() {
|
|
1756
|
+
const ret = wasm.__wbg_get_osukeymode_column_line_width(this.__wbg_ptr);
|
|
1757
|
+
var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
1758
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1759
|
+
return v1;
|
|
1760
|
+
}
|
|
1761
|
+
/**
|
|
1762
|
+
* @param {Uint32Array} arg0
|
|
1763
|
+
*/
|
|
1764
|
+
set column_line_width(arg0) {
|
|
1765
|
+
const ptr0 = passArray32ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1766
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1767
|
+
wasm.__wbg_set_osukeymode_column_line_width(this.__wbg_ptr, ptr0, len0);
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* @returns {Uint32Array}
|
|
1771
|
+
*/
|
|
1772
|
+
get column_width() {
|
|
1773
|
+
const ret = wasm.__wbg_get_osukeymode_column_width(this.__wbg_ptr);
|
|
1774
|
+
var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
1775
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1776
|
+
return v1;
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* @param {Uint32Array} arg0
|
|
1780
|
+
*/
|
|
1781
|
+
set column_width(arg0) {
|
|
1782
|
+
const ptr0 = passArray32ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1783
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1784
|
+
wasm.__wbg_set_osukeymode_column_width(this.__wbg_ptr, ptr0, len0);
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* @returns {Uint32Array}
|
|
1788
|
+
*/
|
|
1789
|
+
get column_spacing() {
|
|
1790
|
+
const ret = wasm.__wbg_get_osukeymode_column_spacing(this.__wbg_ptr);
|
|
1791
|
+
var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
1792
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1793
|
+
return v1;
|
|
1794
|
+
}
|
|
1795
|
+
/**
|
|
1796
|
+
* @param {Uint32Array} arg0
|
|
1797
|
+
*/
|
|
1798
|
+
set column_spacing(arg0) {
|
|
1799
|
+
const ptr0 = passArray32ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1800
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1801
|
+
wasm.__wbg_set_osukeymode_column_spacing(this.__wbg_ptr, ptr0, len0);
|
|
1802
|
+
}
|
|
1803
|
+
/**
|
|
1804
|
+
* @returns {number}
|
|
1805
|
+
*/
|
|
1806
|
+
get barline_height() {
|
|
1807
|
+
const ret = wasm.__wbg_get_osukeymode_barline_height(this.__wbg_ptr);
|
|
1808
|
+
return ret;
|
|
1809
|
+
}
|
|
1810
|
+
/**
|
|
1811
|
+
* @param {number} arg0
|
|
1812
|
+
*/
|
|
1813
|
+
set barline_height(arg0) {
|
|
1814
|
+
wasm.__wbg_set_osukeymode_barline_height(this.__wbg_ptr, arg0);
|
|
1815
|
+
}
|
|
1816
|
+
/**
|
|
1817
|
+
* @returns {Uint32Array}
|
|
1818
|
+
*/
|
|
1819
|
+
get lighting_n_width() {
|
|
1820
|
+
const ret = wasm.__wbg_get_osukeymode_lighting_n_width(this.__wbg_ptr);
|
|
1821
|
+
var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
1822
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1823
|
+
return v1;
|
|
1824
|
+
}
|
|
1825
|
+
/**
|
|
1826
|
+
* @param {Uint32Array} arg0
|
|
1827
|
+
*/
|
|
1828
|
+
set lighting_n_width(arg0) {
|
|
1829
|
+
const ptr0 = passArray32ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1830
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1831
|
+
wasm.__wbg_set_osukeymode_lighting_n_width(this.__wbg_ptr, ptr0, len0);
|
|
1832
|
+
}
|
|
1833
|
+
/**
|
|
1834
|
+
* @returns {Uint32Array}
|
|
1835
|
+
*/
|
|
1836
|
+
get lighting_l_width() {
|
|
1837
|
+
const ret = wasm.__wbg_get_osukeymode_lighting_l_width(this.__wbg_ptr);
|
|
1838
|
+
var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
1839
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1840
|
+
return v1;
|
|
1841
|
+
}
|
|
1842
|
+
/**
|
|
1843
|
+
* @param {Uint32Array} arg0
|
|
1844
|
+
*/
|
|
1845
|
+
set lighting_l_width(arg0) {
|
|
1846
|
+
const ptr0 = passArray32ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1847
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1848
|
+
wasm.__wbg_set_osukeymode_lighting_l_width(this.__wbg_ptr, ptr0, len0);
|
|
1849
|
+
}
|
|
1850
|
+
/**
|
|
1851
|
+
* @returns {number | undefined}
|
|
1852
|
+
*/
|
|
1853
|
+
get width_for_note_height_scale() {
|
|
1854
|
+
const ret = wasm.__wbg_get_osukeymode_width_for_note_height_scale(this.__wbg_ptr);
|
|
1855
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* @param {number | null} [arg0]
|
|
1859
|
+
*/
|
|
1860
|
+
set width_for_note_height_scale(arg0) {
|
|
1861
|
+
wasm.__wbg_set_osukeymode_width_for_note_height_scale(this.__wbg_ptr, isLikeNone(arg0) ? 0x100000001 : (arg0) >>> 0);
|
|
1862
|
+
}
|
|
1863
|
+
/**
|
|
1864
|
+
* @returns {number}
|
|
1865
|
+
*/
|
|
1866
|
+
get light_frame_per_second() {
|
|
1867
|
+
const ret = wasm.__wbg_get_osukeymode_light_frame_per_second(this.__wbg_ptr);
|
|
1868
|
+
return ret >>> 0;
|
|
1869
|
+
}
|
|
1870
|
+
/**
|
|
1871
|
+
* @param {number} arg0
|
|
1872
|
+
*/
|
|
1873
|
+
set light_frame_per_second(arg0) {
|
|
1874
|
+
wasm.__wbg_set_osukeymode_light_frame_per_second(this.__wbg_ptr, arg0);
|
|
1875
|
+
}
|
|
1876
|
+
/**
|
|
1877
|
+
* @returns {boolean}
|
|
1878
|
+
*/
|
|
1879
|
+
get key_flip_when_upside_down() {
|
|
1880
|
+
const ret = wasm.__wbg_get_osukeymode_key_flip_when_upside_down(this.__wbg_ptr);
|
|
1881
|
+
return ret !== 0;
|
|
1882
|
+
}
|
|
1883
|
+
/**
|
|
1884
|
+
* @param {boolean} arg0
|
|
1885
|
+
*/
|
|
1886
|
+
set key_flip_when_upside_down(arg0) {
|
|
1887
|
+
wasm.__wbg_set_osukeymode_key_flip_when_upside_down(this.__wbg_ptr, arg0);
|
|
1888
|
+
}
|
|
1889
|
+
/**
|
|
1890
|
+
* @returns {number}
|
|
1891
|
+
*/
|
|
1892
|
+
get note_body_style() {
|
|
1893
|
+
const ret = wasm.__wbg_get_osukeymode_note_body_style(this.__wbg_ptr);
|
|
1894
|
+
return ret;
|
|
1895
|
+
}
|
|
1896
|
+
/**
|
|
1897
|
+
* @param {number} arg0
|
|
1898
|
+
*/
|
|
1899
|
+
set note_body_style(arg0) {
|
|
1900
|
+
wasm.__wbg_set_osukeymode_note_body_style(this.__wbg_ptr, arg0);
|
|
1901
|
+
}
|
|
1902
|
+
/**
|
|
1903
|
+
* @returns {Uint8Array}
|
|
1904
|
+
*/
|
|
1905
|
+
get note_body_style_columns() {
|
|
1906
|
+
const ret = wasm.__wbg_get_osukeymode_note_body_style_columns(this.__wbg_ptr);
|
|
1907
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1908
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1909
|
+
return v1;
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
* @param {Uint8Array} arg0
|
|
1913
|
+
*/
|
|
1914
|
+
set note_body_style_columns(arg0) {
|
|
1915
|
+
const ptr0 = passArray8ToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1916
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1917
|
+
wasm.__wbg_set_osukeymode_note_body_style_columns(this.__wbg_ptr, ptr0, len0);
|
|
1918
|
+
}
|
|
1919
|
+
/**
|
|
1920
|
+
* @returns {string[]}
|
|
1921
|
+
*/
|
|
1922
|
+
get receptor_images() {
|
|
1923
|
+
const ret = wasm.__wbg_get_osukeymode_receptor_images(this.__wbg_ptr);
|
|
1924
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1925
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1926
|
+
return v1;
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* @param {string[]} arg0
|
|
1930
|
+
*/
|
|
1931
|
+
set receptor_images(arg0) {
|
|
1932
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1933
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1934
|
+
wasm.__wbg_set_osukeymode_receptor_images(this.__wbg_ptr, ptr0, len0);
|
|
1935
|
+
}
|
|
1936
|
+
/**
|
|
1937
|
+
* @returns {string[]}
|
|
1938
|
+
*/
|
|
1939
|
+
get receptor_images_down() {
|
|
1940
|
+
const ret = wasm.__wbg_get_osukeymode_receptor_images_down(this.__wbg_ptr);
|
|
1941
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1942
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1943
|
+
return v1;
|
|
1944
|
+
}
|
|
1945
|
+
/**
|
|
1946
|
+
* @param {string[]} arg0
|
|
1947
|
+
*/
|
|
1948
|
+
set receptor_images_down(arg0) {
|
|
1949
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1950
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1951
|
+
wasm.__wbg_set_osukeymode_receptor_images_down(this.__wbg_ptr, ptr0, len0);
|
|
1952
|
+
}
|
|
1953
|
+
/**
|
|
1954
|
+
* @returns {string[]}
|
|
1955
|
+
*/
|
|
1956
|
+
get normal_note_images() {
|
|
1957
|
+
const ret = wasm.__wbg_get_osukeymode_normal_note_images(this.__wbg_ptr);
|
|
1958
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1959
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1960
|
+
return v1;
|
|
1961
|
+
}
|
|
1962
|
+
/**
|
|
1963
|
+
* @param {string[]} arg0
|
|
1964
|
+
*/
|
|
1965
|
+
set normal_note_images(arg0) {
|
|
1966
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1967
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1968
|
+
wasm.__wbg_set_osukeymode_normal_note_images(this.__wbg_ptr, ptr0, len0);
|
|
1969
|
+
}
|
|
1970
|
+
/**
|
|
1971
|
+
* @returns {string[]}
|
|
1972
|
+
*/
|
|
1973
|
+
get long_note_head_images() {
|
|
1974
|
+
const ret = wasm.__wbg_get_osukeymode_long_note_head_images(this.__wbg_ptr);
|
|
1975
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1976
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1977
|
+
return v1;
|
|
1978
|
+
}
|
|
1979
|
+
/**
|
|
1980
|
+
* @param {string[]} arg0
|
|
1981
|
+
*/
|
|
1982
|
+
set long_note_head_images(arg0) {
|
|
1983
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
1984
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1985
|
+
wasm.__wbg_set_osukeymode_long_note_head_images(this.__wbg_ptr, ptr0, len0);
|
|
1986
|
+
}
|
|
1987
|
+
/**
|
|
1988
|
+
* @returns {string[]}
|
|
1989
|
+
*/
|
|
1990
|
+
get long_note_body_images() {
|
|
1991
|
+
const ret = wasm.__wbg_get_osukeymode_long_note_body_images(this.__wbg_ptr);
|
|
1992
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1993
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1994
|
+
return v1;
|
|
1995
|
+
}
|
|
1996
|
+
/**
|
|
1997
|
+
* @param {string[]} arg0
|
|
1998
|
+
*/
|
|
1999
|
+
set long_note_body_images(arg0) {
|
|
2000
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
2001
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2002
|
+
wasm.__wbg_set_osukeymode_long_note_body_images(this.__wbg_ptr, ptr0, len0);
|
|
2003
|
+
}
|
|
2004
|
+
/**
|
|
2005
|
+
* @returns {string[]}
|
|
2006
|
+
*/
|
|
2007
|
+
get long_note_tail_images() {
|
|
2008
|
+
const ret = wasm.__wbg_get_osukeymode_long_note_tail_images(this.__wbg_ptr);
|
|
2009
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
2010
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2011
|
+
return v1;
|
|
2012
|
+
}
|
|
2013
|
+
/**
|
|
2014
|
+
* @param {string[]} arg0
|
|
2015
|
+
*/
|
|
2016
|
+
set long_note_tail_images(arg0) {
|
|
2017
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
2018
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2019
|
+
wasm.__wbg_set_osukeymode_long_note_tail_images(this.__wbg_ptr, ptr0, len0);
|
|
2020
|
+
}
|
|
2021
|
+
/**
|
|
2022
|
+
* @returns {string}
|
|
2023
|
+
*/
|
|
2024
|
+
get stage_left() {
|
|
2025
|
+
let deferred1_0;
|
|
2026
|
+
let deferred1_1;
|
|
2027
|
+
try {
|
|
2028
|
+
const ret = wasm.__wbg_get_osukeymode_stage_left(this.__wbg_ptr);
|
|
2029
|
+
deferred1_0 = ret[0];
|
|
2030
|
+
deferred1_1 = ret[1];
|
|
2031
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2032
|
+
} finally {
|
|
2033
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
/**
|
|
2037
|
+
* @param {string} arg0
|
|
2038
|
+
*/
|
|
2039
|
+
set stage_left(arg0) {
|
|
2040
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2041
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2042
|
+
wasm.__wbg_set_osukeymode_stage_left(this.__wbg_ptr, ptr0, len0);
|
|
2043
|
+
}
|
|
2044
|
+
/**
|
|
2045
|
+
* @returns {string}
|
|
2046
|
+
*/
|
|
2047
|
+
get stage_right() {
|
|
2048
|
+
let deferred1_0;
|
|
2049
|
+
let deferred1_1;
|
|
2050
|
+
try {
|
|
2051
|
+
const ret = wasm.__wbg_get_osukeymode_stage_right(this.__wbg_ptr);
|
|
2052
|
+
deferred1_0 = ret[0];
|
|
2053
|
+
deferred1_1 = ret[1];
|
|
2054
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2055
|
+
} finally {
|
|
2056
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
/**
|
|
2060
|
+
* @param {string} arg0
|
|
2061
|
+
*/
|
|
2062
|
+
set stage_right(arg0) {
|
|
2063
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2064
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2065
|
+
wasm.__wbg_set_osukeymode_stage_right(this.__wbg_ptr, ptr0, len0);
|
|
2066
|
+
}
|
|
2067
|
+
/**
|
|
2068
|
+
* @returns {string}
|
|
2069
|
+
*/
|
|
2070
|
+
get stage_bottom() {
|
|
2071
|
+
let deferred1_0;
|
|
2072
|
+
let deferred1_1;
|
|
2073
|
+
try {
|
|
2074
|
+
const ret = wasm.__wbg_get_osukeymode_stage_bottom(this.__wbg_ptr);
|
|
2075
|
+
deferred1_0 = ret[0];
|
|
2076
|
+
deferred1_1 = ret[1];
|
|
2077
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2078
|
+
} finally {
|
|
2079
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
/**
|
|
2083
|
+
* @param {string} arg0
|
|
2084
|
+
*/
|
|
2085
|
+
set stage_bottom(arg0) {
|
|
2086
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2087
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2088
|
+
wasm.__wbg_set_osukeymode_stage_bottom(this.__wbg_ptr, ptr0, len0);
|
|
2089
|
+
}
|
|
2090
|
+
/**
|
|
2091
|
+
* @returns {string}
|
|
2092
|
+
*/
|
|
2093
|
+
get stage_hint() {
|
|
2094
|
+
let deferred1_0;
|
|
2095
|
+
let deferred1_1;
|
|
2096
|
+
try {
|
|
2097
|
+
const ret = wasm.__wbg_get_osukeymode_stage_hint(this.__wbg_ptr);
|
|
2098
|
+
deferred1_0 = ret[0];
|
|
2099
|
+
deferred1_1 = ret[1];
|
|
2100
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2101
|
+
} finally {
|
|
2102
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
/**
|
|
2106
|
+
* @param {string} arg0
|
|
2107
|
+
*/
|
|
2108
|
+
set stage_hint(arg0) {
|
|
2109
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2110
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2111
|
+
wasm.__wbg_set_osukeymode_stage_hint(this.__wbg_ptr, ptr0, len0);
|
|
2112
|
+
}
|
|
2113
|
+
/**
|
|
2114
|
+
* @returns {string}
|
|
2115
|
+
*/
|
|
2116
|
+
get stage_light() {
|
|
2117
|
+
let deferred1_0;
|
|
2118
|
+
let deferred1_1;
|
|
2119
|
+
try {
|
|
2120
|
+
const ret = wasm.__wbg_get_osukeymode_stage_light(this.__wbg_ptr);
|
|
2121
|
+
deferred1_0 = ret[0];
|
|
2122
|
+
deferred1_1 = ret[1];
|
|
2123
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2124
|
+
} finally {
|
|
2125
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
/**
|
|
2129
|
+
* @param {string} arg0
|
|
2130
|
+
*/
|
|
2131
|
+
set stage_light(arg0) {
|
|
2132
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2133
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2134
|
+
wasm.__wbg_set_osukeymode_stage_light(this.__wbg_ptr, ptr0, len0);
|
|
2135
|
+
}
|
|
2136
|
+
/**
|
|
2137
|
+
* @returns {string}
|
|
2138
|
+
*/
|
|
2139
|
+
get lighting_n() {
|
|
2140
|
+
let deferred1_0;
|
|
2141
|
+
let deferred1_1;
|
|
2142
|
+
try {
|
|
2143
|
+
const ret = wasm.__wbg_get_osukeymode_lighting_n(this.__wbg_ptr);
|
|
2144
|
+
deferred1_0 = ret[0];
|
|
2145
|
+
deferred1_1 = ret[1];
|
|
2146
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2147
|
+
} finally {
|
|
2148
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
/**
|
|
2152
|
+
* @param {string} arg0
|
|
2153
|
+
*/
|
|
2154
|
+
set lighting_n(arg0) {
|
|
2155
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2156
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2157
|
+
wasm.__wbg_set_osukeymode_lighting_n(this.__wbg_ptr, ptr0, len0);
|
|
2158
|
+
}
|
|
2159
|
+
/**
|
|
2160
|
+
* @returns {string}
|
|
2161
|
+
*/
|
|
2162
|
+
get lighting_l() {
|
|
2163
|
+
let deferred1_0;
|
|
2164
|
+
let deferred1_1;
|
|
2165
|
+
try {
|
|
2166
|
+
const ret = wasm.__wbg_get_osukeymode_lighting_l(this.__wbg_ptr);
|
|
2167
|
+
deferred1_0 = ret[0];
|
|
2168
|
+
deferred1_1 = ret[1];
|
|
2169
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2170
|
+
} finally {
|
|
2171
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
/**
|
|
2175
|
+
* @param {string} arg0
|
|
2176
|
+
*/
|
|
2177
|
+
set lighting_l(arg0) {
|
|
2178
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2179
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2180
|
+
wasm.__wbg_set_osukeymode_lighting_l(this.__wbg_ptr, ptr0, len0);
|
|
2181
|
+
}
|
|
2182
|
+
/**
|
|
2183
|
+
* @returns {string}
|
|
2184
|
+
*/
|
|
2185
|
+
get warning_arrow() {
|
|
2186
|
+
let deferred1_0;
|
|
2187
|
+
let deferred1_1;
|
|
2188
|
+
try {
|
|
2189
|
+
const ret = wasm.__wbg_get_osukeymode_warning_arrow(this.__wbg_ptr);
|
|
2190
|
+
deferred1_0 = ret[0];
|
|
2191
|
+
deferred1_1 = ret[1];
|
|
2192
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2193
|
+
} finally {
|
|
2194
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
/**
|
|
2198
|
+
* @param {string} arg0
|
|
2199
|
+
*/
|
|
2200
|
+
set warning_arrow(arg0) {
|
|
2201
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2202
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2203
|
+
wasm.__wbg_set_osukeymode_warning_arrow(this.__wbg_ptr, ptr0, len0);
|
|
2204
|
+
}
|
|
2205
|
+
/**
|
|
2206
|
+
* @returns {string}
|
|
2207
|
+
*/
|
|
2208
|
+
get hit0() {
|
|
2209
|
+
let deferred1_0;
|
|
2210
|
+
let deferred1_1;
|
|
2211
|
+
try {
|
|
2212
|
+
const ret = wasm.__wbg_get_osukeymode_hit0(this.__wbg_ptr);
|
|
2213
|
+
deferred1_0 = ret[0];
|
|
2214
|
+
deferred1_1 = ret[1];
|
|
2215
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2216
|
+
} finally {
|
|
2217
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
/**
|
|
2221
|
+
* @param {string} arg0
|
|
2222
|
+
*/
|
|
2223
|
+
set hit0(arg0) {
|
|
2224
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2225
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2226
|
+
wasm.__wbg_set_osukeymode_hit0(this.__wbg_ptr, ptr0, len0);
|
|
2227
|
+
}
|
|
2228
|
+
/**
|
|
2229
|
+
* @returns {string}
|
|
2230
|
+
*/
|
|
2231
|
+
get hit50() {
|
|
2232
|
+
let deferred1_0;
|
|
2233
|
+
let deferred1_1;
|
|
2234
|
+
try {
|
|
2235
|
+
const ret = wasm.__wbg_get_osukeymode_hit50(this.__wbg_ptr);
|
|
2236
|
+
deferred1_0 = ret[0];
|
|
2237
|
+
deferred1_1 = ret[1];
|
|
2238
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2239
|
+
} finally {
|
|
2240
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
/**
|
|
2244
|
+
* @param {string} arg0
|
|
2245
|
+
*/
|
|
2246
|
+
set hit50(arg0) {
|
|
2247
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2248
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2249
|
+
wasm.__wbg_set_osukeymode_hit50(this.__wbg_ptr, ptr0, len0);
|
|
2250
|
+
}
|
|
2251
|
+
/**
|
|
2252
|
+
* @returns {string}
|
|
2253
|
+
*/
|
|
2254
|
+
get hit100() {
|
|
2255
|
+
let deferred1_0;
|
|
2256
|
+
let deferred1_1;
|
|
2257
|
+
try {
|
|
2258
|
+
const ret = wasm.__wbg_get_osukeymode_hit100(this.__wbg_ptr);
|
|
2259
|
+
deferred1_0 = ret[0];
|
|
2260
|
+
deferred1_1 = ret[1];
|
|
2261
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2262
|
+
} finally {
|
|
2263
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
/**
|
|
2267
|
+
* @param {string} arg0
|
|
2268
|
+
*/
|
|
2269
|
+
set hit100(arg0) {
|
|
2270
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2271
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2272
|
+
wasm.__wbg_set_osukeymode_hit100(this.__wbg_ptr, ptr0, len0);
|
|
2273
|
+
}
|
|
2274
|
+
/**
|
|
2275
|
+
* @returns {string}
|
|
2276
|
+
*/
|
|
2277
|
+
get hit200() {
|
|
2278
|
+
let deferred1_0;
|
|
2279
|
+
let deferred1_1;
|
|
2280
|
+
try {
|
|
2281
|
+
const ret = wasm.__wbg_get_osukeymode_hit200(this.__wbg_ptr);
|
|
2282
|
+
deferred1_0 = ret[0];
|
|
2283
|
+
deferred1_1 = ret[1];
|
|
2284
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2285
|
+
} finally {
|
|
2286
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
/**
|
|
2290
|
+
* @param {string} arg0
|
|
2291
|
+
*/
|
|
2292
|
+
set hit200(arg0) {
|
|
2293
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2294
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2295
|
+
wasm.__wbg_set_osukeymode_hit200(this.__wbg_ptr, ptr0, len0);
|
|
2296
|
+
}
|
|
2297
|
+
/**
|
|
2298
|
+
* @returns {string}
|
|
2299
|
+
*/
|
|
2300
|
+
get hit300() {
|
|
2301
|
+
let deferred1_0;
|
|
2302
|
+
let deferred1_1;
|
|
2303
|
+
try {
|
|
2304
|
+
const ret = wasm.__wbg_get_osukeymode_hit300(this.__wbg_ptr);
|
|
2305
|
+
deferred1_0 = ret[0];
|
|
2306
|
+
deferred1_1 = ret[1];
|
|
2307
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2308
|
+
} finally {
|
|
2309
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
/**
|
|
2313
|
+
* @param {string} arg0
|
|
2314
|
+
*/
|
|
2315
|
+
set hit300(arg0) {
|
|
2316
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2317
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2318
|
+
wasm.__wbg_set_osukeymode_hit300(this.__wbg_ptr, ptr0, len0);
|
|
2319
|
+
}
|
|
2320
|
+
/**
|
|
2321
|
+
* @returns {string}
|
|
2322
|
+
*/
|
|
2323
|
+
get hit300g() {
|
|
2324
|
+
let deferred1_0;
|
|
2325
|
+
let deferred1_1;
|
|
2326
|
+
try {
|
|
2327
|
+
const ret = wasm.__wbg_get_osukeymode_hit300g(this.__wbg_ptr);
|
|
2328
|
+
deferred1_0 = ret[0];
|
|
2329
|
+
deferred1_1 = ret[1];
|
|
2330
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2331
|
+
} finally {
|
|
2332
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
/**
|
|
2336
|
+
* @param {string} arg0
|
|
2337
|
+
*/
|
|
2338
|
+
set hit300g(arg0) {
|
|
2339
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2340
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2341
|
+
wasm.__wbg_set_osukeymode_hit300g(this.__wbg_ptr, ptr0, len0);
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
if (Symbol.dispose) OsuKeymode.prototype[Symbol.dispose] = OsuKeymode.prototype.free;
|
|
2345
|
+
exports.OsuKeymode = OsuKeymode;
|
|
2346
|
+
|
|
2347
|
+
class OsuSkin {
|
|
2348
|
+
static __wrap(ptr) {
|
|
2349
|
+
ptr = ptr >>> 0;
|
|
2350
|
+
const obj = Object.create(OsuSkin.prototype);
|
|
2351
|
+
obj.__wbg_ptr = ptr;
|
|
2352
|
+
OsuSkinFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2353
|
+
return obj;
|
|
2354
|
+
}
|
|
2355
|
+
__destroy_into_raw() {
|
|
2356
|
+
const ptr = this.__wbg_ptr;
|
|
2357
|
+
this.__wbg_ptr = 0;
|
|
2358
|
+
OsuSkinFinalization.unregister(this);
|
|
2359
|
+
return ptr;
|
|
2360
|
+
}
|
|
2361
|
+
free() {
|
|
2362
|
+
const ptr = this.__destroy_into_raw();
|
|
2363
|
+
wasm.__wbg_osuskin_free(ptr, 0);
|
|
2364
|
+
}
|
|
2365
|
+
/**
|
|
2366
|
+
* @returns {OsuSkinIni}
|
|
2367
|
+
*/
|
|
2368
|
+
get skin_ini() {
|
|
2369
|
+
const ret = wasm.__wbg_get_osuskin_skin_ini(this.__wbg_ptr);
|
|
2370
|
+
return OsuSkinIni.__wrap(ret);
|
|
2371
|
+
}
|
|
2372
|
+
/**
|
|
2373
|
+
* @param {OsuSkinIni} arg0
|
|
2374
|
+
*/
|
|
2375
|
+
set skin_ini(arg0) {
|
|
2376
|
+
_assertClass(arg0, OsuSkinIni);
|
|
2377
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
2378
|
+
wasm.__wbg_set_osuskin_skin_ini(this.__wbg_ptr, ptr0);
|
|
2379
|
+
}
|
|
2380
|
+
/**
|
|
2381
|
+
* @returns {TextureStore}
|
|
2382
|
+
*/
|
|
2383
|
+
get textures() {
|
|
2384
|
+
const ret = wasm.__wbg_get_osuskin_textures(this.__wbg_ptr);
|
|
2385
|
+
return TextureStore.__wrap(ret);
|
|
2386
|
+
}
|
|
2387
|
+
/**
|
|
2388
|
+
* @param {TextureStore} arg0
|
|
2389
|
+
*/
|
|
2390
|
+
set textures(arg0) {
|
|
2391
|
+
_assertClass(arg0, TextureStore);
|
|
2392
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
2393
|
+
wasm.__wbg_set_osuskin_textures(this.__wbg_ptr, ptr0);
|
|
2394
|
+
}
|
|
2395
|
+
/**
|
|
2396
|
+
* @returns {BinaryStore}
|
|
2397
|
+
*/
|
|
2398
|
+
get samples() {
|
|
2399
|
+
const ret = wasm.__wbg_get_osuskin_samples(this.__wbg_ptr);
|
|
2400
|
+
return BinaryStore.__wrap(ret);
|
|
2401
|
+
}
|
|
2402
|
+
/**
|
|
2403
|
+
* @param {BinaryStore} arg0
|
|
2404
|
+
*/
|
|
2405
|
+
set samples(arg0) {
|
|
2406
|
+
_assertClass(arg0, BinaryStore);
|
|
2407
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
2408
|
+
wasm.__wbg_set_osuskin_samples(this.__wbg_ptr, ptr0);
|
|
2409
|
+
}
|
|
2410
|
+
/**
|
|
2411
|
+
* @param {OsuSkinIni} skin_ini
|
|
2412
|
+
* @param {TextureStore | null} [textures]
|
|
2413
|
+
* @param {BinaryStore | null} [samples]
|
|
2414
|
+
*/
|
|
2415
|
+
constructor(skin_ini, textures, samples) {
|
|
2416
|
+
_assertClass(skin_ini, OsuSkinIni);
|
|
2417
|
+
var ptr0 = skin_ini.__destroy_into_raw();
|
|
2418
|
+
let ptr1 = 0;
|
|
2419
|
+
if (!isLikeNone(textures)) {
|
|
2420
|
+
_assertClass(textures, TextureStore);
|
|
2421
|
+
ptr1 = textures.__destroy_into_raw();
|
|
2422
|
+
}
|
|
2423
|
+
let ptr2 = 0;
|
|
2424
|
+
if (!isLikeNone(samples)) {
|
|
2425
|
+
_assertClass(samples, BinaryStore);
|
|
2426
|
+
ptr2 = samples.__destroy_into_raw();
|
|
2427
|
+
}
|
|
2428
|
+
const ret = wasm.osuskin_new(ptr0, ptr1, ptr2);
|
|
2429
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2430
|
+
OsuSkinFinalization.register(this, this.__wbg_ptr, this);
|
|
2431
|
+
return this;
|
|
2432
|
+
}
|
|
2433
|
+
/**
|
|
2434
|
+
* @returns {GenericManiaSkin}
|
|
2435
|
+
*/
|
|
2436
|
+
toGenericMania() {
|
|
2437
|
+
const ret = wasm.osuskin_toGenericMania(this.__wbg_ptr);
|
|
2438
|
+
if (ret[2]) {
|
|
2439
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2440
|
+
}
|
|
2441
|
+
return GenericManiaSkin.__wrap(ret[0]);
|
|
2442
|
+
}
|
|
2443
|
+
/**
|
|
2444
|
+
* @param {GenericManiaSkin} skin
|
|
2445
|
+
* @returns {OsuSkin}
|
|
2446
|
+
*/
|
|
2447
|
+
static fromGenericMania(skin) {
|
|
2448
|
+
_assertClass(skin, GenericManiaSkin);
|
|
2449
|
+
const ret = wasm.osuskin_fromGenericMania(skin.__wbg_ptr);
|
|
2450
|
+
if (ret[2]) {
|
|
2451
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2452
|
+
}
|
|
2453
|
+
return OsuSkin.__wrap(ret[0]);
|
|
2454
|
+
}
|
|
2455
|
+
/**
|
|
2456
|
+
* @param {number} keymode
|
|
2457
|
+
* @returns {OsuKeymode | undefined}
|
|
2458
|
+
*/
|
|
2459
|
+
getKeymode(keymode) {
|
|
2460
|
+
const ret = wasm.osuskin_getKeymode(this.__wbg_ptr, keymode);
|
|
2461
|
+
return ret === 0 ? undefined : OsuKeymode.__wrap(ret);
|
|
2462
|
+
}
|
|
2463
|
+
/**
|
|
2464
|
+
* @returns {string[]}
|
|
2465
|
+
*/
|
|
2466
|
+
getRequiredTexturePaths() {
|
|
2467
|
+
const ret = wasm.osuskin_getRequiredTexturePaths(this.__wbg_ptr);
|
|
2468
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
2469
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2470
|
+
return v1;
|
|
2471
|
+
}
|
|
2472
|
+
/**
|
|
2473
|
+
* @returns {string[]}
|
|
2474
|
+
*/
|
|
2475
|
+
getRequiredSamplePaths() {
|
|
2476
|
+
const ret = wasm.osuskin_getRequiredSamplePaths(this.__wbg_ptr);
|
|
2477
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
2478
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2479
|
+
return v1;
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
if (Symbol.dispose) OsuSkin.prototype[Symbol.dispose] = OsuSkin.prototype.free;
|
|
2483
|
+
exports.OsuSkin = OsuSkin;
|
|
2484
|
+
|
|
2485
|
+
class OsuSkinIni {
|
|
2486
|
+
static __wrap(ptr) {
|
|
2487
|
+
ptr = ptr >>> 0;
|
|
2488
|
+
const obj = Object.create(OsuSkinIni.prototype);
|
|
2489
|
+
obj.__wbg_ptr = ptr;
|
|
2490
|
+
OsuSkinIniFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2491
|
+
return obj;
|
|
2492
|
+
}
|
|
2493
|
+
__destroy_into_raw() {
|
|
2494
|
+
const ptr = this.__wbg_ptr;
|
|
2495
|
+
this.__wbg_ptr = 0;
|
|
2496
|
+
OsuSkinIniFinalization.unregister(this);
|
|
2497
|
+
return ptr;
|
|
2498
|
+
}
|
|
2499
|
+
free() {
|
|
2500
|
+
const ptr = this.__destroy_into_raw();
|
|
2501
|
+
wasm.__wbg_osuskinini_free(ptr, 0);
|
|
2502
|
+
}
|
|
2503
|
+
/**
|
|
2504
|
+
* @returns {General}
|
|
2505
|
+
*/
|
|
2506
|
+
get general() {
|
|
2507
|
+
const ret = wasm.__wbg_get_osuskinini_general(this.__wbg_ptr);
|
|
2508
|
+
return General.__wrap(ret);
|
|
2509
|
+
}
|
|
2510
|
+
/**
|
|
2511
|
+
* @param {General} arg0
|
|
2512
|
+
*/
|
|
2513
|
+
set general(arg0) {
|
|
2514
|
+
_assertClass(arg0, General);
|
|
2515
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
2516
|
+
wasm.__wbg_set_osuskinini_general(this.__wbg_ptr, ptr0);
|
|
2517
|
+
}
|
|
2518
|
+
/**
|
|
2519
|
+
* @returns {OsuKeymode[]}
|
|
2520
|
+
*/
|
|
2521
|
+
get keymodes() {
|
|
2522
|
+
const ret = wasm.__wbg_get_osuskinini_keymodes(this.__wbg_ptr);
|
|
2523
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
2524
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2525
|
+
return v1;
|
|
2526
|
+
}
|
|
2527
|
+
/**
|
|
2528
|
+
* @param {OsuKeymode[]} arg0
|
|
2529
|
+
*/
|
|
2530
|
+
set keymodes(arg0) {
|
|
2531
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
2532
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2533
|
+
wasm.__wbg_set_osuskinini_keymodes(this.__wbg_ptr, ptr0, len0);
|
|
2534
|
+
}
|
|
2535
|
+
constructor() {
|
|
2536
|
+
const ret = wasm.osuskinini_new();
|
|
2537
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2538
|
+
OsuSkinIniFinalization.register(this, this.__wbg_ptr, this);
|
|
2539
|
+
return this;
|
|
2540
|
+
}
|
|
2541
|
+
/**
|
|
2542
|
+
* @param {string} json_str
|
|
2543
|
+
* @returns {OsuSkinIni}
|
|
2544
|
+
*/
|
|
2545
|
+
static fromStr(json_str) {
|
|
2546
|
+
const ptr0 = passStringToWasm0(json_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2547
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2548
|
+
const ret = wasm.osuskinini_fromStr(ptr0, len0);
|
|
2549
|
+
if (ret[2]) {
|
|
2550
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2551
|
+
}
|
|
2552
|
+
return OsuSkinIni.__wrap(ret[0]);
|
|
2553
|
+
}
|
|
2554
|
+
/**
|
|
2555
|
+
* @returns {string}
|
|
2556
|
+
*/
|
|
2557
|
+
toString() {
|
|
2558
|
+
let deferred1_0;
|
|
2559
|
+
let deferred1_1;
|
|
2560
|
+
try {
|
|
2561
|
+
const ret = wasm.osuskinini_toString(this.__wbg_ptr);
|
|
2562
|
+
deferred1_0 = ret[0];
|
|
2563
|
+
deferred1_1 = ret[1];
|
|
2564
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2565
|
+
} finally {
|
|
2566
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
/**
|
|
2570
|
+
* @returns {string[]}
|
|
2571
|
+
*/
|
|
2572
|
+
getRequiredTexturePaths() {
|
|
2573
|
+
const ret = wasm.osuskinini_getRequiredTexturePaths(this.__wbg_ptr);
|
|
2574
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
2575
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2576
|
+
return v1;
|
|
2577
|
+
}
|
|
2578
|
+
/**
|
|
2579
|
+
* @returns {string[]}
|
|
2580
|
+
*/
|
|
2581
|
+
getRequiredSamplePaths() {
|
|
2582
|
+
const ret = wasm.osuskinini_getRequiredSamplePaths(this.__wbg_ptr);
|
|
2583
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
2584
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2585
|
+
return v1;
|
|
2586
|
+
}
|
|
2587
|
+
/**
|
|
2588
|
+
* @param {number} keymode
|
|
2589
|
+
* @returns {OsuKeymode | undefined}
|
|
2590
|
+
*/
|
|
2591
|
+
getKeymode(keymode) {
|
|
2592
|
+
const ret = wasm.osuskinini_getKeymode(this.__wbg_ptr, keymode);
|
|
2593
|
+
return ret === 0 ? undefined : OsuKeymode.__wrap(ret);
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2596
|
+
if (Symbol.dispose) OsuSkinIni.prototype[Symbol.dispose] = OsuSkinIni.prototype.free;
|
|
2597
|
+
exports.OsuSkinIni = OsuSkinIni;
|
|
2598
|
+
|
|
2599
|
+
class RawBytes {
|
|
2600
|
+
static __wrap(ptr) {
|
|
2601
|
+
ptr = ptr >>> 0;
|
|
2602
|
+
const obj = Object.create(RawBytes.prototype);
|
|
2603
|
+
obj.__wbg_ptr = ptr;
|
|
2604
|
+
RawBytesFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2605
|
+
return obj;
|
|
2606
|
+
}
|
|
2607
|
+
__destroy_into_raw() {
|
|
2608
|
+
const ptr = this.__wbg_ptr;
|
|
2609
|
+
this.__wbg_ptr = 0;
|
|
2610
|
+
RawBytesFinalization.unregister(this);
|
|
2611
|
+
return ptr;
|
|
2612
|
+
}
|
|
2613
|
+
free() {
|
|
2614
|
+
const ptr = this.__destroy_into_raw();
|
|
2615
|
+
wasm.__wbg_rawbytes_free(ptr, 0);
|
|
2616
|
+
}
|
|
2617
|
+
/**
|
|
2618
|
+
* @returns {string}
|
|
2619
|
+
*/
|
|
2620
|
+
get path() {
|
|
2621
|
+
let deferred1_0;
|
|
2622
|
+
let deferred1_1;
|
|
2623
|
+
try {
|
|
2624
|
+
const ret = wasm.__wbg_get_rawbytes_path(this.__wbg_ptr);
|
|
2625
|
+
deferred1_0 = ret[0];
|
|
2626
|
+
deferred1_1 = ret[1];
|
|
2627
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2628
|
+
} finally {
|
|
2629
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
/**
|
|
2633
|
+
* @param {string} arg0
|
|
2634
|
+
*/
|
|
2635
|
+
set path(arg0) {
|
|
2636
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2637
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2638
|
+
wasm.__wbg_set_rawbytes_path(this.__wbg_ptr, ptr0, len0);
|
|
2639
|
+
}
|
|
2640
|
+
/**
|
|
2641
|
+
* @param {string} path
|
|
2642
|
+
*/
|
|
2643
|
+
constructor(path) {
|
|
2644
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2645
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2646
|
+
const ret = wasm.rawbytes_new(ptr0, len0);
|
|
2647
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2648
|
+
RawBytesFinalization.register(this, this.__wbg_ptr, this);
|
|
2649
|
+
return this;
|
|
2650
|
+
}
|
|
2651
|
+
/**
|
|
2652
|
+
* @param {string} path
|
|
2653
|
+
* @param {Uint8Array} bytes
|
|
2654
|
+
* @returns {RawBytes}
|
|
2655
|
+
*/
|
|
2656
|
+
static fromBytes(path, bytes) {
|
|
2657
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2658
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2659
|
+
const ptr1 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
2660
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2661
|
+
const ret = wasm.rawbytes_fromBytes(ptr0, len0, ptr1, len1);
|
|
2662
|
+
return RawBytes.__wrap(ret);
|
|
2663
|
+
}
|
|
2664
|
+
/**
|
|
2665
|
+
* @returns {Uint8Array | undefined}
|
|
2666
|
+
*/
|
|
2667
|
+
getData() {
|
|
2668
|
+
const ret = wasm.rawbytes_getData(this.__wbg_ptr);
|
|
2669
|
+
return ret;
|
|
2670
|
+
}
|
|
2671
|
+
/**
|
|
2672
|
+
* @param {string} path
|
|
2673
|
+
* @param {ArrayBuffer} buffer
|
|
2674
|
+
* @returns {RawBytes}
|
|
2675
|
+
*/
|
|
2676
|
+
static fromArrayBuffer(path, buffer) {
|
|
2677
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2678
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2679
|
+
const ret = wasm.rawbytes_fromArrayBuffer(ptr0, len0, buffer);
|
|
2680
|
+
if (ret[2]) {
|
|
2681
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2682
|
+
}
|
|
2683
|
+
return RawBytes.__wrap(ret[0]);
|
|
2684
|
+
}
|
|
2685
|
+
/**
|
|
2686
|
+
* @param {string} path
|
|
2687
|
+
* @param {ArrayBuffer} buffer
|
|
2688
|
+
* @returns {RawBytes}
|
|
2689
|
+
*/
|
|
2690
|
+
static fromArrayBufferUnloaded(path, buffer) {
|
|
2691
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2692
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2693
|
+
const ret = wasm.rawbytes_fromArrayBufferUnloaded(ptr0, len0, buffer);
|
|
2694
|
+
if (ret[2]) {
|
|
2695
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2696
|
+
}
|
|
2697
|
+
return RawBytes.__wrap(ret[0]);
|
|
2698
|
+
}
|
|
2699
|
+
/**
|
|
2700
|
+
* @param {string} path
|
|
2701
|
+
* @param {Uint8Array} array
|
|
2702
|
+
* @returns {RawBytes}
|
|
2703
|
+
*/
|
|
2704
|
+
static fromUint8Array(path, array) {
|
|
2705
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2706
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2707
|
+
const ret = wasm.rawbytes_fromUint8Array(ptr0, len0, array);
|
|
2708
|
+
if (ret[2]) {
|
|
2709
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2710
|
+
}
|
|
2711
|
+
return RawBytes.__wrap(ret[0]);
|
|
2712
|
+
}
|
|
2713
|
+
/**
|
|
2714
|
+
* @param {string} path
|
|
2715
|
+
* @param {Uint8Array} array
|
|
2716
|
+
* @returns {RawBytes}
|
|
2717
|
+
*/
|
|
2718
|
+
static fromUint8ArrayUnloaded(path, array) {
|
|
2719
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2720
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2721
|
+
const ret = wasm.rawbytes_fromUint8ArrayUnloaded(ptr0, len0, array);
|
|
2722
|
+
if (ret[2]) {
|
|
2723
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2724
|
+
}
|
|
2725
|
+
return RawBytes.__wrap(ret[0]);
|
|
2726
|
+
}
|
|
2727
|
+
/**
|
|
2728
|
+
* @returns {string}
|
|
2729
|
+
*/
|
|
2730
|
+
getPath() {
|
|
2731
|
+
let deferred1_0;
|
|
2732
|
+
let deferred1_1;
|
|
2733
|
+
try {
|
|
2734
|
+
const ret = wasm.rawbytes_getPath(this.__wbg_ptr);
|
|
2735
|
+
deferred1_0 = ret[0];
|
|
2736
|
+
deferred1_1 = ret[1];
|
|
2737
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2738
|
+
} finally {
|
|
2739
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
/**
|
|
2743
|
+
* @returns {boolean}
|
|
2744
|
+
*/
|
|
2745
|
+
hasData() {
|
|
2746
|
+
const ret = wasm.rawbytes_hasData(this.__wbg_ptr);
|
|
2747
|
+
return ret !== 0;
|
|
2748
|
+
}
|
|
2749
|
+
/**
|
|
2750
|
+
* @returns {boolean}
|
|
2751
|
+
*/
|
|
2752
|
+
isLoaded() {
|
|
2753
|
+
const ret = wasm.rawbytes_isLoaded(this.__wbg_ptr);
|
|
2754
|
+
return ret !== 0;
|
|
2755
|
+
}
|
|
2756
|
+
/**
|
|
2757
|
+
* @returns {boolean}
|
|
2758
|
+
*/
|
|
2759
|
+
isUnloaded() {
|
|
2760
|
+
const ret = wasm.rawbytes_isUnloaded(this.__wbg_ptr);
|
|
2761
|
+
return ret !== 0;
|
|
2762
|
+
}
|
|
2763
|
+
/**
|
|
2764
|
+
* @returns {boolean}
|
|
2765
|
+
*/
|
|
2766
|
+
isEmpty() {
|
|
2767
|
+
const ret = wasm.rawbytes_isEmpty(this.__wbg_ptr);
|
|
2768
|
+
return ret !== 0;
|
|
2769
|
+
}
|
|
2770
|
+
load() {
|
|
2771
|
+
const ret = wasm.rawbytes_load(this.__wbg_ptr);
|
|
2772
|
+
if (ret[1]) {
|
|
2773
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
unload() {
|
|
2777
|
+
const ret = wasm.rawbytes_unload(this.__wbg_ptr);
|
|
2778
|
+
if (ret[1]) {
|
|
2779
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
if (Symbol.dispose) RawBytes.prototype[Symbol.dispose] = RawBytes.prototype.free;
|
|
2784
|
+
exports.RawBytes = RawBytes;
|
|
2785
|
+
|
|
2786
|
+
class SkinJson {
|
|
2787
|
+
static __wrap(ptr) {
|
|
2788
|
+
ptr = ptr >>> 0;
|
|
2789
|
+
const obj = Object.create(SkinJson.prototype);
|
|
2790
|
+
obj.__wbg_ptr = ptr;
|
|
2791
|
+
SkinJsonFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2792
|
+
return obj;
|
|
2793
|
+
}
|
|
2794
|
+
__destroy_into_raw() {
|
|
2795
|
+
const ptr = this.__wbg_ptr;
|
|
2796
|
+
this.__wbg_ptr = 0;
|
|
2797
|
+
SkinJsonFinalization.unregister(this);
|
|
2798
|
+
return ptr;
|
|
2799
|
+
}
|
|
2800
|
+
free() {
|
|
2801
|
+
const ptr = this.__destroy_into_raw();
|
|
2802
|
+
wasm.__wbg_skinjson_free(ptr, 0);
|
|
2803
|
+
}
|
|
2804
|
+
/**
|
|
2805
|
+
* @returns {Info}
|
|
2806
|
+
*/
|
|
2807
|
+
get info() {
|
|
2808
|
+
const ret = wasm.__wbg_get_skinjson_info(this.__wbg_ptr);
|
|
2809
|
+
return Info.__wrap(ret);
|
|
2810
|
+
}
|
|
2811
|
+
/**
|
|
2812
|
+
* @param {Info} arg0
|
|
2813
|
+
*/
|
|
2814
|
+
set info(arg0) {
|
|
2815
|
+
_assertClass(arg0, Info);
|
|
2816
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
2817
|
+
wasm.__wbg_set_skinjson_info(this.__wbg_ptr, ptr0);
|
|
2818
|
+
}
|
|
2819
|
+
/**
|
|
2820
|
+
* @returns {FluXisKeymode[]}
|
|
2821
|
+
*/
|
|
2822
|
+
get keymodes() {
|
|
2823
|
+
const ret = wasm.__wbg_get_skinjson_keymodes(this.__wbg_ptr);
|
|
2824
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
2825
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2826
|
+
return v1;
|
|
2827
|
+
}
|
|
2828
|
+
/**
|
|
2829
|
+
* @param {FluXisKeymode[]} arg0
|
|
2830
|
+
*/
|
|
2831
|
+
set keymodes(arg0) {
|
|
2832
|
+
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc);
|
|
2833
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2834
|
+
wasm.__wbg_set_skinjson_keymodes(this.__wbg_ptr, ptr0, len0);
|
|
2835
|
+
}
|
|
2836
|
+
constructor() {
|
|
2837
|
+
const ret = wasm.skinjson_new();
|
|
2838
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2839
|
+
SkinJsonFinalization.register(this, this.__wbg_ptr, this);
|
|
2840
|
+
return this;
|
|
2841
|
+
}
|
|
2842
|
+
/**
|
|
2843
|
+
* @param {string} json_str
|
|
2844
|
+
* @returns {SkinJson}
|
|
2845
|
+
*/
|
|
2846
|
+
static fromStr(json_str) {
|
|
2847
|
+
const ptr0 = passStringToWasm0(json_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2848
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2849
|
+
const ret = wasm.skinjson_fromStr(ptr0, len0);
|
|
2850
|
+
if (ret[2]) {
|
|
2851
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2852
|
+
}
|
|
2853
|
+
return SkinJson.__wrap(ret[0]);
|
|
2854
|
+
}
|
|
2855
|
+
/**
|
|
2856
|
+
* @returns {string}
|
|
2857
|
+
*/
|
|
2858
|
+
toString() {
|
|
2859
|
+
let deferred1_0;
|
|
2860
|
+
let deferred1_1;
|
|
2861
|
+
try {
|
|
2862
|
+
const ret = wasm.skinjson_toString(this.__wbg_ptr);
|
|
2863
|
+
deferred1_0 = ret[0];
|
|
2864
|
+
deferred1_1 = ret[1];
|
|
2865
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2866
|
+
} finally {
|
|
2867
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
if (Symbol.dispose) SkinJson.prototype[Symbol.dispose] = SkinJson.prototype.free;
|
|
2872
|
+
exports.SkinJson = SkinJson;
|
|
2873
|
+
|
|
2874
|
+
class Texture {
|
|
2875
|
+
static __wrap(ptr) {
|
|
2876
|
+
ptr = ptr >>> 0;
|
|
2877
|
+
const obj = Object.create(Texture.prototype);
|
|
2878
|
+
obj.__wbg_ptr = ptr;
|
|
2879
|
+
TextureFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2880
|
+
return obj;
|
|
2881
|
+
}
|
|
2882
|
+
__destroy_into_raw() {
|
|
2883
|
+
const ptr = this.__wbg_ptr;
|
|
2884
|
+
this.__wbg_ptr = 0;
|
|
2885
|
+
TextureFinalization.unregister(this);
|
|
2886
|
+
return ptr;
|
|
2887
|
+
}
|
|
2888
|
+
free() {
|
|
2889
|
+
const ptr = this.__destroy_into_raw();
|
|
2890
|
+
wasm.__wbg_texture_free(ptr, 0);
|
|
2891
|
+
}
|
|
2892
|
+
/**
|
|
2893
|
+
* @returns {string}
|
|
2894
|
+
*/
|
|
2895
|
+
get path() {
|
|
2896
|
+
let deferred1_0;
|
|
2897
|
+
let deferred1_1;
|
|
2898
|
+
try {
|
|
2899
|
+
const ret = wasm.__wbg_get_texture_path(this.__wbg_ptr);
|
|
2900
|
+
deferred1_0 = ret[0];
|
|
2901
|
+
deferred1_1 = ret[1];
|
|
2902
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2903
|
+
} finally {
|
|
2904
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2905
|
+
}
|
|
2906
|
+
}
|
|
2907
|
+
/**
|
|
2908
|
+
* @param {string} arg0
|
|
2909
|
+
*/
|
|
2910
|
+
set path(arg0) {
|
|
2911
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2912
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2913
|
+
wasm.__wbg_set_texture_path(this.__wbg_ptr, ptr0, len0);
|
|
2914
|
+
}
|
|
2915
|
+
/**
|
|
2916
|
+
* @param {string} path
|
|
2917
|
+
*/
|
|
2918
|
+
constructor(path) {
|
|
2919
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2920
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2921
|
+
const ret = wasm.texture_new(ptr0, len0);
|
|
2922
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2923
|
+
TextureFinalization.register(this, this.__wbg_ptr, this);
|
|
2924
|
+
return this;
|
|
2925
|
+
}
|
|
2926
|
+
/**
|
|
2927
|
+
* @param {string} path
|
|
2928
|
+
* @returns {Texture}
|
|
2929
|
+
*/
|
|
2930
|
+
static fromBlank(path) {
|
|
2931
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2932
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2933
|
+
const ret = wasm.texture_fromBlank(ptr0, len0);
|
|
2934
|
+
return Texture.__wrap(ret);
|
|
2935
|
+
}
|
|
2936
|
+
/**
|
|
2937
|
+
* @param {string} path
|
|
2938
|
+
* @param {ArrayBuffer} buffer
|
|
2939
|
+
* @returns {Texture}
|
|
2940
|
+
*/
|
|
2941
|
+
static fromArrayBuffer(path, buffer) {
|
|
2942
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2943
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2944
|
+
const ret = wasm.texture_fromArrayBuffer(ptr0, len0, buffer);
|
|
2945
|
+
if (ret[2]) {
|
|
2946
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2947
|
+
}
|
|
2948
|
+
return Texture.__wrap(ret[0]);
|
|
2949
|
+
}
|
|
2950
|
+
/**
|
|
2951
|
+
* @param {string} path
|
|
2952
|
+
* @param {ArrayBuffer} buffer
|
|
2953
|
+
* @returns {Texture}
|
|
2954
|
+
*/
|
|
2955
|
+
static fromArrayBufferUnloaded(path, buffer) {
|
|
2956
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2957
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2958
|
+
const ret = wasm.texture_fromArrayBufferUnloaded(ptr0, len0, buffer);
|
|
2959
|
+
if (ret[2]) {
|
|
2960
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2961
|
+
}
|
|
2962
|
+
return Texture.__wrap(ret[0]);
|
|
2963
|
+
}
|
|
2964
|
+
/**
|
|
2965
|
+
* @param {string} path
|
|
2966
|
+
* @param {Uint8Array} array
|
|
2967
|
+
* @returns {Texture}
|
|
2968
|
+
*/
|
|
2969
|
+
static fromUint8Array(path, array) {
|
|
2970
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2971
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2972
|
+
const ret = wasm.texture_fromUint8Array(ptr0, len0, array);
|
|
2973
|
+
if (ret[2]) {
|
|
2974
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2975
|
+
}
|
|
2976
|
+
return Texture.__wrap(ret[0]);
|
|
2977
|
+
}
|
|
2978
|
+
/**
|
|
2979
|
+
* @param {string} path
|
|
2980
|
+
* @param {Uint8Array} array
|
|
2981
|
+
* @returns {Texture}
|
|
2982
|
+
*/
|
|
2983
|
+
static fromUint8ArrayUnloaded(path, array) {
|
|
2984
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2985
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2986
|
+
const ret = wasm.texture_fromUint8ArrayUnloaded(ptr0, len0, array);
|
|
2987
|
+
if (ret[2]) {
|
|
2988
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2989
|
+
}
|
|
2990
|
+
return Texture.__wrap(ret[0]);
|
|
2991
|
+
}
|
|
2992
|
+
/**
|
|
2993
|
+
* @returns {string}
|
|
2994
|
+
*/
|
|
2995
|
+
getPath() {
|
|
2996
|
+
let deferred1_0;
|
|
2997
|
+
let deferred1_1;
|
|
2998
|
+
try {
|
|
2999
|
+
const ret = wasm.texture_getPath(this.__wbg_ptr);
|
|
3000
|
+
deferred1_0 = ret[0];
|
|
3001
|
+
deferred1_1 = ret[1];
|
|
3002
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3003
|
+
} finally {
|
|
3004
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
/**
|
|
3008
|
+
* @returns {boolean}
|
|
3009
|
+
*/
|
|
3010
|
+
hasData() {
|
|
3011
|
+
const ret = wasm.texture_hasData(this.__wbg_ptr);
|
|
3012
|
+
return ret !== 0;
|
|
3013
|
+
}
|
|
3014
|
+
/**
|
|
3015
|
+
* @returns {boolean}
|
|
3016
|
+
*/
|
|
3017
|
+
isLoaded() {
|
|
3018
|
+
const ret = wasm.texture_isLoaded(this.__wbg_ptr);
|
|
3019
|
+
return ret !== 0;
|
|
3020
|
+
}
|
|
3021
|
+
/**
|
|
3022
|
+
* @returns {boolean}
|
|
3023
|
+
*/
|
|
3024
|
+
isUnloaded() {
|
|
3025
|
+
const ret = wasm.texture_isUnloaded(this.__wbg_ptr);
|
|
3026
|
+
return ret !== 0;
|
|
3027
|
+
}
|
|
3028
|
+
/**
|
|
3029
|
+
* @returns {boolean}
|
|
3030
|
+
*/
|
|
3031
|
+
isEmpty() {
|
|
3032
|
+
const ret = wasm.texture_isEmpty(this.__wbg_ptr);
|
|
3033
|
+
return ret !== 0;
|
|
3034
|
+
}
|
|
3035
|
+
load() {
|
|
3036
|
+
const ret = wasm.texture_load(this.__wbg_ptr);
|
|
3037
|
+
if (ret[1]) {
|
|
3038
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
unload() {
|
|
3042
|
+
const ret = wasm.texture_unload(this.__wbg_ptr);
|
|
3043
|
+
if (ret[1]) {
|
|
3044
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
if (Symbol.dispose) Texture.prototype[Symbol.dispose] = Texture.prototype.free;
|
|
3049
|
+
exports.Texture = Texture;
|
|
3050
|
+
|
|
3051
|
+
class TextureStore {
|
|
3052
|
+
static __wrap(ptr) {
|
|
3053
|
+
ptr = ptr >>> 0;
|
|
3054
|
+
const obj = Object.create(TextureStore.prototype);
|
|
3055
|
+
obj.__wbg_ptr = ptr;
|
|
3056
|
+
TextureStoreFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3057
|
+
return obj;
|
|
3058
|
+
}
|
|
3059
|
+
__destroy_into_raw() {
|
|
3060
|
+
const ptr = this.__wbg_ptr;
|
|
3061
|
+
this.__wbg_ptr = 0;
|
|
3062
|
+
TextureStoreFinalization.unregister(this);
|
|
3063
|
+
return ptr;
|
|
3064
|
+
}
|
|
3065
|
+
free() {
|
|
3066
|
+
const ptr = this.__destroy_into_raw();
|
|
3067
|
+
wasm.__wbg_texturestore_free(ptr, 0);
|
|
3068
|
+
}
|
|
3069
|
+
constructor() {
|
|
3070
|
+
const ret = wasm.texturestore_new();
|
|
3071
|
+
this.__wbg_ptr = ret >>> 0;
|
|
3072
|
+
TextureStoreFinalization.register(this, this.__wbg_ptr, this);
|
|
3073
|
+
return this;
|
|
3074
|
+
}
|
|
3075
|
+
/**
|
|
3076
|
+
* @param {Texture} texture
|
|
3077
|
+
*/
|
|
3078
|
+
insertTexture(texture) {
|
|
3079
|
+
_assertClass(texture, Texture);
|
|
3080
|
+
var ptr0 = texture.__destroy_into_raw();
|
|
3081
|
+
wasm.texturestore_insertTexture(this.__wbg_ptr, ptr0);
|
|
3082
|
+
}
|
|
3083
|
+
/**
|
|
3084
|
+
* @param {string} new_path
|
|
3085
|
+
* @param {Texture} texture
|
|
3086
|
+
* @returns {string}
|
|
3087
|
+
*/
|
|
3088
|
+
makeUnique(new_path, texture) {
|
|
3089
|
+
let deferred3_0;
|
|
3090
|
+
let deferred3_1;
|
|
3091
|
+
try {
|
|
3092
|
+
const ptr0 = passStringToWasm0(new_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3093
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3094
|
+
_assertClass(texture, Texture);
|
|
3095
|
+
var ptr1 = texture.__destroy_into_raw();
|
|
3096
|
+
const ret = wasm.texturestore_makeUnique(this.__wbg_ptr, ptr0, len0, ptr1);
|
|
3097
|
+
deferred3_0 = ret[0];
|
|
3098
|
+
deferred3_1 = ret[1];
|
|
3099
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3100
|
+
} finally {
|
|
3101
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
/**
|
|
3105
|
+
* @param {string} path
|
|
3106
|
+
* @param {ArrayBuffer} buffer
|
|
3107
|
+
*/
|
|
3108
|
+
loadFromArrayBuffer(path, buffer) {
|
|
3109
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3110
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3111
|
+
const ret = wasm.texturestore_loadFromArrayBuffer(this.__wbg_ptr, ptr0, len0, buffer);
|
|
3112
|
+
if (ret[1]) {
|
|
3113
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3114
|
+
}
|
|
3115
|
+
}
|
|
3116
|
+
/**
|
|
3117
|
+
* @param {string} path
|
|
3118
|
+
* @param {Uint8Array} array
|
|
3119
|
+
*/
|
|
3120
|
+
loadFromUint8Array(path, array) {
|
|
3121
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3122
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3123
|
+
const ret = wasm.texturestore_loadFromUint8Array(this.__wbg_ptr, ptr0, len0, array);
|
|
3124
|
+
if (ret[1]) {
|
|
3125
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3126
|
+
}
|
|
3127
|
+
}
|
|
3128
|
+
/**
|
|
3129
|
+
* @returns {boolean}
|
|
3130
|
+
*/
|
|
3131
|
+
allLoaded() {
|
|
3132
|
+
const ret = wasm.texturestore_allLoaded(this.__wbg_ptr);
|
|
3133
|
+
return ret !== 0;
|
|
3134
|
+
}
|
|
3135
|
+
/**
|
|
3136
|
+
* @returns {number}
|
|
3137
|
+
*/
|
|
3138
|
+
loadedCount() {
|
|
3139
|
+
const ret = wasm.texturestore_loadedCount(this.__wbg_ptr);
|
|
3140
|
+
return ret >>> 0;
|
|
3141
|
+
}
|
|
3142
|
+
/**
|
|
3143
|
+
* @returns {Array<any>}
|
|
3144
|
+
*/
|
|
3145
|
+
unloadedPaths() {
|
|
3146
|
+
const ret = wasm.texturestore_unloadedPaths(this.__wbg_ptr);
|
|
3147
|
+
return ret;
|
|
3148
|
+
}
|
|
3149
|
+
/**
|
|
3150
|
+
* @param {string} path
|
|
3151
|
+
* @returns {boolean}
|
|
3152
|
+
*/
|
|
3153
|
+
hasTexture(path) {
|
|
3154
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3155
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3156
|
+
const ret = wasm.texturestore_contains(this.__wbg_ptr, ptr0, len0);
|
|
3157
|
+
return ret !== 0;
|
|
3158
|
+
}
|
|
3159
|
+
/**
|
|
3160
|
+
* @param {string} path
|
|
3161
|
+
* @returns {string | undefined}
|
|
3162
|
+
*/
|
|
3163
|
+
getTexturePath(path) {
|
|
3164
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3165
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3166
|
+
const ret = wasm.texturestore_getTexturePath(this.__wbg_ptr, ptr0, len0);
|
|
3167
|
+
let v2;
|
|
3168
|
+
if (ret[0] !== 0) {
|
|
3169
|
+
v2 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
3170
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
3171
|
+
}
|
|
3172
|
+
return v2;
|
|
3173
|
+
}
|
|
3174
|
+
/**
|
|
3175
|
+
* @param {string} path
|
|
3176
|
+
* @returns {boolean}
|
|
3177
|
+
*/
|
|
3178
|
+
textureHasData(path) {
|
|
3179
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3180
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3181
|
+
const ret = wasm.texturestore_textureHasData(this.__wbg_ptr, ptr0, len0);
|
|
3182
|
+
return ret !== 0;
|
|
3183
|
+
}
|
|
3184
|
+
/**
|
|
3185
|
+
* @param {string} path
|
|
3186
|
+
* @returns {boolean}
|
|
3187
|
+
*/
|
|
3188
|
+
contains(path) {
|
|
3189
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3190
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3191
|
+
const ret = wasm.texturestore_contains(this.__wbg_ptr, ptr0, len0);
|
|
3192
|
+
return ret !== 0;
|
|
3193
|
+
}
|
|
3194
|
+
/**
|
|
3195
|
+
* @param {string} path
|
|
3196
|
+
* @returns {boolean}
|
|
3197
|
+
*/
|
|
3198
|
+
remove(path) {
|
|
3199
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3200
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3201
|
+
const ret = wasm.texturestore_remove(this.__wbg_ptr, ptr0, len0);
|
|
3202
|
+
return ret !== 0;
|
|
3203
|
+
}
|
|
3204
|
+
/**
|
|
3205
|
+
* @returns {number}
|
|
3206
|
+
*/
|
|
3207
|
+
getLength() {
|
|
3208
|
+
const ret = wasm.texturestore_getLength(this.__wbg_ptr);
|
|
3209
|
+
return ret >>> 0;
|
|
3210
|
+
}
|
|
3211
|
+
/**
|
|
3212
|
+
* @returns {boolean}
|
|
3213
|
+
*/
|
|
3214
|
+
isEmpty() {
|
|
3215
|
+
const ret = wasm.texturestore_isEmpty(this.__wbg_ptr);
|
|
3216
|
+
return ret !== 0;
|
|
3217
|
+
}
|
|
3218
|
+
/**
|
|
3219
|
+
* @returns {Array<any>}
|
|
3220
|
+
*/
|
|
3221
|
+
getPaths() {
|
|
3222
|
+
const ret = wasm.texturestore_getPaths(this.__wbg_ptr);
|
|
3223
|
+
return ret;
|
|
3224
|
+
}
|
|
3225
|
+
clear() {
|
|
3226
|
+
wasm.texturestore_clear(this.__wbg_ptr);
|
|
3227
|
+
}
|
|
3228
|
+
/**
|
|
3229
|
+
* @param {string} original_path
|
|
3230
|
+
* @param {string} new_path
|
|
3231
|
+
* @returns {string | undefined}
|
|
3232
|
+
*/
|
|
3233
|
+
copy(original_path, new_path) {
|
|
3234
|
+
const ptr0 = passStringToWasm0(original_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3235
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3236
|
+
const ptr1 = passStringToWasm0(new_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3237
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3238
|
+
const ret = wasm.texturestore_copy(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
3239
|
+
let v3;
|
|
3240
|
+
if (ret[0] !== 0) {
|
|
3241
|
+
v3 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
3242
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
3243
|
+
}
|
|
3244
|
+
return v3;
|
|
3245
|
+
}
|
|
3246
|
+
/**
|
|
3247
|
+
* @param {string} original_path
|
|
3248
|
+
* @param {string} new_base_path
|
|
3249
|
+
* @returns {string | undefined}
|
|
3250
|
+
*/
|
|
3251
|
+
makeUniqueCopy(original_path, new_base_path) {
|
|
3252
|
+
const ptr0 = passStringToWasm0(original_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3253
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3254
|
+
const ptr1 = passStringToWasm0(new_base_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3255
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3256
|
+
const ret = wasm.texturestore_makeUniqueCopy(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
3257
|
+
let v3;
|
|
3258
|
+
if (ret[0] !== 0) {
|
|
3259
|
+
v3 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
3260
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
3261
|
+
}
|
|
3262
|
+
return v3;
|
|
3263
|
+
}
|
|
3264
|
+
}
|
|
3265
|
+
if (Symbol.dispose) TextureStore.prototype[Symbol.dispose] = TextureStore.prototype.free;
|
|
3266
|
+
exports.TextureStore = TextureStore;
|
|
3267
|
+
|
|
3268
|
+
/**
|
|
3269
|
+
* @param {string} path
|
|
3270
|
+
* @returns {BinaryStore}
|
|
3271
|
+
*/
|
|
3272
|
+
function allSamplesFromDir(path) {
|
|
3273
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3274
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3275
|
+
const ret = wasm.allSamplesFromDir(ptr0, len0);
|
|
3276
|
+
if (ret[2]) {
|
|
3277
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3278
|
+
}
|
|
3279
|
+
return BinaryStore.__wrap(ret[0]);
|
|
3280
|
+
}
|
|
3281
|
+
exports.allSamplesFromDir = allSamplesFromDir;
|
|
3282
|
+
|
|
3283
|
+
/**
|
|
3284
|
+
* @param {string} path
|
|
3285
|
+
* @returns {TextureStore}
|
|
3286
|
+
*/
|
|
3287
|
+
function allTexturesFromDir(path) {
|
|
3288
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3289
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3290
|
+
const ret = wasm.allTexturesFromDir(ptr0, len0);
|
|
3291
|
+
if (ret[2]) {
|
|
3292
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3293
|
+
}
|
|
3294
|
+
return TextureStore.__wrap(ret[0]);
|
|
3295
|
+
}
|
|
3296
|
+
exports.allTexturesFromDir = allTexturesFromDir;
|
|
3297
|
+
|
|
3298
|
+
/**
|
|
3299
|
+
* @param {string} path
|
|
3300
|
+
* @returns {FluXisSkin}
|
|
3301
|
+
*/
|
|
3302
|
+
function fluXisSkinFromDir(path) {
|
|
3303
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3304
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3305
|
+
const ret = wasm.fluXisSkinFromDir(ptr0, len0);
|
|
3306
|
+
if (ret[2]) {
|
|
3307
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3308
|
+
}
|
|
3309
|
+
return FluXisSkin.__wrap(ret[0]);
|
|
3310
|
+
}
|
|
3311
|
+
exports.fluXisSkinFromDir = fluXisSkinFromDir;
|
|
3312
|
+
|
|
3313
|
+
/**
|
|
3314
|
+
* @param {FluXisSkin} skin
|
|
3315
|
+
* @param {string} path
|
|
3316
|
+
*/
|
|
3317
|
+
function fluXisSkinToDir(skin, path) {
|
|
3318
|
+
_assertClass(skin, FluXisSkin);
|
|
3319
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3320
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3321
|
+
const ret = wasm.fluXisSkinToDir(skin.__wbg_ptr, ptr0, len0);
|
|
3322
|
+
if (ret[1]) {
|
|
3323
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3324
|
+
}
|
|
3325
|
+
}
|
|
3326
|
+
exports.fluXisSkinToDir = fluXisSkinToDir;
|
|
3327
|
+
|
|
3328
|
+
/**
|
|
3329
|
+
* @param {string} path
|
|
3330
|
+
* @returns {string}
|
|
3331
|
+
*/
|
|
3332
|
+
function iniStrFromDir(path) {
|
|
3333
|
+
let deferred2_0;
|
|
3334
|
+
let deferred2_1;
|
|
3335
|
+
try {
|
|
3336
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3337
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3338
|
+
const ret = wasm.iniStrFromDir(ptr0, len0);
|
|
3339
|
+
deferred2_0 = ret[0];
|
|
3340
|
+
deferred2_1 = ret[1];
|
|
3341
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3342
|
+
} finally {
|
|
3343
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3346
|
+
exports.iniStrFromDir = iniStrFromDir;
|
|
3347
|
+
|
|
3348
|
+
/**
|
|
3349
|
+
* @param {OsuSkinIni} skin_ini
|
|
3350
|
+
* @param {string} path
|
|
3351
|
+
*/
|
|
3352
|
+
function iniToDir(skin_ini, path) {
|
|
3353
|
+
_assertClass(skin_ini, OsuSkinIni);
|
|
3354
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3355
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3356
|
+
const ret = wasm.iniToDir(skin_ini.__wbg_ptr, ptr0, len0);
|
|
3357
|
+
if (ret[1]) {
|
|
3358
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3359
|
+
}
|
|
3360
|
+
}
|
|
3361
|
+
exports.iniToDir = iniToDir;
|
|
3362
|
+
|
|
3363
|
+
/**
|
|
3364
|
+
* @param {string} path
|
|
3365
|
+
* @returns {string}
|
|
3366
|
+
*/
|
|
3367
|
+
function jsonStrFromDir(path) {
|
|
3368
|
+
let deferred2_0;
|
|
3369
|
+
let deferred2_1;
|
|
3370
|
+
try {
|
|
3371
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3372
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3373
|
+
const ret = wasm.jsonStrFromDir(ptr0, len0);
|
|
3374
|
+
deferred2_0 = ret[0];
|
|
3375
|
+
deferred2_1 = ret[1];
|
|
3376
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3377
|
+
} finally {
|
|
3378
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
3379
|
+
}
|
|
3380
|
+
}
|
|
3381
|
+
exports.jsonStrFromDir = jsonStrFromDir;
|
|
3382
|
+
|
|
3383
|
+
/**
|
|
3384
|
+
* @param {SkinJson} skin_json
|
|
3385
|
+
* @param {string} path
|
|
3386
|
+
*/
|
|
3387
|
+
function jsonToDir(skin_json, path) {
|
|
3388
|
+
_assertClass(skin_json, SkinJson);
|
|
3389
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3390
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3391
|
+
const ret = wasm.jsonToDir(skin_json.__wbg_ptr, ptr0, len0);
|
|
3392
|
+
if (ret[1]) {
|
|
3393
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3394
|
+
}
|
|
3395
|
+
}
|
|
3396
|
+
exports.jsonToDir = jsonToDir;
|
|
3397
|
+
|
|
3398
|
+
/**
|
|
3399
|
+
* @param {FluXisLayout} layout_json
|
|
3400
|
+
* @param {string} path
|
|
3401
|
+
*/
|
|
3402
|
+
function layoutToDir(layout_json, path) {
|
|
3403
|
+
_assertClass(layout_json, FluXisLayout);
|
|
3404
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3405
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3406
|
+
const ret = wasm.layoutToDir(layout_json.__wbg_ptr, ptr0, len0);
|
|
3407
|
+
if (ret[1]) {
|
|
3408
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3409
|
+
}
|
|
3410
|
+
}
|
|
3411
|
+
exports.layoutToDir = layoutToDir;
|
|
3412
|
+
|
|
3413
|
+
/**
|
|
3414
|
+
* @param {string} path
|
|
3415
|
+
* @returns {OsuSkin}
|
|
3416
|
+
*/
|
|
3417
|
+
function osuSkinFromDir(path) {
|
|
3418
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3419
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3420
|
+
const ret = wasm.osuSkinFromDir(ptr0, len0);
|
|
3421
|
+
if (ret[2]) {
|
|
3422
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3423
|
+
}
|
|
3424
|
+
return OsuSkin.__wrap(ret[0]);
|
|
3425
|
+
}
|
|
3426
|
+
exports.osuSkinFromDir = osuSkinFromDir;
|
|
3427
|
+
|
|
3428
|
+
/**
|
|
3429
|
+
* @param {OsuSkin} skin
|
|
3430
|
+
* @param {string} path
|
|
3431
|
+
*/
|
|
3432
|
+
function osuSkinToDir(skin, path) {
|
|
3433
|
+
_assertClass(skin, OsuSkin);
|
|
3434
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3435
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3436
|
+
const ret = wasm.osuSkinToDir(skin.__wbg_ptr, ptr0, len0);
|
|
3437
|
+
if (ret[1]) {
|
|
3438
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
3441
|
+
exports.osuSkinToDir = osuSkinToDir;
|
|
3442
|
+
|
|
3443
|
+
/**
|
|
3444
|
+
* @param {string} path
|
|
3445
|
+
* @param {Array<any>} relative_sample_paths
|
|
3446
|
+
* @returns {BinaryStore}
|
|
3447
|
+
*/
|
|
3448
|
+
function samplesFromDir(path, relative_sample_paths) {
|
|
3449
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3450
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3451
|
+
const ret = wasm.samplesFromDir(ptr0, len0, relative_sample_paths);
|
|
3452
|
+
if (ret[2]) {
|
|
3453
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3454
|
+
}
|
|
3455
|
+
return BinaryStore.__wrap(ret[0]);
|
|
3456
|
+
}
|
|
3457
|
+
exports.samplesFromDir = samplesFromDir;
|
|
3458
|
+
|
|
3459
|
+
/**
|
|
3460
|
+
* @param {BinaryStore} samples
|
|
3461
|
+
* @param {string} path
|
|
3462
|
+
*/
|
|
3463
|
+
function samplesToDir(samples, path) {
|
|
3464
|
+
_assertClass(samples, BinaryStore);
|
|
3465
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3466
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3467
|
+
const ret = wasm.samplesToDir(samples.__wbg_ptr, ptr0, len0);
|
|
3468
|
+
if (ret[1]) {
|
|
3469
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3470
|
+
}
|
|
3471
|
+
}
|
|
3472
|
+
exports.samplesToDir = samplesToDir;
|
|
3473
|
+
|
|
3474
|
+
/**
|
|
3475
|
+
* @param {string} path
|
|
3476
|
+
* @param {Array<any>} relative_texture_paths
|
|
3477
|
+
* @returns {TextureStore}
|
|
3478
|
+
*/
|
|
3479
|
+
function texturesFromDir(path, relative_texture_paths) {
|
|
3480
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3481
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3482
|
+
const ret = wasm.texturesFromDir(ptr0, len0, relative_texture_paths);
|
|
3483
|
+
if (ret[2]) {
|
|
3484
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3485
|
+
}
|
|
3486
|
+
return TextureStore.__wrap(ret[0]);
|
|
3487
|
+
}
|
|
3488
|
+
exports.texturesFromDir = texturesFromDir;
|
|
3489
|
+
|
|
3490
|
+
/**
|
|
3491
|
+
* @param {TextureStore} textures
|
|
3492
|
+
* @param {string} path
|
|
3493
|
+
*/
|
|
3494
|
+
function texturesToDir(textures, path) {
|
|
3495
|
+
_assertClass(textures, TextureStore);
|
|
3496
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3497
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3498
|
+
const ret = wasm.texturesToDir(textures.__wbg_ptr, ptr0, len0);
|
|
3499
|
+
if (ret[1]) {
|
|
3500
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
3501
|
+
}
|
|
3502
|
+
}
|
|
3503
|
+
exports.texturesToDir = texturesToDir;
|
|
3504
|
+
|
|
3505
|
+
exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
3506
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
3507
|
+
return ret;
|
|
3508
|
+
};
|
|
3509
|
+
|
|
3510
|
+
exports.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
3511
|
+
const ret = debugString(arg1);
|
|
3512
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3513
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3514
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3515
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3516
|
+
};
|
|
3517
|
+
|
|
3518
|
+
exports.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
3519
|
+
const obj = arg1;
|
|
3520
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
3521
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3522
|
+
var len1 = WASM_VECTOR_LEN;
|
|
3523
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3524
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3525
|
+
};
|
|
3526
|
+
|
|
3527
|
+
exports.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
3528
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
3529
|
+
};
|
|
3530
|
+
|
|
3531
|
+
exports.__wbg_createDirAll_3fa17ad31f0b67eb = function() { return handleError(function (arg0, arg1) {
|
|
3532
|
+
createDirAll(getStringFromWasm0(arg0, arg1));
|
|
3533
|
+
}, arguments) };
|
|
3534
|
+
|
|
3535
|
+
exports.__wbg_fluxiskeymode_new = function(arg0) {
|
|
3536
|
+
const ret = FluXisKeymode.__wrap(arg0);
|
|
3537
|
+
return ret;
|
|
3538
|
+
};
|
|
3539
|
+
|
|
3540
|
+
exports.__wbg_fluxiskeymode_unwrap = function(arg0) {
|
|
3541
|
+
const ret = FluXisKeymode.__unwrap(arg0);
|
|
3542
|
+
return ret;
|
|
3543
|
+
};
|
|
3544
|
+
|
|
3545
|
+
exports.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
3546
|
+
const ret = arg0[arg1 >>> 0];
|
|
3547
|
+
return ret;
|
|
3548
|
+
};
|
|
3549
|
+
|
|
3550
|
+
exports.__wbg_isDirectory_dc61910333390a70 = function() { return handleError(function (arg0, arg1) {
|
|
3551
|
+
const ret = isDirectory(getStringFromWasm0(arg0, arg1));
|
|
3552
|
+
return ret;
|
|
3553
|
+
}, arguments) };
|
|
3554
|
+
|
|
3555
|
+
exports.__wbg_joinPath_f4200fd11e4bf2e2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
3556
|
+
const ret = joinPath(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
3557
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3558
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3559
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3560
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3561
|
+
}, arguments) };
|
|
3562
|
+
|
|
3563
|
+
exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
3564
|
+
const ret = arg0.length;
|
|
3565
|
+
return ret;
|
|
3566
|
+
};
|
|
3567
|
+
|
|
3568
|
+
exports.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
3569
|
+
const ret = arg0.length;
|
|
3570
|
+
return ret;
|
|
3571
|
+
};
|
|
3572
|
+
|
|
3573
|
+
exports.__wbg_new_25f239778d6112b9 = function() {
|
|
3574
|
+
const ret = new Array();
|
|
3575
|
+
return ret;
|
|
3576
|
+
};
|
|
3577
|
+
|
|
3578
|
+
exports.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
3579
|
+
const ret = new Uint8Array(arg0);
|
|
3580
|
+
return ret;
|
|
3581
|
+
};
|
|
3582
|
+
|
|
3583
|
+
exports.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
|
|
3584
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
3585
|
+
return ret;
|
|
3586
|
+
};
|
|
3587
|
+
|
|
3588
|
+
exports.__wbg_osukeymode_new = function(arg0) {
|
|
3589
|
+
const ret = OsuKeymode.__wrap(arg0);
|
|
3590
|
+
return ret;
|
|
3591
|
+
};
|
|
3592
|
+
|
|
3593
|
+
exports.__wbg_osukeymode_unwrap = function(arg0) {
|
|
3594
|
+
const ret = OsuKeymode.__unwrap(arg0);
|
|
3595
|
+
return ret;
|
|
3596
|
+
};
|
|
3597
|
+
|
|
3598
|
+
exports.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
3599
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
3600
|
+
};
|
|
3601
|
+
|
|
3602
|
+
exports.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
|
|
3603
|
+
const ret = arg0.push(arg1);
|
|
3604
|
+
return ret;
|
|
3605
|
+
};
|
|
3606
|
+
|
|
3607
|
+
exports.__wbg_readDir_f8fed9ecdf7010ee = function() { return handleError(function (arg0, arg1) {
|
|
3608
|
+
const ret = readDir(getStringFromWasm0(arg0, arg1));
|
|
3609
|
+
return ret;
|
|
3610
|
+
}, arguments) };
|
|
3611
|
+
|
|
3612
|
+
exports.__wbg_readFileBytes_933ada0a0e8a93d5 = function() { return handleError(function (arg0, arg1) {
|
|
3613
|
+
const ret = readFileBytes(getStringFromWasm0(arg0, arg1));
|
|
3614
|
+
return ret;
|
|
3615
|
+
}, arguments) };
|
|
3616
|
+
|
|
3617
|
+
exports.__wbg_readFileString_a187767bff213fb1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3618
|
+
const ret = readFileString(getStringFromWasm0(arg1, arg2));
|
|
3619
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3620
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3621
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3622
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3623
|
+
}, arguments) };
|
|
3624
|
+
|
|
3625
|
+
exports.__wbg_writeFile_ec1852732052ad12 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3626
|
+
writeFile(getStringFromWasm0(arg0, arg1), getArrayU8FromWasm0(arg2, arg3));
|
|
3627
|
+
}, arguments) };
|
|
3628
|
+
|
|
3629
|
+
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
3630
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
3631
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
3632
|
+
return ret;
|
|
3633
|
+
};
|
|
3634
|
+
|
|
3635
|
+
exports.__wbindgen_init_externref_table = function() {
|
|
3636
|
+
const table = wasm.__wbindgen_externrefs;
|
|
3637
|
+
const offset = table.grow(4);
|
|
3638
|
+
table.set(0, undefined);
|
|
3639
|
+
table.set(offset + 0, undefined);
|
|
3640
|
+
table.set(offset + 1, null);
|
|
3641
|
+
table.set(offset + 2, true);
|
|
3642
|
+
table.set(offset + 3, false);
|
|
3643
|
+
};
|
|
3644
|
+
|
|
3645
|
+
const wasmPath = `${__dirname}/rgskin_bg.wasm`;
|
|
3646
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
3647
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
3648
|
+
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
3649
|
+
|
|
3650
|
+
wasm.__wbindgen_start();
|