@ifc-lite/wasm 1.14.3 → 1.14.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pkg/ifc-lite.d.ts +50 -28
- package/pkg/ifc-lite.js +340 -196
- package/pkg/ifc-lite_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -17,6 +17,14 @@ export class GeoReferenceJs {
|
|
|
17
17
|
* Get 4x4 transformation matrix (column-major for WebGL)
|
|
18
18
|
*/
|
|
19
19
|
toMatrix(): Float64Array;
|
|
20
|
+
/**
|
|
21
|
+
* Get CRS name
|
|
22
|
+
*/
|
|
23
|
+
readonly crsName: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Get rotation angle in radians
|
|
26
|
+
*/
|
|
27
|
+
readonly rotation: number;
|
|
20
28
|
/**
|
|
21
29
|
* Eastings (X offset)
|
|
22
30
|
*/
|
|
@@ -41,14 +49,6 @@ export class GeoReferenceJs {
|
|
|
41
49
|
* Scale factor
|
|
42
50
|
*/
|
|
43
51
|
scale: number;
|
|
44
|
-
/**
|
|
45
|
-
* Get CRS name
|
|
46
|
-
*/
|
|
47
|
-
readonly crsName: string | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Get rotation angle in radians
|
|
50
|
-
*/
|
|
51
|
-
readonly rotation: number;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export class GpuGeometry {
|
|
@@ -405,6 +405,14 @@ export class IfcAPI {
|
|
|
405
405
|
* Debug: Test processing a single wall
|
|
406
406
|
*/
|
|
407
407
|
debugProcessFirstWall(content: string): string;
|
|
408
|
+
/**
|
|
409
|
+
* Get WASM memory for zero-copy access
|
|
410
|
+
*/
|
|
411
|
+
getMemory(): any;
|
|
412
|
+
/**
|
|
413
|
+
* Create and initialize the IFC API
|
|
414
|
+
*/
|
|
415
|
+
constructor();
|
|
408
416
|
/**
|
|
409
417
|
* Extract georeferencing information from IFC content
|
|
410
418
|
* Returns null if no georeferencing is present
|
|
@@ -481,14 +489,6 @@ export class IfcAPI {
|
|
|
481
489
|
* ```
|
|
482
490
|
*/
|
|
483
491
|
parse(content: string): Promise<any>;
|
|
484
|
-
/**
|
|
485
|
-
* Get WASM memory for zero-copy access
|
|
486
|
-
*/
|
|
487
|
-
getMemory(): any;
|
|
488
|
-
/**
|
|
489
|
-
* Create and initialize the IFC API
|
|
490
|
-
*/
|
|
491
|
-
constructor();
|
|
492
492
|
/**
|
|
493
493
|
* Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
|
|
494
494
|
* These are 2D curves used for architectural drawings instead of sectioning 3D geometry
|
|
@@ -830,6 +830,8 @@ export function get_memory(): any;
|
|
|
830
830
|
*/
|
|
831
831
|
export function init(): void;
|
|
832
832
|
|
|
833
|
+
export function initThreadPool(num_threads: number): Promise<any>;
|
|
834
|
+
|
|
833
835
|
/**
|
|
834
836
|
* Get the version of IFC-Lite.
|
|
835
837
|
*
|
|
@@ -845,10 +847,20 @@ export function init(): void;
|
|
|
845
847
|
*/
|
|
846
848
|
export function version(): string;
|
|
847
849
|
|
|
850
|
+
export class wbg_rayon_PoolBuilder {
|
|
851
|
+
private constructor();
|
|
852
|
+
free(): void;
|
|
853
|
+
[Symbol.dispose](): void;
|
|
854
|
+
numThreads(): number;
|
|
855
|
+
build(): void;
|
|
856
|
+
receiver(): number;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export function wbg_rayon_start_worker(receiver: number): void;
|
|
860
|
+
|
|
848
861
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
849
862
|
|
|
850
863
|
export interface InitOutput {
|
|
851
|
-
readonly memory: WebAssembly.Memory;
|
|
852
864
|
readonly __wbg_georeferencejs_free: (a: number, b: number) => void;
|
|
853
865
|
readonly __wbg_get_georeferencejs_eastings: (a: number) => number;
|
|
854
866
|
readonly __wbg_get_georeferencejs_northings: (a: number) => number;
|
|
@@ -1010,7 +1022,6 @@ export interface InitOutput {
|
|
|
1010
1022
|
readonly zerocopymesh_positions_len: (a: number) => number;
|
|
1011
1023
|
readonly zerocopymesh_positions_ptr: (a: number) => number;
|
|
1012
1024
|
readonly zerocopymesh_vertex_count: (a: number) => number;
|
|
1013
|
-
readonly init: () => void;
|
|
1014
1025
|
readonly gpuinstancedgeometryref_indicesLen: (a: number) => number;
|
|
1015
1026
|
readonly gpuinstancedgeometryref_instanceCount: (a: number) => number;
|
|
1016
1027
|
readonly gpuinstancedgeometryref_instanceDataLen: (a: number) => number;
|
|
@@ -1019,6 +1030,7 @@ export interface InitOutput {
|
|
|
1019
1030
|
readonly instancedmeshcollection_totalGeometries: (a: number) => number;
|
|
1020
1031
|
readonly meshcollectionwithrtc_length: (a: number) => number;
|
|
1021
1032
|
readonly zerocopymesh_indices_len: (a: number) => number;
|
|
1033
|
+
readonly init: () => void;
|
|
1022
1034
|
readonly __wbg_set_rtcoffsetjs_x: (a: number, b: number) => void;
|
|
1023
1035
|
readonly __wbg_set_rtcoffsetjs_y: (a: number, b: number) => void;
|
|
1024
1036
|
readonly __wbg_set_rtcoffsetjs_z: (a: number, b: number) => void;
|
|
@@ -1042,17 +1054,25 @@ export interface InitOutput {
|
|
|
1042
1054
|
readonly meshcollection_rtcOffsetX: (a: number) => number;
|
|
1043
1055
|
readonly symboliccircle_expressId: (a: number) => number;
|
|
1044
1056
|
readonly __wbg_gpuinstancedgeometryref_free: (a: number, b: number) => void;
|
|
1045
|
-
readonly
|
|
1046
|
-
readonly
|
|
1047
|
-
readonly
|
|
1048
|
-
readonly
|
|
1049
|
-
readonly
|
|
1057
|
+
readonly __wbg_wbg_rayon_poolbuilder_free: (a: number, b: number) => void;
|
|
1058
|
+
readonly initThreadPool: (a: number) => number;
|
|
1059
|
+
readonly wbg_rayon_poolbuilder_build: (a: number) => void;
|
|
1060
|
+
readonly wbg_rayon_poolbuilder_numThreads: (a: number) => number;
|
|
1061
|
+
readonly wbg_rayon_poolbuilder_receiver: (a: number) => number;
|
|
1062
|
+
readonly wbg_rayon_start_worker: (a: number) => void;
|
|
1063
|
+
readonly __wasm_bindgen_func_elem_959: (a: number, b: number, c: number) => void;
|
|
1064
|
+
readonly __wasm_bindgen_func_elem_958: (a: number, b: number) => void;
|
|
1065
|
+
readonly __wasm_bindgen_func_elem_498: (a: number, b: number) => void;
|
|
1066
|
+
readonly __wasm_bindgen_func_elem_497: (a: number, b: number) => void;
|
|
1067
|
+
readonly __wasm_bindgen_func_elem_1230: (a: number, b: number, c: number, d: number) => void;
|
|
1068
|
+
readonly memory: WebAssembly.Memory;
|
|
1050
1069
|
readonly __wbindgen_export: (a: number) => void;
|
|
1051
1070
|
readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
|
|
1052
1071
|
readonly __wbindgen_export3: (a: number, b: number) => number;
|
|
1053
1072
|
readonly __wbindgen_export4: (a: number, b: number, c: number, d: number) => number;
|
|
1054
1073
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
1055
|
-
readonly
|
|
1074
|
+
readonly __wbindgen_thread_destroy: (a?: number, b?: number, c?: number) => void;
|
|
1075
|
+
readonly __wbindgen_start: (a: number) => void;
|
|
1056
1076
|
}
|
|
1057
1077
|
|
|
1058
1078
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
@@ -1061,18 +1081,20 @@ export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
|
1061
1081
|
* Instantiates the given `module`, which can either be bytes or
|
|
1062
1082
|
* a precompiled `WebAssembly.Module`.
|
|
1063
1083
|
*
|
|
1064
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1084
|
+
* @param {{ module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1085
|
+
* @param {WebAssembly.Memory} memory - Deprecated.
|
|
1065
1086
|
*
|
|
1066
1087
|
* @returns {InitOutput}
|
|
1067
1088
|
*/
|
|
1068
|
-
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
1089
|
+
export function initSync(module: { module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number } | SyncInitInput, memory?: WebAssembly.Memory): InitOutput;
|
|
1069
1090
|
|
|
1070
1091
|
/**
|
|
1071
1092
|
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1072
1093
|
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1073
1094
|
*
|
|
1074
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput
|
|
1095
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput>, memory?: WebAssembly.Memory, thread_stack_size?: number }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1096
|
+
* @param {WebAssembly.Memory} memory - Deprecated.
|
|
1075
1097
|
*
|
|
1076
1098
|
* @returns {Promise<InitOutput>}
|
|
1077
1099
|
*/
|
|
1078
|
-
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput
|
|
1100
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput>, memory?: WebAssembly.Memory, thread_stack_size?: number } | InitInput | Promise<InitInput>, memory?: WebAssembly.Memory): Promise<InitOutput>;
|
package/pkg/ifc-lite.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { startWorkers } from './snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js';
|
|
2
|
+
|
|
1
3
|
let wasm;
|
|
2
4
|
|
|
3
5
|
function addHeapObject(obj) {
|
|
@@ -36,7 +38,7 @@ function getArrayU32FromWasm0(ptr, len) {
|
|
|
36
38
|
|
|
37
39
|
let cachedDataViewMemory0 = null;
|
|
38
40
|
function getDataViewMemory0() {
|
|
39
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer
|
|
41
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
40
42
|
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
41
43
|
}
|
|
42
44
|
return cachedDataViewMemory0;
|
|
@@ -44,7 +46,7 @@ function getDataViewMemory0() {
|
|
|
44
46
|
|
|
45
47
|
let cachedFloat32ArrayMemory0 = null;
|
|
46
48
|
function getFloat32ArrayMemory0() {
|
|
47
|
-
if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.
|
|
49
|
+
if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.buffer !== wasm.memory.buffer) {
|
|
48
50
|
cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
|
|
49
51
|
}
|
|
50
52
|
return cachedFloat32ArrayMemory0;
|
|
@@ -52,7 +54,7 @@ function getFloat32ArrayMemory0() {
|
|
|
52
54
|
|
|
53
55
|
let cachedFloat64ArrayMemory0 = null;
|
|
54
56
|
function getFloat64ArrayMemory0() {
|
|
55
|
-
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.
|
|
57
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.buffer !== wasm.memory.buffer) {
|
|
56
58
|
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
57
59
|
}
|
|
58
60
|
return cachedFloat64ArrayMemory0;
|
|
@@ -65,7 +67,7 @@ function getStringFromWasm0(ptr, len) {
|
|
|
65
67
|
|
|
66
68
|
let cachedUint32ArrayMemory0 = null;
|
|
67
69
|
function getUint32ArrayMemory0() {
|
|
68
|
-
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.
|
|
70
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.buffer !== wasm.memory.buffer) {
|
|
69
71
|
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
70
72
|
}
|
|
71
73
|
return cachedUint32ArrayMemory0;
|
|
@@ -73,7 +75,7 @@ function getUint32ArrayMemory0() {
|
|
|
73
75
|
|
|
74
76
|
let cachedUint8ArrayMemory0 = null;
|
|
75
77
|
function getUint8ArrayMemory0() {
|
|
76
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.
|
|
78
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
|
|
77
79
|
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
78
80
|
}
|
|
79
81
|
return cachedUint8ArrayMemory0;
|
|
@@ -176,8 +178,9 @@ function takeObject(idx) {
|
|
|
176
178
|
return ret;
|
|
177
179
|
}
|
|
178
180
|
|
|
179
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
180
|
-
cachedTextDecoder.decode();
|
|
181
|
+
let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : undefined);
|
|
182
|
+
if (cachedTextDecoder) cachedTextDecoder.decode();
|
|
183
|
+
|
|
181
184
|
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
182
185
|
let numBytesDecoded = 0;
|
|
183
186
|
function decodeText(ptr, len) {
|
|
@@ -187,12 +190,12 @@ function decodeText(ptr, len) {
|
|
|
187
190
|
cachedTextDecoder.decode();
|
|
188
191
|
numBytesDecoded = len;
|
|
189
192
|
}
|
|
190
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().
|
|
193
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
|
|
191
194
|
}
|
|
192
195
|
|
|
193
|
-
const cachedTextEncoder = new TextEncoder();
|
|
196
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined);
|
|
194
197
|
|
|
195
|
-
if (
|
|
198
|
+
if (cachedTextEncoder) {
|
|
196
199
|
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
197
200
|
const buf = cachedTextEncoder.encode(arg);
|
|
198
201
|
view.set(buf);
|
|
@@ -205,16 +208,16 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
205
208
|
|
|
206
209
|
let WASM_VECTOR_LEN = 0;
|
|
207
210
|
|
|
208
|
-
function
|
|
209
|
-
wasm.
|
|
211
|
+
function __wasm_bindgen_func_elem_959(arg0, arg1, arg2) {
|
|
212
|
+
wasm.__wasm_bindgen_func_elem_959(arg0, arg1, addHeapObject(arg2));
|
|
210
213
|
}
|
|
211
214
|
|
|
212
|
-
function
|
|
213
|
-
wasm.
|
|
215
|
+
function __wasm_bindgen_func_elem_498(arg0, arg1) {
|
|
216
|
+
wasm.__wasm_bindgen_func_elem_498(arg0, arg1);
|
|
214
217
|
}
|
|
215
218
|
|
|
216
|
-
function
|
|
217
|
-
wasm.
|
|
219
|
+
function __wasm_bindgen_func_elem_1230(arg0, arg1, arg2, arg3) {
|
|
220
|
+
wasm.__wasm_bindgen_func_elem_1230(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
218
221
|
}
|
|
219
222
|
|
|
220
223
|
const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -289,6 +292,10 @@ const ZeroCopyMeshFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
289
292
|
? { register: () => {}, unregister: () => {} }
|
|
290
293
|
: new FinalizationRegistry(ptr => wasm.__wbg_zerocopymesh_free(ptr >>> 0, 1));
|
|
291
294
|
|
|
295
|
+
const wbg_rayon_PoolBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
296
|
+
? { register: () => {}, unregister: () => {} }
|
|
297
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wbg_rayon_poolbuilder_free(ptr >>> 0, 1));
|
|
298
|
+
|
|
292
299
|
/**
|
|
293
300
|
* Georeferencing information exposed to JavaScript
|
|
294
301
|
*/
|
|
@@ -310,6 +317,91 @@ export class GeoReferenceJs {
|
|
|
310
317
|
const ptr = this.__destroy_into_raw();
|
|
311
318
|
wasm.__wbg_georeferencejs_free(ptr, 0);
|
|
312
319
|
}
|
|
320
|
+
/**
|
|
321
|
+
* Transform local coordinates to map coordinates
|
|
322
|
+
* @param {number} x
|
|
323
|
+
* @param {number} y
|
|
324
|
+
* @param {number} z
|
|
325
|
+
* @returns {Float64Array}
|
|
326
|
+
*/
|
|
327
|
+
localToMap(x, y, z) {
|
|
328
|
+
try {
|
|
329
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
330
|
+
wasm.georeferencejs_localToMap(retptr, this.__wbg_ptr, x, y, z);
|
|
331
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
332
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
333
|
+
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
334
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
335
|
+
return v1;
|
|
336
|
+
} finally {
|
|
337
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Transform map coordinates to local coordinates
|
|
342
|
+
* @param {number} e
|
|
343
|
+
* @param {number} n
|
|
344
|
+
* @param {number} h
|
|
345
|
+
* @returns {Float64Array}
|
|
346
|
+
*/
|
|
347
|
+
mapToLocal(e, n, h) {
|
|
348
|
+
try {
|
|
349
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
350
|
+
wasm.georeferencejs_mapToLocal(retptr, this.__wbg_ptr, e, n, h);
|
|
351
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
352
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
353
|
+
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
354
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
355
|
+
return v1;
|
|
356
|
+
} finally {
|
|
357
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Get CRS name
|
|
362
|
+
* @returns {string | undefined}
|
|
363
|
+
*/
|
|
364
|
+
get crsName() {
|
|
365
|
+
try {
|
|
366
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
367
|
+
wasm.georeferencejs_crsName(retptr, this.__wbg_ptr);
|
|
368
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
369
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
370
|
+
let v1;
|
|
371
|
+
if (r0 !== 0) {
|
|
372
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
373
|
+
wasm.__wbindgen_export2(r0, r1 * 1, 1);
|
|
374
|
+
}
|
|
375
|
+
return v1;
|
|
376
|
+
} finally {
|
|
377
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Get rotation angle in radians
|
|
382
|
+
* @returns {number}
|
|
383
|
+
*/
|
|
384
|
+
get rotation() {
|
|
385
|
+
const ret = wasm.georeferencejs_rotation(this.__wbg_ptr);
|
|
386
|
+
return ret;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Get 4x4 transformation matrix (column-major for WebGL)
|
|
390
|
+
* @returns {Float64Array}
|
|
391
|
+
*/
|
|
392
|
+
toMatrix() {
|
|
393
|
+
try {
|
|
394
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
395
|
+
wasm.georeferencejs_toMatrix(retptr, this.__wbg_ptr);
|
|
396
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
397
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
398
|
+
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
399
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
400
|
+
return v1;
|
|
401
|
+
} finally {
|
|
402
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
313
405
|
/**
|
|
314
406
|
* Eastings (X offset)
|
|
315
407
|
* @returns {number}
|
|
@@ -400,91 +492,6 @@ export class GeoReferenceJs {
|
|
|
400
492
|
set scale(arg0) {
|
|
401
493
|
wasm.__wbg_set_georeferencejs_scale(this.__wbg_ptr, arg0);
|
|
402
494
|
}
|
|
403
|
-
/**
|
|
404
|
-
* Transform local coordinates to map coordinates
|
|
405
|
-
* @param {number} x
|
|
406
|
-
* @param {number} y
|
|
407
|
-
* @param {number} z
|
|
408
|
-
* @returns {Float64Array}
|
|
409
|
-
*/
|
|
410
|
-
localToMap(x, y, z) {
|
|
411
|
-
try {
|
|
412
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
413
|
-
wasm.georeferencejs_localToMap(retptr, this.__wbg_ptr, x, y, z);
|
|
414
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
415
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
416
|
-
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
417
|
-
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
418
|
-
return v1;
|
|
419
|
-
} finally {
|
|
420
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* Transform map coordinates to local coordinates
|
|
425
|
-
* @param {number} e
|
|
426
|
-
* @param {number} n
|
|
427
|
-
* @param {number} h
|
|
428
|
-
* @returns {Float64Array}
|
|
429
|
-
*/
|
|
430
|
-
mapToLocal(e, n, h) {
|
|
431
|
-
try {
|
|
432
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
433
|
-
wasm.georeferencejs_mapToLocal(retptr, this.__wbg_ptr, e, n, h);
|
|
434
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
435
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
436
|
-
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
437
|
-
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
438
|
-
return v1;
|
|
439
|
-
} finally {
|
|
440
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* Get CRS name
|
|
445
|
-
* @returns {string | undefined}
|
|
446
|
-
*/
|
|
447
|
-
get crsName() {
|
|
448
|
-
try {
|
|
449
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
450
|
-
wasm.georeferencejs_crsName(retptr, this.__wbg_ptr);
|
|
451
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
452
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
453
|
-
let v1;
|
|
454
|
-
if (r0 !== 0) {
|
|
455
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
456
|
-
wasm.__wbindgen_export2(r0, r1 * 1, 1);
|
|
457
|
-
}
|
|
458
|
-
return v1;
|
|
459
|
-
} finally {
|
|
460
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* Get rotation angle in radians
|
|
465
|
-
* @returns {number}
|
|
466
|
-
*/
|
|
467
|
-
get rotation() {
|
|
468
|
-
const ret = wasm.georeferencejs_rotation(this.__wbg_ptr);
|
|
469
|
-
return ret;
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* Get 4x4 transformation matrix (column-major for WebGL)
|
|
473
|
-
* @returns {Float64Array}
|
|
474
|
-
*/
|
|
475
|
-
toMatrix() {
|
|
476
|
-
try {
|
|
477
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
478
|
-
wasm.georeferencejs_toMatrix(retptr, this.__wbg_ptr);
|
|
479
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
480
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
481
|
-
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
482
|
-
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
483
|
-
return v1;
|
|
484
|
-
} finally {
|
|
485
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
495
|
}
|
|
489
496
|
if (Symbol.dispose) GeoReferenceJs.prototype[Symbol.dispose] = GeoReferenceJs.prototype.free;
|
|
490
497
|
|
|
@@ -1380,6 +1387,51 @@ export class IfcAPI {
|
|
|
1380
1387
|
wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
|
|
1381
1388
|
}
|
|
1382
1389
|
}
|
|
1390
|
+
/**
|
|
1391
|
+
* Get WASM memory for zero-copy access
|
|
1392
|
+
* @returns {any}
|
|
1393
|
+
*/
|
|
1394
|
+
getMemory() {
|
|
1395
|
+
const ret = wasm.ifcapi_getMemory(this.__wbg_ptr);
|
|
1396
|
+
return takeObject(ret);
|
|
1397
|
+
}
|
|
1398
|
+
/**
|
|
1399
|
+
* Create and initialize the IFC API
|
|
1400
|
+
*/
|
|
1401
|
+
constructor() {
|
|
1402
|
+
const ret = wasm.ifcapi_new();
|
|
1403
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1404
|
+
IfcAPIFinalization.register(this, this.__wbg_ptr, this);
|
|
1405
|
+
return this;
|
|
1406
|
+
}
|
|
1407
|
+
/**
|
|
1408
|
+
* Get version string
|
|
1409
|
+
* @returns {string}
|
|
1410
|
+
*/
|
|
1411
|
+
get version() {
|
|
1412
|
+
let deferred1_0;
|
|
1413
|
+
let deferred1_1;
|
|
1414
|
+
try {
|
|
1415
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1416
|
+
wasm.ifcapi_version(retptr, this.__wbg_ptr);
|
|
1417
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1418
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1419
|
+
deferred1_0 = r0;
|
|
1420
|
+
deferred1_1 = r1;
|
|
1421
|
+
return getStringFromWasm0(r0, r1);
|
|
1422
|
+
} finally {
|
|
1423
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1424
|
+
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
/**
|
|
1428
|
+
* Check if API is initialized
|
|
1429
|
+
* @returns {boolean}
|
|
1430
|
+
*/
|
|
1431
|
+
get is_ready() {
|
|
1432
|
+
const ret = wasm.ifcapi_is_ready(this.__wbg_ptr);
|
|
1433
|
+
return ret !== 0;
|
|
1434
|
+
}
|
|
1383
1435
|
/**
|
|
1384
1436
|
* Extract georeferencing information from IFC content
|
|
1385
1437
|
* Returns null if no georeferencing is present
|
|
@@ -1506,51 +1558,6 @@ export class IfcAPI {
|
|
|
1506
1558
|
const ret = wasm.ifcapi_parse(this.__wbg_ptr, ptr0, len0);
|
|
1507
1559
|
return takeObject(ret);
|
|
1508
1560
|
}
|
|
1509
|
-
/**
|
|
1510
|
-
* Get WASM memory for zero-copy access
|
|
1511
|
-
* @returns {any}
|
|
1512
|
-
*/
|
|
1513
|
-
getMemory() {
|
|
1514
|
-
const ret = wasm.ifcapi_getMemory(this.__wbg_ptr);
|
|
1515
|
-
return takeObject(ret);
|
|
1516
|
-
}
|
|
1517
|
-
/**
|
|
1518
|
-
* Create and initialize the IFC API
|
|
1519
|
-
*/
|
|
1520
|
-
constructor() {
|
|
1521
|
-
const ret = wasm.ifcapi_new();
|
|
1522
|
-
this.__wbg_ptr = ret >>> 0;
|
|
1523
|
-
IfcAPIFinalization.register(this, this.__wbg_ptr, this);
|
|
1524
|
-
return this;
|
|
1525
|
-
}
|
|
1526
|
-
/**
|
|
1527
|
-
* Get version string
|
|
1528
|
-
* @returns {string}
|
|
1529
|
-
*/
|
|
1530
|
-
get version() {
|
|
1531
|
-
let deferred1_0;
|
|
1532
|
-
let deferred1_1;
|
|
1533
|
-
try {
|
|
1534
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1535
|
-
wasm.ifcapi_version(retptr, this.__wbg_ptr);
|
|
1536
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1537
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1538
|
-
deferred1_0 = r0;
|
|
1539
|
-
deferred1_1 = r1;
|
|
1540
|
-
return getStringFromWasm0(r0, r1);
|
|
1541
|
-
} finally {
|
|
1542
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1543
|
-
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
/**
|
|
1547
|
-
* Check if API is initialized
|
|
1548
|
-
* @returns {boolean}
|
|
1549
|
-
*/
|
|
1550
|
-
get is_ready() {
|
|
1551
|
-
const ret = wasm.ifcapi_is_ready(this.__wbg_ptr);
|
|
1552
|
-
return ret !== 0;
|
|
1553
|
-
}
|
|
1554
1561
|
/**
|
|
1555
1562
|
* Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
|
|
1556
1563
|
* These are 2D curves used for architectural drawings instead of sectioning 3D geometry
|
|
@@ -2065,6 +2072,34 @@ export class RtcOffsetJs {
|
|
|
2065
2072
|
const ptr = this.__destroy_into_raw();
|
|
2066
2073
|
wasm.__wbg_rtcoffsetjs_free(ptr, 0);
|
|
2067
2074
|
}
|
|
2075
|
+
/**
|
|
2076
|
+
* Check if offset is significant (>10km)
|
|
2077
|
+
* @returns {boolean}
|
|
2078
|
+
*/
|
|
2079
|
+
isSignificant() {
|
|
2080
|
+
const ret = wasm.rtcoffsetjs_isSignificant(this.__wbg_ptr);
|
|
2081
|
+
return ret !== 0;
|
|
2082
|
+
}
|
|
2083
|
+
/**
|
|
2084
|
+
* Convert local coordinates to world coordinates
|
|
2085
|
+
* @param {number} x
|
|
2086
|
+
* @param {number} y
|
|
2087
|
+
* @param {number} z
|
|
2088
|
+
* @returns {Float64Array}
|
|
2089
|
+
*/
|
|
2090
|
+
toWorld(x, y, z) {
|
|
2091
|
+
try {
|
|
2092
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2093
|
+
wasm.rtcoffsetjs_toWorld(retptr, this.__wbg_ptr, x, y, z);
|
|
2094
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2095
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2096
|
+
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
2097
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
2098
|
+
return v1;
|
|
2099
|
+
} finally {
|
|
2100
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2068
2103
|
/**
|
|
2069
2104
|
* X offset (subtracted from positions)
|
|
2070
2105
|
* @returns {number}
|
|
@@ -2110,34 +2145,6 @@ export class RtcOffsetJs {
|
|
|
2110
2145
|
set z(arg0) {
|
|
2111
2146
|
wasm.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr, arg0);
|
|
2112
2147
|
}
|
|
2113
|
-
/**
|
|
2114
|
-
* Check if offset is significant (>10km)
|
|
2115
|
-
* @returns {boolean}
|
|
2116
|
-
*/
|
|
2117
|
-
isSignificant() {
|
|
2118
|
-
const ret = wasm.rtcoffsetjs_isSignificant(this.__wbg_ptr);
|
|
2119
|
-
return ret !== 0;
|
|
2120
|
-
}
|
|
2121
|
-
/**
|
|
2122
|
-
* Convert local coordinates to world coordinates
|
|
2123
|
-
* @param {number} x
|
|
2124
|
-
* @param {number} y
|
|
2125
|
-
* @param {number} z
|
|
2126
|
-
* @returns {Float64Array}
|
|
2127
|
-
*/
|
|
2128
|
-
toWorld(x, y, z) {
|
|
2129
|
-
try {
|
|
2130
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2131
|
-
wasm.rtcoffsetjs_toWorld(retptr, this.__wbg_ptr, x, y, z);
|
|
2132
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2133
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2134
|
-
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
2135
|
-
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
2136
|
-
return v1;
|
|
2137
|
-
} finally {
|
|
2138
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
2148
|
}
|
|
2142
2149
|
if (Symbol.dispose) RtcOffsetJs.prototype[Symbol.dispose] = RtcOffsetJs.prototype.free;
|
|
2143
2150
|
|
|
@@ -2600,6 +2607,15 @@ export function init() {
|
|
|
2600
2607
|
wasm.init();
|
|
2601
2608
|
}
|
|
2602
2609
|
|
|
2610
|
+
/**
|
|
2611
|
+
* @param {number} num_threads
|
|
2612
|
+
* @returns {Promise<any>}
|
|
2613
|
+
*/
|
|
2614
|
+
export function initThreadPool(num_threads) {
|
|
2615
|
+
const ret = wasm.initThreadPool(num_threads);
|
|
2616
|
+
return takeObject(ret);
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2603
2619
|
/**
|
|
2604
2620
|
* Get the version of IFC-Lite.
|
|
2605
2621
|
*
|
|
@@ -2631,6 +2647,51 @@ export function version() {
|
|
|
2631
2647
|
}
|
|
2632
2648
|
}
|
|
2633
2649
|
|
|
2650
|
+
export class wbg_rayon_PoolBuilder {
|
|
2651
|
+
static __wrap(ptr) {
|
|
2652
|
+
ptr = ptr >>> 0;
|
|
2653
|
+
const obj = Object.create(wbg_rayon_PoolBuilder.prototype);
|
|
2654
|
+
obj.__wbg_ptr = ptr;
|
|
2655
|
+
wbg_rayon_PoolBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2656
|
+
return obj;
|
|
2657
|
+
}
|
|
2658
|
+
__destroy_into_raw() {
|
|
2659
|
+
const ptr = this.__wbg_ptr;
|
|
2660
|
+
this.__wbg_ptr = 0;
|
|
2661
|
+
wbg_rayon_PoolBuilderFinalization.unregister(this);
|
|
2662
|
+
return ptr;
|
|
2663
|
+
}
|
|
2664
|
+
free() {
|
|
2665
|
+
const ptr = this.__destroy_into_raw();
|
|
2666
|
+
wasm.__wbg_wbg_rayon_poolbuilder_free(ptr, 0);
|
|
2667
|
+
}
|
|
2668
|
+
/**
|
|
2669
|
+
* @returns {number}
|
|
2670
|
+
*/
|
|
2671
|
+
numThreads() {
|
|
2672
|
+
const ret = wasm.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr);
|
|
2673
|
+
return ret >>> 0;
|
|
2674
|
+
}
|
|
2675
|
+
build() {
|
|
2676
|
+
wasm.wbg_rayon_poolbuilder_build(this.__wbg_ptr);
|
|
2677
|
+
}
|
|
2678
|
+
/**
|
|
2679
|
+
* @returns {number}
|
|
2680
|
+
*/
|
|
2681
|
+
receiver() {
|
|
2682
|
+
const ret = wasm.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr);
|
|
2683
|
+
return ret >>> 0;
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
if (Symbol.dispose) wbg_rayon_PoolBuilder.prototype[Symbol.dispose] = wbg_rayon_PoolBuilder.prototype.free;
|
|
2687
|
+
|
|
2688
|
+
/**
|
|
2689
|
+
* @param {number} receiver
|
|
2690
|
+
*/
|
|
2691
|
+
export function wbg_rayon_start_worker(receiver) {
|
|
2692
|
+
wasm.wbg_rayon_start_worker(receiver);
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2634
2695
|
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
2635
2696
|
|
|
2636
2697
|
async function __wbg_load(module, imports) {
|
|
@@ -2663,7 +2724,7 @@ async function __wbg_load(module, imports) {
|
|
|
2663
2724
|
}
|
|
2664
2725
|
}
|
|
2665
2726
|
|
|
2666
|
-
function __wbg_get_imports() {
|
|
2727
|
+
function __wbg_get_imports(memory) {
|
|
2667
2728
|
const imports = {};
|
|
2668
2729
|
imports.wbg = {};
|
|
2669
2730
|
imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
@@ -2682,18 +2743,33 @@ function __wbg_get_imports() {
|
|
|
2682
2743
|
const ret = wasm.memory;
|
|
2683
2744
|
return addHeapObject(ret);
|
|
2684
2745
|
};
|
|
2746
|
+
imports.wbg.__wbg___wbindgen_module_967adef62ea6cbf8 = function() {
|
|
2747
|
+
const ret = __wbg_init.__wbindgen_wasm_module;
|
|
2748
|
+
return addHeapObject(ret);
|
|
2749
|
+
};
|
|
2685
2750
|
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
2686
2751
|
const obj = getObject(arg1);
|
|
2687
2752
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2688
2753
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2689
2754
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2690
2755
|
};
|
|
2756
|
+
imports.wbg.__wbg___wbindgen_rethrow_78714972834ecdf1 = function(arg0) {
|
|
2757
|
+
throw takeObject(arg0);
|
|
2758
|
+
};
|
|
2691
2759
|
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
2692
2760
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2693
2761
|
};
|
|
2694
2762
|
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
2695
2763
|
getObject(arg0)._wbg_cb_unref();
|
|
2696
2764
|
};
|
|
2765
|
+
imports.wbg.__wbg_async_bba5a2ac54b734df = function(arg0) {
|
|
2766
|
+
const ret = getObject(arg0).async;
|
|
2767
|
+
return ret;
|
|
2768
|
+
};
|
|
2769
|
+
imports.wbg.__wbg_buffer_063cd102cc769a1c = function(arg0) {
|
|
2770
|
+
const ret = getObject(arg0).buffer;
|
|
2771
|
+
return addHeapObject(ret);
|
|
2772
|
+
};
|
|
2697
2773
|
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2698
2774
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
2699
2775
|
return addHeapObject(ret);
|
|
@@ -2710,6 +2786,10 @@ function __wbg_get_imports() {
|
|
|
2710
2786
|
const ret = clearTimeout(takeObject(arg0));
|
|
2711
2787
|
return addHeapObject(ret);
|
|
2712
2788
|
};
|
|
2789
|
+
imports.wbg.__wbg_data_8bf4ae669a78a688 = function(arg0) {
|
|
2790
|
+
const ret = getObject(arg0).data;
|
|
2791
|
+
return addHeapObject(ret);
|
|
2792
|
+
};
|
|
2713
2793
|
imports.wbg.__wbg_debug_9d0c87ddda3dc485 = function(arg0) {
|
|
2714
2794
|
console.debug(getObject(arg0));
|
|
2715
2795
|
};
|
|
@@ -2736,6 +2816,16 @@ function __wbg_get_imports() {
|
|
|
2736
2816
|
const ret = InstancedGeometry.__wrap(arg0);
|
|
2737
2817
|
return addHeapObject(ret);
|
|
2738
2818
|
};
|
|
2819
|
+
imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
|
|
2820
|
+
let result;
|
|
2821
|
+
try {
|
|
2822
|
+
result = getObject(arg0) instanceof Window;
|
|
2823
|
+
} catch (_) {
|
|
2824
|
+
result = false;
|
|
2825
|
+
}
|
|
2826
|
+
const ret = result;
|
|
2827
|
+
return ret;
|
|
2828
|
+
};
|
|
2739
2829
|
imports.wbg.__wbg_length_86ce4877baf913bb = function(arg0) {
|
|
2740
2830
|
const ret = getObject(arg0).length;
|
|
2741
2831
|
return ret;
|
|
@@ -2756,10 +2846,18 @@ function __wbg_get_imports() {
|
|
|
2756
2846
|
const ret = new Array();
|
|
2757
2847
|
return addHeapObject(ret);
|
|
2758
2848
|
};
|
|
2849
|
+
imports.wbg.__wbg_new_53cb1e86c1ef5d2a = function() { return handleError(function (arg0, arg1) {
|
|
2850
|
+
const ret = new Worker(getStringFromWasm0(arg0, arg1));
|
|
2851
|
+
return addHeapObject(ret);
|
|
2852
|
+
}, arguments) };
|
|
2759
2853
|
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
2760
2854
|
const ret = new Error();
|
|
2761
2855
|
return addHeapObject(ret);
|
|
2762
2856
|
};
|
|
2857
|
+
imports.wbg.__wbg_new_de1e660b88fc921f = function(arg0) {
|
|
2858
|
+
const ret = new Int32Array(getObject(arg0));
|
|
2859
|
+
return addHeapObject(ret);
|
|
2860
|
+
};
|
|
2763
2861
|
imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
|
|
2764
2862
|
try {
|
|
2765
2863
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -2767,7 +2865,7 @@ function __wbg_get_imports() {
|
|
|
2767
2865
|
const a = state0.a;
|
|
2768
2866
|
state0.a = 0;
|
|
2769
2867
|
try {
|
|
2770
|
-
return
|
|
2868
|
+
return __wasm_bindgen_func_elem_1230(a, state0.b, arg0, arg1);
|
|
2771
2869
|
} finally {
|
|
2772
2870
|
state0.a = a;
|
|
2773
2871
|
}
|
|
@@ -2790,6 +2888,13 @@ function __wbg_get_imports() {
|
|
|
2790
2888
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2791
2889
|
return addHeapObject(ret);
|
|
2792
2890
|
};
|
|
2891
|
+
imports.wbg.__wbg_of_7779827fa663eec8 = function(arg0, arg1, arg2) {
|
|
2892
|
+
const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
2893
|
+
return addHeapObject(ret);
|
|
2894
|
+
};
|
|
2895
|
+
imports.wbg.__wbg_postMessage_07504dbe15265d5c = function() { return handleError(function (arg0, arg1) {
|
|
2896
|
+
getObject(arg0).postMessage(getObject(arg1));
|
|
2897
|
+
}, arguments) };
|
|
2793
2898
|
imports.wbg.__wbg_prototypesetcall_96cc7097487b926d = function(arg0, arg1, arg2) {
|
|
2794
2899
|
Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
|
|
2795
2900
|
};
|
|
@@ -2822,6 +2927,9 @@ function __wbg_get_imports() {
|
|
|
2822
2927
|
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
2823
2928
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
2824
2929
|
};
|
|
2930
|
+
imports.wbg.__wbg_set_onmessage_deb94985de696ac7 = function(arg0, arg1) {
|
|
2931
|
+
getObject(arg0).onmessage = getObject(arg1);
|
|
2932
|
+
};
|
|
2825
2933
|
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
2826
2934
|
const ret = getObject(arg1).stack;
|
|
2827
2935
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
@@ -2829,6 +2937,10 @@ function __wbg_get_imports() {
|
|
|
2829
2937
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2830
2938
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2831
2939
|
};
|
|
2940
|
+
imports.wbg.__wbg_startWorkers_2ca11761e08ff5d5 = function(arg0, arg1, arg2) {
|
|
2941
|
+
const ret = startWorkers(takeObject(arg0), takeObject(arg1), wbg_rayon_PoolBuilder.__wrap(arg2));
|
|
2942
|
+
return addHeapObject(ret);
|
|
2943
|
+
};
|
|
2832
2944
|
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
2833
2945
|
const ret = typeof global === 'undefined' ? null : global;
|
|
2834
2946
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
@@ -2849,12 +2961,24 @@ function __wbg_get_imports() {
|
|
|
2849
2961
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
2850
2962
|
return addHeapObject(ret);
|
|
2851
2963
|
};
|
|
2964
|
+
imports.wbg.__wbg_value_4cd497eeadba94bd = function(arg0) {
|
|
2965
|
+
const ret = getObject(arg0).value;
|
|
2966
|
+
return addHeapObject(ret);
|
|
2967
|
+
};
|
|
2968
|
+
imports.wbg.__wbg_waitAsync_8afec80ffd213eca = function(arg0, arg1, arg2) {
|
|
2969
|
+
const ret = Atomics.waitAsync(getObject(arg0), arg1 >>> 0, arg2);
|
|
2970
|
+
return addHeapObject(ret);
|
|
2971
|
+
};
|
|
2972
|
+
imports.wbg.__wbg_waitAsync_c186cb97ffacd552 = function() {
|
|
2973
|
+
const ret = Atomics.waitAsync;
|
|
2974
|
+
return addHeapObject(ret);
|
|
2975
|
+
};
|
|
2852
2976
|
imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
|
|
2853
2977
|
console.warn(getObject(arg0));
|
|
2854
2978
|
};
|
|
2855
|
-
imports.wbg.
|
|
2856
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2857
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
2979
|
+
imports.wbg.__wbindgen_cast_188ff5bafa3120b4 = function(arg0, arg1) {
|
|
2980
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 56, function: Function { arguments: [], shim_idx: 57, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2981
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_497, __wasm_bindgen_func_elem_498);
|
|
2858
2982
|
return addHeapObject(ret);
|
|
2859
2983
|
};
|
|
2860
2984
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
@@ -2867,15 +2991,34 @@ function __wbg_get_imports() {
|
|
|
2867
2991
|
const ret = BigInt.asUintN(64, arg0);
|
|
2868
2992
|
return addHeapObject(ret);
|
|
2869
2993
|
};
|
|
2994
|
+
imports.wbg.__wbindgen_cast_72f2309ca88b7133 = function(arg0, arg1) {
|
|
2995
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 161, function: Function { arguments: [Externref], shim_idx: 162, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2996
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_958, __wasm_bindgen_func_elem_959);
|
|
2997
|
+
return addHeapObject(ret);
|
|
2998
|
+
};
|
|
2999
|
+
imports.wbg.__wbindgen_cast_96f117460864886d = function(arg0, arg1) {
|
|
3000
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 161, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 162, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3001
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_958, __wasm_bindgen_func_elem_959);
|
|
3002
|
+
return addHeapObject(ret);
|
|
3003
|
+
};
|
|
2870
3004
|
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
2871
3005
|
// Cast intrinsic for `F64 -> Externref`.
|
|
2872
3006
|
const ret = arg0;
|
|
2873
3007
|
return addHeapObject(ret);
|
|
2874
3008
|
};
|
|
2875
|
-
imports.wbg.
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
3009
|
+
imports.wbg.__wbindgen_link_203404ece0e9bab9 = function(arg0) {
|
|
3010
|
+
const val = `onmessage = function (ev) {
|
|
3011
|
+
let [ia, index, value] = ev.data;
|
|
3012
|
+
ia = new Int32Array(ia.buffer);
|
|
3013
|
+
let result = Atomics.wait(ia, index, value);
|
|
3014
|
+
postMessage(result);
|
|
3015
|
+
};
|
|
3016
|
+
`;
|
|
3017
|
+
const ret = typeof URL.createObjectURL === 'undefined' ? "data:application/javascript," + encodeURIComponent(val) : URL.createObjectURL(new Blob([val], { type: "text/javascript" }));
|
|
3018
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
3019
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3020
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3021
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2879
3022
|
};
|
|
2880
3023
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
2881
3024
|
const ret = getObject(arg0);
|
|
@@ -2884,11 +3027,12 @@ function __wbg_get_imports() {
|
|
|
2884
3027
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
2885
3028
|
takeObject(arg0);
|
|
2886
3029
|
};
|
|
3030
|
+
imports.wbg.memory = memory || new WebAssembly.Memory({initial:20,maximum:65536,shared:true});
|
|
2887
3031
|
|
|
2888
3032
|
return imports;
|
|
2889
3033
|
}
|
|
2890
3034
|
|
|
2891
|
-
function __wbg_finalize_init(instance, module) {
|
|
3035
|
+
function __wbg_finalize_init(instance, module, thread_stack_size) {
|
|
2892
3036
|
wasm = instance.exports;
|
|
2893
3037
|
__wbg_init.__wbindgen_wasm_module = module;
|
|
2894
3038
|
cachedDataViewMemory0 = null;
|
|
@@ -2897,38 +3041,38 @@ function __wbg_finalize_init(instance, module) {
|
|
|
2897
3041
|
cachedUint32ArrayMemory0 = null;
|
|
2898
3042
|
cachedUint8ArrayMemory0 = null;
|
|
2899
3043
|
|
|
2900
|
-
|
|
2901
|
-
wasm.__wbindgen_start();
|
|
3044
|
+
if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) { throw 'invalid stack size' }
|
|
3045
|
+
wasm.__wbindgen_start(thread_stack_size);
|
|
2902
3046
|
return wasm;
|
|
2903
3047
|
}
|
|
2904
3048
|
|
|
2905
|
-
function initSync(module) {
|
|
3049
|
+
function initSync(module, memory) {
|
|
2906
3050
|
if (wasm !== undefined) return wasm;
|
|
2907
3051
|
|
|
2908
|
-
|
|
3052
|
+
let thread_stack_size
|
|
2909
3053
|
if (typeof module !== 'undefined') {
|
|
2910
3054
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
2911
|
-
({module} = module)
|
|
3055
|
+
({module, memory, thread_stack_size} = module)
|
|
2912
3056
|
} else {
|
|
2913
3057
|
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
2914
3058
|
}
|
|
2915
3059
|
}
|
|
2916
3060
|
|
|
2917
|
-
const imports = __wbg_get_imports();
|
|
3061
|
+
const imports = __wbg_get_imports(memory);
|
|
2918
3062
|
if (!(module instanceof WebAssembly.Module)) {
|
|
2919
3063
|
module = new WebAssembly.Module(module);
|
|
2920
3064
|
}
|
|
2921
3065
|
const instance = new WebAssembly.Instance(module, imports);
|
|
2922
|
-
return __wbg_finalize_init(instance, module);
|
|
3066
|
+
return __wbg_finalize_init(instance, module, thread_stack_size);
|
|
2923
3067
|
}
|
|
2924
3068
|
|
|
2925
|
-
async function __wbg_init(module_or_path) {
|
|
3069
|
+
async function __wbg_init(module_or_path, memory) {
|
|
2926
3070
|
if (wasm !== undefined) return wasm;
|
|
2927
3071
|
|
|
2928
|
-
|
|
3072
|
+
let thread_stack_size
|
|
2929
3073
|
if (typeof module_or_path !== 'undefined') {
|
|
2930
3074
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
2931
|
-
({module_or_path} = module_or_path)
|
|
3075
|
+
({module_or_path, memory, thread_stack_size} = module_or_path)
|
|
2932
3076
|
} else {
|
|
2933
3077
|
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
2934
3078
|
}
|
|
@@ -2937,7 +3081,7 @@ async function __wbg_init(module_or_path) {
|
|
|
2937
3081
|
if (typeof module_or_path === 'undefined') {
|
|
2938
3082
|
module_or_path = new URL('ifc-lite_bg.wasm', import.meta.url);
|
|
2939
3083
|
}
|
|
2940
|
-
const imports = __wbg_get_imports();
|
|
3084
|
+
const imports = __wbg_get_imports(memory);
|
|
2941
3085
|
|
|
2942
3086
|
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
2943
3087
|
module_or_path = fetch(module_or_path);
|
|
@@ -2945,7 +3089,7 @@ async function __wbg_init(module_or_path) {
|
|
|
2945
3089
|
|
|
2946
3090
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
2947
3091
|
|
|
2948
|
-
return __wbg_finalize_init(instance, module);
|
|
3092
|
+
return __wbg_finalize_init(instance, module, thread_stack_size);
|
|
2949
3093
|
}
|
|
2950
3094
|
|
|
2951
3095
|
export { initSync };
|
package/pkg/ifc-lite_bg.wasm
CHANGED
|
Binary file
|