@configura/internal 2.0.0-alpha.20 → 2.0.0-alpha.21
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 +201 -201
- package/README.md +64 -64
- package/package.json +2 -2
- package/web_core_internal.d.ts +170 -170
- package/web_core_internal.js +2 -2
- package/web_core_internal_bg.js +353 -353
- package/web_core_internal_bg.wasm.d.ts +36 -36
package/web_core_internal_bg.js
CHANGED
|
@@ -1,353 +1,353 @@
|
|
|
1
|
-
import * as wasm from './web_core_internal_bg.wasm';
|
|
2
|
-
|
|
3
|
-
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
4
|
-
|
|
5
|
-
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
6
|
-
|
|
7
|
-
cachedTextDecoder.decode();
|
|
8
|
-
|
|
9
|
-
let cachegetUint8Memory0 = null;
|
|
10
|
-
function getUint8Memory0() {
|
|
11
|
-
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
|
|
12
|
-
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
13
|
-
}
|
|
14
|
-
return cachegetUint8Memory0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function getStringFromWasm0(ptr, len) {
|
|
18
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const heap = new Array(32).fill(undefined);
|
|
22
|
-
|
|
23
|
-
heap.push(undefined, null, true, false);
|
|
24
|
-
|
|
25
|
-
function getObject(idx) { return heap[idx]; }
|
|
26
|
-
|
|
27
|
-
let heap_next = heap.length;
|
|
28
|
-
|
|
29
|
-
function dropObject(idx) {
|
|
30
|
-
if (idx < 36) return;
|
|
31
|
-
heap[idx] = heap_next;
|
|
32
|
-
heap_next = idx;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function takeObject(idx) {
|
|
36
|
-
const ret = getObject(idx);
|
|
37
|
-
dropObject(idx);
|
|
38
|
-
return ret;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
let WASM_VECTOR_LEN = 0;
|
|
42
|
-
|
|
43
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
44
|
-
const ptr = malloc(arg.length * 1);
|
|
45
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
46
|
-
WASM_VECTOR_LEN = arg.length;
|
|
47
|
-
return ptr;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* @param {Uint8Array} data
|
|
51
|
-
* @returns {CTMFile}
|
|
52
|
-
*/
|
|
53
|
-
export function create_ctm_file(data) {
|
|
54
|
-
var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
55
|
-
var len0 = WASM_VECTOR_LEN;
|
|
56
|
-
var ret = wasm.create_ctm_file(ptr0, len0);
|
|
57
|
-
return CTMFile.__wrap(ret);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
let cachegetInt32Memory0 = null;
|
|
61
|
-
function getInt32Memory0() {
|
|
62
|
-
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
|
63
|
-
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
64
|
-
}
|
|
65
|
-
return cachegetInt32Memory0;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* @param {Uint8Array} data
|
|
69
|
-
* @returns {Stream}
|
|
70
|
-
*/
|
|
71
|
-
export function create_stream(data) {
|
|
72
|
-
var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
73
|
-
var len0 = WASM_VECTOR_LEN;
|
|
74
|
-
var ret = wasm.create_stream(ptr0, len0);
|
|
75
|
-
return Stream.__wrap(ret);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function addHeapObject(obj) {
|
|
79
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
80
|
-
const idx = heap_next;
|
|
81
|
-
heap_next = heap[idx];
|
|
82
|
-
|
|
83
|
-
heap[idx] = obj;
|
|
84
|
-
return idx;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
*/
|
|
88
|
-
export const DexMagic = Object.freeze({ BeginHeader:32227,BeginInternalizedXRef:56047,BeginObj:32163,BeginObjs:43439,BeginPositions:56771,BeginStrs:29047,BeginThumbnail:44519,EndHeader:38379,EndInternalizedXRef:56120,EndObj:42363,EndObjs:52675,EndOdd:41415,EndPositions:60867,EndStrs:35279,EndThumbnail:55950,EndXRef:48531,OtherInternalizedXRefFile:59823, });
|
|
89
|
-
/**
|
|
90
|
-
*/
|
|
91
|
-
export const CompressMagic = Object.freeze({ OldIncremental:4294962841,UncompressedMonolithic:4294959328,UncompressedIncremental:4294959342,LZFMonolithic:4294959346,LZFIncremental:4294959347,LZMA2Incremental:4294959610,LZMA2Monolithic:4294959611,LZMA3Incremental:4294959613,LZMA3Monolithic:4294959614, });
|
|
92
|
-
/**
|
|
93
|
-
*/
|
|
94
|
-
export class CTMFile {
|
|
95
|
-
|
|
96
|
-
static __wrap(ptr) {
|
|
97
|
-
const obj = Object.create(CTMFile.prototype);
|
|
98
|
-
obj.ptr = ptr;
|
|
99
|
-
|
|
100
|
-
return obj;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
free() {
|
|
104
|
-
const ptr = this.ptr;
|
|
105
|
-
this.ptr = 0;
|
|
106
|
-
|
|
107
|
-
wasm.__wbg_ctmfile_free(ptr);
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* @returns {number}
|
|
111
|
-
*/
|
|
112
|
-
vertices_ptr() {
|
|
113
|
-
var ret = wasm.ctmfile_vertices_ptr(this.ptr);
|
|
114
|
-
return ret;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* @returns {number}
|
|
118
|
-
*/
|
|
119
|
-
vertices_len() {
|
|
120
|
-
var ret = wasm.ctmfile_vertices_len(this.ptr);
|
|
121
|
-
return ret >>> 0;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* @returns {number}
|
|
125
|
-
*/
|
|
126
|
-
normals_ptr() {
|
|
127
|
-
var ret = wasm.ctmfile_normals_ptr(this.ptr);
|
|
128
|
-
return ret;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* If the CTMFile does not contain
|
|
132
|
-
* normals, this length is zero.
|
|
133
|
-
* @returns {number}
|
|
134
|
-
*/
|
|
135
|
-
normals_len() {
|
|
136
|
-
var ret = wasm.ctmfile_normals_len(this.ptr);
|
|
137
|
-
return ret >>> 0;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* For performance reasons (to store temp values) this array is declared
|
|
141
|
-
* as i32 rather than the expected u32. It only contains positive integers
|
|
142
|
-
* though, so it is safe to use it as u32 on the JS side if needed.
|
|
143
|
-
* @returns {number}
|
|
144
|
-
*/
|
|
145
|
-
indices_ptr() {
|
|
146
|
-
var ret = wasm.ctmfile_indices_ptr(this.ptr);
|
|
147
|
-
return ret;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* @returns {number}
|
|
151
|
-
*/
|
|
152
|
-
indices_len() {
|
|
153
|
-
var ret = wasm.ctmfile_indices_len(this.ptr);
|
|
154
|
-
return ret >>> 0;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* @returns {number}
|
|
158
|
-
*/
|
|
159
|
-
uvs_ptr() {
|
|
160
|
-
var ret = wasm.ctmfile_uvs_ptr(this.ptr);
|
|
161
|
-
return ret;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* @returns {number}
|
|
165
|
-
*/
|
|
166
|
-
uvs_len() {
|
|
167
|
-
var ret = wasm.ctmfile_uvs_len(this.ptr);
|
|
168
|
-
return ret >>> 0;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* @returns {number}
|
|
172
|
-
*/
|
|
173
|
-
colors_ptr() {
|
|
174
|
-
var ret = wasm.ctmfile_colors_ptr(this.ptr);
|
|
175
|
-
return ret;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* @returns {number}
|
|
179
|
-
*/
|
|
180
|
-
colors_len() {
|
|
181
|
-
var ret = wasm.ctmfile_colors_len(this.ptr);
|
|
182
|
-
return ret >>> 0;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
*/
|
|
187
|
-
export class Stream {
|
|
188
|
-
|
|
189
|
-
static __wrap(ptr) {
|
|
190
|
-
const obj = Object.create(Stream.prototype);
|
|
191
|
-
obj.ptr = ptr;
|
|
192
|
-
|
|
193
|
-
return obj;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
free() {
|
|
197
|
-
const ptr = this.ptr;
|
|
198
|
-
this.ptr = 0;
|
|
199
|
-
|
|
200
|
-
wasm.__wbg_stream_free(ptr);
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* @returns {number}
|
|
204
|
-
*/
|
|
205
|
-
get_position() {
|
|
206
|
-
var ret = wasm.stream_get_position(this.ptr);
|
|
207
|
-
return ret >>> 0;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* @param {number} pos
|
|
211
|
-
*/
|
|
212
|
-
set_position(pos) {
|
|
213
|
-
wasm.stream_set_position(this.ptr, pos);
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* @returns {number}
|
|
217
|
-
*/
|
|
218
|
-
get_ptr() {
|
|
219
|
-
var ret = wasm.stream_get_ptr(this.ptr);
|
|
220
|
-
return ret;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* @returns {number}
|
|
224
|
-
*/
|
|
225
|
-
read_i8() {
|
|
226
|
-
var ret = wasm.stream_read_i8(this.ptr);
|
|
227
|
-
return ret;
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* @returns {number}
|
|
231
|
-
*/
|
|
232
|
-
read_i16() {
|
|
233
|
-
var ret = wasm.stream_read_i16(this.ptr);
|
|
234
|
-
return ret;
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* @returns {number}
|
|
238
|
-
*/
|
|
239
|
-
read_i32() {
|
|
240
|
-
var ret = wasm.stream_read_i32(this.ptr);
|
|
241
|
-
return ret;
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* @returns {number}
|
|
245
|
-
*/
|
|
246
|
-
read_u8() {
|
|
247
|
-
var ret = wasm.stream_read_u8(this.ptr);
|
|
248
|
-
return ret;
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* @returns {number}
|
|
252
|
-
*/
|
|
253
|
-
read_u16() {
|
|
254
|
-
var ret = wasm.stream_read_u16(this.ptr);
|
|
255
|
-
return ret;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* @returns {number}
|
|
259
|
-
*/
|
|
260
|
-
read_u32() {
|
|
261
|
-
var ret = wasm.stream_read_i32(this.ptr);
|
|
262
|
-
return ret >>> 0;
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* @returns {number}
|
|
266
|
-
*/
|
|
267
|
-
read_f32() {
|
|
268
|
-
var ret = wasm.stream_read_f32(this.ptr);
|
|
269
|
-
return ret;
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* @returns {number}
|
|
273
|
-
*/
|
|
274
|
-
read_f64() {
|
|
275
|
-
var ret = wasm.stream_read_f64(this.ptr);
|
|
276
|
-
return ret;
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* @returns {number}
|
|
280
|
-
*/
|
|
281
|
-
unpack30() {
|
|
282
|
-
var ret = wasm.stream_unpack30(this.ptr);
|
|
283
|
-
return ret >>> 0;
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* @returns {boolean}
|
|
287
|
-
*/
|
|
288
|
-
read_bool() {
|
|
289
|
-
var ret = wasm.stream_read_bool(this.ptr);
|
|
290
|
-
return ret !== 0;
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* @returns {string}
|
|
294
|
-
*/
|
|
295
|
-
read_str() {
|
|
296
|
-
try {
|
|
297
|
-
wasm.stream_read_str(8, this.ptr);
|
|
298
|
-
var r0 = getInt32Memory0()[8 / 4 + 0];
|
|
299
|
-
var r1 = getInt32Memory0()[8 / 4 + 1];
|
|
300
|
-
return getStringFromWasm0(r0, r1);
|
|
301
|
-
} finally {
|
|
302
|
-
wasm.__wbindgen_free(r0, r1);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* @returns {string}
|
|
307
|
-
*/
|
|
308
|
-
read_nano_str() {
|
|
309
|
-
try {
|
|
310
|
-
wasm.stream_read_nano_str(8, this.ptr);
|
|
311
|
-
var r0 = getInt32Memory0()[8 / 4 + 0];
|
|
312
|
-
var r1 = getInt32Memory0()[8 / 4 + 1];
|
|
313
|
-
return getStringFromWasm0(r0, r1);
|
|
314
|
-
} finally {
|
|
315
|
-
wasm.__wbindgen_free(r0, r1);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* @returns {string}
|
|
320
|
-
*/
|
|
321
|
-
read_cstr() {
|
|
322
|
-
try {
|
|
323
|
-
wasm.stream_read_cstr(8, this.ptr);
|
|
324
|
-
var r0 = getInt32Memory0()[8 / 4 + 0];
|
|
325
|
-
var r1 = getInt32Memory0()[8 / 4 + 1];
|
|
326
|
-
return getStringFromWasm0(r0, r1);
|
|
327
|
-
} finally {
|
|
328
|
-
wasm.__wbindgen_free(r0, r1);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* @param {number} want
|
|
333
|
-
* @returns {boolean}
|
|
334
|
-
*/
|
|
335
|
-
match_dex_magic(want) {
|
|
336
|
-
var ret = wasm.stream_match_dex_magic(this.ptr, want);
|
|
337
|
-
return ret !== 0;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export const __wbg_new_03a50b2d1045a68f = function(arg0, arg1) {
|
|
342
|
-
var ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
343
|
-
return addHeapObject(ret);
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
export const __wbindgen_throw = function(arg0, arg1) {
|
|
347
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
export const __wbindgen_rethrow = function(arg0) {
|
|
351
|
-
throw takeObject(arg0);
|
|
352
|
-
};
|
|
353
|
-
|
|
1
|
+
import * as wasm from './web_core_internal_bg.wasm';
|
|
2
|
+
|
|
3
|
+
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
4
|
+
|
|
5
|
+
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
6
|
+
|
|
7
|
+
cachedTextDecoder.decode();
|
|
8
|
+
|
|
9
|
+
let cachegetUint8Memory0 = null;
|
|
10
|
+
function getUint8Memory0() {
|
|
11
|
+
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
|
|
12
|
+
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
13
|
+
}
|
|
14
|
+
return cachegetUint8Memory0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function getStringFromWasm0(ptr, len) {
|
|
18
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const heap = new Array(32).fill(undefined);
|
|
22
|
+
|
|
23
|
+
heap.push(undefined, null, true, false);
|
|
24
|
+
|
|
25
|
+
function getObject(idx) { return heap[idx]; }
|
|
26
|
+
|
|
27
|
+
let heap_next = heap.length;
|
|
28
|
+
|
|
29
|
+
function dropObject(idx) {
|
|
30
|
+
if (idx < 36) return;
|
|
31
|
+
heap[idx] = heap_next;
|
|
32
|
+
heap_next = idx;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function takeObject(idx) {
|
|
36
|
+
const ret = getObject(idx);
|
|
37
|
+
dropObject(idx);
|
|
38
|
+
return ret;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
let WASM_VECTOR_LEN = 0;
|
|
42
|
+
|
|
43
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
44
|
+
const ptr = malloc(arg.length * 1);
|
|
45
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
46
|
+
WASM_VECTOR_LEN = arg.length;
|
|
47
|
+
return ptr;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @param {Uint8Array} data
|
|
51
|
+
* @returns {CTMFile}
|
|
52
|
+
*/
|
|
53
|
+
export function create_ctm_file(data) {
|
|
54
|
+
var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
55
|
+
var len0 = WASM_VECTOR_LEN;
|
|
56
|
+
var ret = wasm.create_ctm_file(ptr0, len0);
|
|
57
|
+
return CTMFile.__wrap(ret);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let cachegetInt32Memory0 = null;
|
|
61
|
+
function getInt32Memory0() {
|
|
62
|
+
if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) {
|
|
63
|
+
cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
64
|
+
}
|
|
65
|
+
return cachegetInt32Memory0;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @param {Uint8Array} data
|
|
69
|
+
* @returns {Stream}
|
|
70
|
+
*/
|
|
71
|
+
export function create_stream(data) {
|
|
72
|
+
var ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
73
|
+
var len0 = WASM_VECTOR_LEN;
|
|
74
|
+
var ret = wasm.create_stream(ptr0, len0);
|
|
75
|
+
return Stream.__wrap(ret);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function addHeapObject(obj) {
|
|
79
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
80
|
+
const idx = heap_next;
|
|
81
|
+
heap_next = heap[idx];
|
|
82
|
+
|
|
83
|
+
heap[idx] = obj;
|
|
84
|
+
return idx;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
*/
|
|
88
|
+
export const DexMagic = Object.freeze({ BeginHeader:32227,BeginInternalizedXRef:56047,BeginObj:32163,BeginObjs:43439,BeginPositions:56771,BeginStrs:29047,BeginThumbnail:44519,EndHeader:38379,EndInternalizedXRef:56120,EndObj:42363,EndObjs:52675,EndOdd:41415,EndPositions:60867,EndStrs:35279,EndThumbnail:55950,EndXRef:48531,OtherInternalizedXRefFile:59823, });
|
|
89
|
+
/**
|
|
90
|
+
*/
|
|
91
|
+
export const CompressMagic = Object.freeze({ OldIncremental:4294962841,UncompressedMonolithic:4294959328,UncompressedIncremental:4294959342,LZFMonolithic:4294959346,LZFIncremental:4294959347,LZMA2Incremental:4294959610,LZMA2Monolithic:4294959611,LZMA3Incremental:4294959613,LZMA3Monolithic:4294959614, });
|
|
92
|
+
/**
|
|
93
|
+
*/
|
|
94
|
+
export class CTMFile {
|
|
95
|
+
|
|
96
|
+
static __wrap(ptr) {
|
|
97
|
+
const obj = Object.create(CTMFile.prototype);
|
|
98
|
+
obj.ptr = ptr;
|
|
99
|
+
|
|
100
|
+
return obj;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
free() {
|
|
104
|
+
const ptr = this.ptr;
|
|
105
|
+
this.ptr = 0;
|
|
106
|
+
|
|
107
|
+
wasm.__wbg_ctmfile_free(ptr);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @returns {number}
|
|
111
|
+
*/
|
|
112
|
+
vertices_ptr() {
|
|
113
|
+
var ret = wasm.ctmfile_vertices_ptr(this.ptr);
|
|
114
|
+
return ret;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @returns {number}
|
|
118
|
+
*/
|
|
119
|
+
vertices_len() {
|
|
120
|
+
var ret = wasm.ctmfile_vertices_len(this.ptr);
|
|
121
|
+
return ret >>> 0;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @returns {number}
|
|
125
|
+
*/
|
|
126
|
+
normals_ptr() {
|
|
127
|
+
var ret = wasm.ctmfile_normals_ptr(this.ptr);
|
|
128
|
+
return ret;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* If the CTMFile does not contain
|
|
132
|
+
* normals, this length is zero.
|
|
133
|
+
* @returns {number}
|
|
134
|
+
*/
|
|
135
|
+
normals_len() {
|
|
136
|
+
var ret = wasm.ctmfile_normals_len(this.ptr);
|
|
137
|
+
return ret >>> 0;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* For performance reasons (to store temp values) this array is declared
|
|
141
|
+
* as i32 rather than the expected u32. It only contains positive integers
|
|
142
|
+
* though, so it is safe to use it as u32 on the JS side if needed.
|
|
143
|
+
* @returns {number}
|
|
144
|
+
*/
|
|
145
|
+
indices_ptr() {
|
|
146
|
+
var ret = wasm.ctmfile_indices_ptr(this.ptr);
|
|
147
|
+
return ret;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @returns {number}
|
|
151
|
+
*/
|
|
152
|
+
indices_len() {
|
|
153
|
+
var ret = wasm.ctmfile_indices_len(this.ptr);
|
|
154
|
+
return ret >>> 0;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* @returns {number}
|
|
158
|
+
*/
|
|
159
|
+
uvs_ptr() {
|
|
160
|
+
var ret = wasm.ctmfile_uvs_ptr(this.ptr);
|
|
161
|
+
return ret;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* @returns {number}
|
|
165
|
+
*/
|
|
166
|
+
uvs_len() {
|
|
167
|
+
var ret = wasm.ctmfile_uvs_len(this.ptr);
|
|
168
|
+
return ret >>> 0;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* @returns {number}
|
|
172
|
+
*/
|
|
173
|
+
colors_ptr() {
|
|
174
|
+
var ret = wasm.ctmfile_colors_ptr(this.ptr);
|
|
175
|
+
return ret;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* @returns {number}
|
|
179
|
+
*/
|
|
180
|
+
colors_len() {
|
|
181
|
+
var ret = wasm.ctmfile_colors_len(this.ptr);
|
|
182
|
+
return ret >>> 0;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
*/
|
|
187
|
+
export class Stream {
|
|
188
|
+
|
|
189
|
+
static __wrap(ptr) {
|
|
190
|
+
const obj = Object.create(Stream.prototype);
|
|
191
|
+
obj.ptr = ptr;
|
|
192
|
+
|
|
193
|
+
return obj;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
free() {
|
|
197
|
+
const ptr = this.ptr;
|
|
198
|
+
this.ptr = 0;
|
|
199
|
+
|
|
200
|
+
wasm.__wbg_stream_free(ptr);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* @returns {number}
|
|
204
|
+
*/
|
|
205
|
+
get_position() {
|
|
206
|
+
var ret = wasm.stream_get_position(this.ptr);
|
|
207
|
+
return ret >>> 0;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* @param {number} pos
|
|
211
|
+
*/
|
|
212
|
+
set_position(pos) {
|
|
213
|
+
wasm.stream_set_position(this.ptr, pos);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* @returns {number}
|
|
217
|
+
*/
|
|
218
|
+
get_ptr() {
|
|
219
|
+
var ret = wasm.stream_get_ptr(this.ptr);
|
|
220
|
+
return ret;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* @returns {number}
|
|
224
|
+
*/
|
|
225
|
+
read_i8() {
|
|
226
|
+
var ret = wasm.stream_read_i8(this.ptr);
|
|
227
|
+
return ret;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* @returns {number}
|
|
231
|
+
*/
|
|
232
|
+
read_i16() {
|
|
233
|
+
var ret = wasm.stream_read_i16(this.ptr);
|
|
234
|
+
return ret;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* @returns {number}
|
|
238
|
+
*/
|
|
239
|
+
read_i32() {
|
|
240
|
+
var ret = wasm.stream_read_i32(this.ptr);
|
|
241
|
+
return ret;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @returns {number}
|
|
245
|
+
*/
|
|
246
|
+
read_u8() {
|
|
247
|
+
var ret = wasm.stream_read_u8(this.ptr);
|
|
248
|
+
return ret;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* @returns {number}
|
|
252
|
+
*/
|
|
253
|
+
read_u16() {
|
|
254
|
+
var ret = wasm.stream_read_u16(this.ptr);
|
|
255
|
+
return ret;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* @returns {number}
|
|
259
|
+
*/
|
|
260
|
+
read_u32() {
|
|
261
|
+
var ret = wasm.stream_read_i32(this.ptr);
|
|
262
|
+
return ret >>> 0;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* @returns {number}
|
|
266
|
+
*/
|
|
267
|
+
read_f32() {
|
|
268
|
+
var ret = wasm.stream_read_f32(this.ptr);
|
|
269
|
+
return ret;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @returns {number}
|
|
273
|
+
*/
|
|
274
|
+
read_f64() {
|
|
275
|
+
var ret = wasm.stream_read_f64(this.ptr);
|
|
276
|
+
return ret;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* @returns {number}
|
|
280
|
+
*/
|
|
281
|
+
unpack30() {
|
|
282
|
+
var ret = wasm.stream_unpack30(this.ptr);
|
|
283
|
+
return ret >>> 0;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* @returns {boolean}
|
|
287
|
+
*/
|
|
288
|
+
read_bool() {
|
|
289
|
+
var ret = wasm.stream_read_bool(this.ptr);
|
|
290
|
+
return ret !== 0;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* @returns {string}
|
|
294
|
+
*/
|
|
295
|
+
read_str() {
|
|
296
|
+
try {
|
|
297
|
+
wasm.stream_read_str(8, this.ptr);
|
|
298
|
+
var r0 = getInt32Memory0()[8 / 4 + 0];
|
|
299
|
+
var r1 = getInt32Memory0()[8 / 4 + 1];
|
|
300
|
+
return getStringFromWasm0(r0, r1);
|
|
301
|
+
} finally {
|
|
302
|
+
wasm.__wbindgen_free(r0, r1);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* @returns {string}
|
|
307
|
+
*/
|
|
308
|
+
read_nano_str() {
|
|
309
|
+
try {
|
|
310
|
+
wasm.stream_read_nano_str(8, this.ptr);
|
|
311
|
+
var r0 = getInt32Memory0()[8 / 4 + 0];
|
|
312
|
+
var r1 = getInt32Memory0()[8 / 4 + 1];
|
|
313
|
+
return getStringFromWasm0(r0, r1);
|
|
314
|
+
} finally {
|
|
315
|
+
wasm.__wbindgen_free(r0, r1);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* @returns {string}
|
|
320
|
+
*/
|
|
321
|
+
read_cstr() {
|
|
322
|
+
try {
|
|
323
|
+
wasm.stream_read_cstr(8, this.ptr);
|
|
324
|
+
var r0 = getInt32Memory0()[8 / 4 + 0];
|
|
325
|
+
var r1 = getInt32Memory0()[8 / 4 + 1];
|
|
326
|
+
return getStringFromWasm0(r0, r1);
|
|
327
|
+
} finally {
|
|
328
|
+
wasm.__wbindgen_free(r0, r1);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* @param {number} want
|
|
333
|
+
* @returns {boolean}
|
|
334
|
+
*/
|
|
335
|
+
match_dex_magic(want) {
|
|
336
|
+
var ret = wasm.stream_match_dex_magic(this.ptr, want);
|
|
337
|
+
return ret !== 0;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export const __wbg_new_03a50b2d1045a68f = function(arg0, arg1) {
|
|
342
|
+
var ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
343
|
+
return addHeapObject(ret);
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
export const __wbindgen_throw = function(arg0, arg1) {
|
|
347
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
export const __wbindgen_rethrow = function(arg0) {
|
|
351
|
+
throw takeObject(arg0);
|
|
352
|
+
};
|
|
353
|
+
|