@ifc-lite/wasm 1.2.1 → 1.3.0

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  "IFC-Lite Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings for IFC-Lite",
8
- "version": "1.2.1",
8
+ "version": "1.3.0",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
package/pkg/ifc-lite.d.ts CHANGED
@@ -54,6 +54,10 @@ export class GeoReferenceJs {
54
54
  export class GpuGeometry {
55
55
  free(): void;
56
56
  [Symbol.dispose](): void;
57
+ /**
58
+ * Set the RTC (Relative To Center) offset applied to coordinates
59
+ */
60
+ set_rtc_offset(x: number, y: number, z: number): void;
57
61
  /**
58
62
  * Get IFC type name by index
59
63
  */
@@ -78,6 +82,22 @@ export class GpuGeometry {
78
82
  * Get pointer to indices array for zero-copy view
79
83
  */
80
84
  readonly indicesPtr: number;
85
+ /**
86
+ * Get X component of RTC offset
87
+ */
88
+ readonly rtcOffsetX: number;
89
+ /**
90
+ * Get Y component of RTC offset
91
+ */
92
+ readonly rtcOffsetY: number;
93
+ /**
94
+ * Get Z component of RTC offset
95
+ */
96
+ readonly rtcOffsetZ: number;
97
+ /**
98
+ * Check if RTC offset is active (non-zero)
99
+ */
100
+ readonly hasRtcOffset: boolean;
81
101
  /**
82
102
  * Get length of vertex data array (in f32 elements, not bytes)
83
103
  */
@@ -256,13 +276,25 @@ export class IfcAPI {
256
276
  * Parse IFC file with streaming mesh batches for progressive rendering
257
277
  * Calls the callback with batches of meshes, yielding to browser between batches
258
278
  *
279
+ * Options:
280
+ * - `batchSize`: Number of meshes per batch (default: 25)
281
+ * - `onBatch(meshes, progress)`: Called for each batch of meshes
282
+ * - `onRtcOffset({x, y, z, hasRtc})`: Called early with RTC offset for camera/world setup
283
+ * - `onColorUpdate(Map<id, color>)`: Called with style updates after initial render
284
+ * - `onComplete(stats)`: Called when parsing completes with stats including rtcOffset
285
+ *
259
286
  * Example:
260
287
  * ```javascript
261
288
  * const api = new IfcAPI();
262
289
  * await api.parseMeshesAsync(ifcData, {
263
290
  * batchSize: 100,
291
+ * onRtcOffset: (rtc) => {
292
+ * if (rtc.hasRtc) {
293
+ * // Model uses large coordinates - adjust camera/world origin
294
+ * viewer.setWorldOffset(rtc.x, rtc.y, rtc.z);
295
+ * }
296
+ * },
264
297
  * onBatch: (meshes, progress) => {
265
- * // Add meshes to scene
266
298
  * for (const mesh of meshes) {
267
299
  * scene.add(createThreeMesh(mesh));
268
300
  * }
@@ -270,6 +302,7 @@ export class IfcAPI {
270
302
  * },
271
303
  * onComplete: (stats) => {
272
304
  * console.log(`Done! ${stats.totalMeshes} meshes`);
305
+ * // stats.rtcOffset also available here: {x, y, z, hasRtc}
273
306
  * }
274
307
  * });
275
308
  * ```
@@ -495,10 +528,32 @@ export class MeshCollection {
495
528
  private constructor();
496
529
  free(): void;
497
530
  [Symbol.dispose](): void;
531
+ /**
532
+ * Check if RTC offset is significant (>10km)
533
+ */
534
+ hasRtcOffset(): boolean;
535
+ /**
536
+ * Convert local coordinates to world coordinates
537
+ * Use this to convert mesh positions back to original IFC coordinates
538
+ */
539
+ localToWorld(x: number, y: number, z: number): Float64Array;
498
540
  /**
499
541
  * Get mesh at index
500
542
  */
501
543
  get(index: number): MeshDataJs | undefined;
544
+ /**
545
+ * Get RTC offset X (for converting local coords back to world coords)
546
+ * Add this to local X coordinates to get world X coordinates
547
+ */
548
+ readonly rtcOffsetX: number;
549
+ /**
550
+ * Get RTC offset Y
551
+ */
552
+ readonly rtcOffsetY: number;
553
+ /**
554
+ * Get RTC offset Z
555
+ */
556
+ readonly rtcOffsetZ: number;
502
557
  /**
503
558
  * Get total vertex count across all meshes
504
559
  */
@@ -719,12 +774,17 @@ export interface InitOutput {
719
774
  readonly georeferencejs_toMatrix: (a: number, b: number) => void;
720
775
  readonly gpugeometry_getIfcTypeName: (a: number, b: number, c: number) => void;
721
776
  readonly gpugeometry_getMeshMetadata: (a: number, b: number) => number;
777
+ readonly gpugeometry_hasRtcOffset: (a: number) => number;
722
778
  readonly gpugeometry_indicesByteLength: (a: number) => number;
723
779
  readonly gpugeometry_indicesLen: (a: number) => number;
724
780
  readonly gpugeometry_indicesPtr: (a: number) => number;
725
781
  readonly gpugeometry_isEmpty: (a: number) => number;
726
782
  readonly gpugeometry_meshCount: (a: number) => number;
727
783
  readonly gpugeometry_new: () => number;
784
+ readonly gpugeometry_rtcOffsetX: (a: number) => number;
785
+ readonly gpugeometry_rtcOffsetY: (a: number) => number;
786
+ readonly gpugeometry_rtcOffsetZ: (a: number) => number;
787
+ readonly gpugeometry_set_rtc_offset: (a: number, b: number, c: number, d: number) => void;
728
788
  readonly gpugeometry_totalTriangleCount: (a: number) => number;
729
789
  readonly gpugeometry_totalVertexCount: (a: number) => number;
730
790
  readonly gpugeometry_vertexDataByteLength: (a: number) => number;
@@ -744,6 +804,7 @@ export interface InitOutput {
744
804
  readonly gpuinstancedgeometry_vertexCount: (a: number) => number;
745
805
  readonly gpuinstancedgeometry_vertexDataByteLength: (a: number) => number;
746
806
  readonly gpuinstancedgeometry_vertexDataLen: (a: number) => number;
807
+ readonly gpuinstancedgeometry_vertexDataPtr: (a: number) => number;
747
808
  readonly gpuinstancedgeometrycollection_get: (a: number, b: number) => number;
748
809
  readonly gpuinstancedgeometrycollection_getRef: (a: number, b: number) => number;
749
810
  readonly gpuinstancedgeometrycollection_length: (a: number) => number;
@@ -798,7 +859,9 @@ export interface InitOutput {
798
859
  readonly instancedmeshcollection_get: (a: number, b: number) => number;
799
860
  readonly instancedmeshcollection_totalInstances: (a: number) => number;
800
861
  readonly meshcollection_get: (a: number, b: number) => number;
862
+ readonly meshcollection_hasRtcOffset: (a: number) => number;
801
863
  readonly meshcollection_length: (a: number) => number;
864
+ readonly meshcollection_localToWorld: (a: number, b: number, c: number, d: number, e: number) => void;
802
865
  readonly meshcollection_totalTriangles: (a: number) => number;
803
866
  readonly meshcollection_totalVertices: (a: number) => number;
804
867
  readonly meshcollectionwithrtc_get: (a: number, b: number) => number;
@@ -812,43 +875,45 @@ export interface InitOutput {
812
875
  readonly meshdatajs_normals: (a: number) => number;
813
876
  readonly meshdatajs_positions: (a: number) => number;
814
877
  readonly meshdatajs_triangleCount: (a: number) => number;
815
- readonly rtcoffsetjs_isSignificant: (a: number) => number;
878
+ readonly meshdatajs_vertexCount: (a: number) => number;
816
879
  readonly rtcoffsetjs_toWorld: (a: number, b: number, c: number, d: number, e: number) => void;
817
880
  readonly version: (a: number) => void;
818
881
  readonly zerocopymesh_bounds_max: (a: number, b: number) => void;
819
882
  readonly zerocopymesh_bounds_min: (a: number, b: number) => void;
883
+ readonly zerocopymesh_is_empty: (a: number) => number;
820
884
  readonly zerocopymesh_new: () => number;
885
+ readonly zerocopymesh_normals_len: (a: number) => number;
886
+ readonly zerocopymesh_positions_len: (a: number) => number;
887
+ readonly zerocopymesh_positions_ptr: (a: number) => number;
821
888
  readonly zerocopymesh_vertex_count: (a: number) => number;
822
889
  readonly init: () => void;
823
890
  readonly instancedmeshcollection_length: (a: number) => number;
824
891
  readonly instancedmeshcollection_totalGeometries: (a: number) => number;
825
892
  readonly zerocopymesh_indices_len: (a: number) => number;
826
- readonly zerocopymesh_normals_len: (a: number) => number;
827
- readonly zerocopymesh_positions_len: (a: number) => number;
828
893
  readonly __wbg_set_rtcoffsetjs_x: (a: number, b: number) => void;
829
894
  readonly __wbg_set_rtcoffsetjs_y: (a: number, b: number) => void;
830
895
  readonly __wbg_set_rtcoffsetjs_z: (a: number, b: number) => void;
831
- readonly meshdatajs_vertexCount: (a: number) => number;
832
896
  readonly zerocopymesh_triangle_count: (a: number) => number;
833
897
  readonly get_memory: () => number;
834
- readonly gpuinstancedgeometry_vertexDataPtr: (a: number) => number;
835
898
  readonly zerocopymesh_indices_ptr: (a: number) => number;
836
899
  readonly zerocopymesh_normals_ptr: (a: number) => number;
837
- readonly zerocopymesh_positions_ptr: (a: number) => number;
838
- readonly zerocopymesh_is_empty: (a: number) => number;
900
+ readonly rtcoffsetjs_isSignificant: (a: number) => number;
839
901
  readonly __wbg_get_rtcoffsetjs_x: (a: number) => number;
840
902
  readonly __wbg_get_rtcoffsetjs_y: (a: number) => number;
841
903
  readonly __wbg_get_rtcoffsetjs_z: (a: number) => number;
842
904
  readonly instancedgeometry_geometryId: (a: number) => bigint;
843
- readonly __wasm_bindgen_func_elem_393: (a: number, b: number) => void;
844
- readonly __wasm_bindgen_func_elem_389: (a: number, b: number) => void;
845
- readonly __wasm_bindgen_func_elem_725: (a: number, b: number, c: number) => void;
846
- readonly __wasm_bindgen_func_elem_720: (a: number, b: number) => void;
847
- readonly __wasm_bindgen_func_elem_756: (a: number, b: number, c: number, d: number) => void;
848
- readonly __wbindgen_export: (a: number, b: number) => number;
849
- readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
850
- readonly __wbindgen_export3: (a: number) => void;
851
- readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
905
+ readonly meshcollection_rtcOffsetX: (a: number) => number;
906
+ readonly meshcollection_rtcOffsetY: (a: number) => number;
907
+ readonly meshcollection_rtcOffsetZ: (a: number) => number;
908
+ readonly __wasm_bindgen_func_elem_847: (a: number, b: number, c: number) => void;
909
+ readonly __wasm_bindgen_func_elem_845: (a: number, b: number) => void;
910
+ readonly __wasm_bindgen_func_elem_408: (a: number, b: number) => void;
911
+ readonly __wasm_bindgen_func_elem_406: (a: number, b: number) => void;
912
+ readonly __wasm_bindgen_func_elem_878: (a: number, b: number, c: number, d: number) => void;
913
+ readonly __wbindgen_export: (a: number) => void;
914
+ readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
915
+ readonly __wbindgen_export3: (a: number, b: number) => number;
916
+ readonly __wbindgen_export4: (a: number, b: number, c: number, d: number) => number;
852
917
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
853
918
  readonly __wbindgen_start: () => void;
854
919
  }
package/pkg/ifc-lite.js CHANGED
@@ -13,71 +13,6 @@ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
13
13
  ? { register: () => {}, unregister: () => {} }
14
14
  : new FinalizationRegistry(state => state.dtor(state.a, state.b));
15
15
 
16
- function debugString(val) {
17
- // primitive types
18
- const type = typeof val;
19
- if (type == 'number' || type == 'boolean' || val == null) {
20
- return `${val}`;
21
- }
22
- if (type == 'string') {
23
- return `"${val}"`;
24
- }
25
- if (type == 'symbol') {
26
- const description = val.description;
27
- if (description == null) {
28
- return 'Symbol';
29
- } else {
30
- return `Symbol(${description})`;
31
- }
32
- }
33
- if (type == 'function') {
34
- const name = val.name;
35
- if (typeof name == 'string' && name.length > 0) {
36
- return `Function(${name})`;
37
- } else {
38
- return 'Function';
39
- }
40
- }
41
- // objects
42
- if (Array.isArray(val)) {
43
- const length = val.length;
44
- let debug = '[';
45
- if (length > 0) {
46
- debug += debugString(val[0]);
47
- }
48
- for(let i = 1; i < length; i++) {
49
- debug += ', ' + debugString(val[i]);
50
- }
51
- debug += ']';
52
- return debug;
53
- }
54
- // Test for built-in
55
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
56
- let className;
57
- if (builtInMatches && builtInMatches.length > 1) {
58
- className = builtInMatches[1];
59
- } else {
60
- // Failed to match the standard '[object ClassName]'
61
- return toString.call(val);
62
- }
63
- if (className == 'Object') {
64
- // we're a user defined class or Object
65
- // JSON.stringify avoids problems with cycles, and is generally much
66
- // easier than looping through ownProperties of `val`.
67
- try {
68
- return 'Object(' + JSON.stringify(val) + ')';
69
- } catch (_) {
70
- return 'Object';
71
- }
72
- }
73
- // errors
74
- if (val instanceof Error) {
75
- return `${val.name}: ${val.message}\n${val.stack}`;
76
- }
77
- // TODO we could test for more things here, like `Set`s and `Map`s.
78
- return className;
79
- }
80
-
81
16
  function dropObject(idx) {
82
17
  if (idx < 132) return;
83
18
  heap[idx] = heap_next;
@@ -150,7 +85,7 @@ function handleError(f, args) {
150
85
  try {
151
86
  return f.apply(this, args);
152
87
  } catch (e) {
153
- wasm.__wbindgen_export3(addHeapObject(e));
88
+ wasm.__wbindgen_export(addHeapObject(e));
154
89
  }
155
90
  }
156
91
 
@@ -263,16 +198,16 @@ if (!('encodeInto' in cachedTextEncoder)) {
263
198
 
264
199
  let WASM_VECTOR_LEN = 0;
265
200
 
266
- function __wasm_bindgen_func_elem_393(arg0, arg1) {
267
- wasm.__wasm_bindgen_func_elem_393(arg0, arg1);
201
+ function __wasm_bindgen_func_elem_847(arg0, arg1, arg2) {
202
+ wasm.__wasm_bindgen_func_elem_847(arg0, arg1, addHeapObject(arg2));
268
203
  }
269
204
 
270
- function __wasm_bindgen_func_elem_725(arg0, arg1, arg2) {
271
- wasm.__wasm_bindgen_func_elem_725(arg0, arg1, addHeapObject(arg2));
205
+ function __wasm_bindgen_func_elem_408(arg0, arg1) {
206
+ wasm.__wasm_bindgen_func_elem_408(arg0, arg1);
272
207
  }
273
208
 
274
- function __wasm_bindgen_func_elem_756(arg0, arg1, arg2, arg3) {
275
- wasm.__wasm_bindgen_func_elem_756(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
209
+ function __wasm_bindgen_func_elem_878(arg0, arg1, arg2, arg3) {
210
+ wasm.__wasm_bindgen_func_elem_878(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
276
211
  }
277
212
 
278
213
  const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -460,7 +395,7 @@ export class GeoReferenceJs {
460
395
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
461
396
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
462
397
  var v1 = getArrayF64FromWasm0(r0, r1).slice();
463
- wasm.__wbindgen_export4(r0, r1 * 8, 8);
398
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
464
399
  return v1;
465
400
  } finally {
466
401
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -480,7 +415,7 @@ export class GeoReferenceJs {
480
415
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
481
416
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
482
417
  var v1 = getArrayF64FromWasm0(r0, r1).slice();
483
- wasm.__wbindgen_export4(r0, r1 * 8, 8);
418
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
484
419
  return v1;
485
420
  } finally {
486
421
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -499,7 +434,7 @@ export class GeoReferenceJs {
499
434
  let v1;
500
435
  if (r0 !== 0) {
501
436
  v1 = getStringFromWasm0(r0, r1).slice();
502
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
437
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
503
438
  }
504
439
  return v1;
505
440
  } finally {
@@ -525,7 +460,7 @@ export class GeoReferenceJs {
525
460
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
526
461
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
527
462
  var v1 = getArrayF64FromWasm0(r0, r1).slice();
528
- wasm.__wbindgen_export4(r0, r1 * 8, 8);
463
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
529
464
  return v1;
530
465
  } finally {
531
466
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -586,6 +521,47 @@ export class GpuGeometry {
586
521
  const ret = wasm.gpugeometry_indicesPtr(this.__wbg_ptr);
587
522
  return ret >>> 0;
588
523
  }
524
+ /**
525
+ * Get X component of RTC offset
526
+ * @returns {number}
527
+ */
528
+ get rtcOffsetX() {
529
+ const ret = wasm.gpugeometry_rtcOffsetX(this.__wbg_ptr);
530
+ return ret;
531
+ }
532
+ /**
533
+ * Get Y component of RTC offset
534
+ * @returns {number}
535
+ */
536
+ get rtcOffsetY() {
537
+ const ret = wasm.gpugeometry_rtcOffsetY(this.__wbg_ptr);
538
+ return ret;
539
+ }
540
+ /**
541
+ * Get Z component of RTC offset
542
+ * @returns {number}
543
+ */
544
+ get rtcOffsetZ() {
545
+ const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
546
+ return ret;
547
+ }
548
+ /**
549
+ * Check if RTC offset is active (non-zero)
550
+ * @returns {boolean}
551
+ */
552
+ get hasRtcOffset() {
553
+ const ret = wasm.gpugeometry_hasRtcOffset(this.__wbg_ptr);
554
+ return ret !== 0;
555
+ }
556
+ /**
557
+ * Set the RTC (Relative To Center) offset applied to coordinates
558
+ * @param {number} x
559
+ * @param {number} y
560
+ * @param {number} z
561
+ */
562
+ set_rtc_offset(x, y, z) {
563
+ wasm.gpugeometry_set_rtc_offset(this.__wbg_ptr, x, y, z);
564
+ }
589
565
  /**
590
566
  * Get length of vertex data array (in f32 elements, not bytes)
591
567
  * @returns {number}
@@ -619,7 +595,7 @@ export class GpuGeometry {
619
595
  let v1;
620
596
  if (r0 !== 0) {
621
597
  v1 = getStringFromWasm0(r0, r1).slice();
622
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
598
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
623
599
  }
624
600
  return v1;
625
601
  } finally {
@@ -766,7 +742,7 @@ export class GpuInstancedGeometry {
766
742
  * @returns {number}
767
743
  */
768
744
  get vertexDataPtr() {
769
- const ret = wasm.gpugeometry_indicesPtr(this.__wbg_ptr);
745
+ const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
770
746
  return ret >>> 0;
771
747
  }
772
748
  /**
@@ -1061,7 +1037,7 @@ export class GpuMeshMetadata {
1061
1037
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1062
1038
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1063
1039
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
1064
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
1040
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
1065
1041
  return v1;
1066
1042
  } finally {
1067
1043
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1111,7 +1087,7 @@ export class IfcAPI {
1111
1087
  * @returns {MeshCollection}
1112
1088
  */
1113
1089
  parseMeshes(content) {
1114
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1090
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1115
1091
  const len0 = WASM_VECTOR_LEN;
1116
1092
  const ret = wasm.ifcapi_parseMeshes(this.__wbg_ptr, ptr0, len0);
1117
1093
  return MeshCollection.__wrap(ret);
@@ -1132,7 +1108,7 @@ export class IfcAPI {
1132
1108
  * @returns {Promise<any>}
1133
1109
  */
1134
1110
  parseStreaming(content, callback) {
1135
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1111
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1136
1112
  const len0 = WASM_VECTOR_LEN;
1137
1113
  const ret = wasm.ifcapi_parseStreaming(this.__wbg_ptr, ptr0, len0, addHeapObject(callback));
1138
1114
  return takeObject(ret);
@@ -1161,7 +1137,7 @@ export class IfcAPI {
1161
1137
  * @returns {ZeroCopyMesh}
1162
1138
  */
1163
1139
  parseZeroCopy(content) {
1164
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1140
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1165
1141
  const len0 = WASM_VECTOR_LEN;
1166
1142
  const ret = wasm.ifcapi_parseZeroCopy(this.__wbg_ptr, ptr0, len0);
1167
1143
  return ZeroCopyMesh.__wrap(ret);
@@ -1183,7 +1159,7 @@ export class IfcAPI {
1183
1159
  * @returns {GeoReferenceJs | undefined}
1184
1160
  */
1185
1161
  getGeoReference(content) {
1186
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1162
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1187
1163
  const len0 = WASM_VECTOR_LEN;
1188
1164
  const ret = wasm.ifcapi_getGeoReference(this.__wbg_ptr, ptr0, len0);
1189
1165
  return ret === 0 ? undefined : GeoReferenceJs.__wrap(ret);
@@ -1192,13 +1168,25 @@ export class IfcAPI {
1192
1168
  * Parse IFC file with streaming mesh batches for progressive rendering
1193
1169
  * Calls the callback with batches of meshes, yielding to browser between batches
1194
1170
  *
1171
+ * Options:
1172
+ * - `batchSize`: Number of meshes per batch (default: 25)
1173
+ * - `onBatch(meshes, progress)`: Called for each batch of meshes
1174
+ * - `onRtcOffset({x, y, z, hasRtc})`: Called early with RTC offset for camera/world setup
1175
+ * - `onColorUpdate(Map<id, color>)`: Called with style updates after initial render
1176
+ * - `onComplete(stats)`: Called when parsing completes with stats including rtcOffset
1177
+ *
1195
1178
  * Example:
1196
1179
  * ```javascript
1197
1180
  * const api = new IfcAPI();
1198
1181
  * await api.parseMeshesAsync(ifcData, {
1199
1182
  * batchSize: 100,
1183
+ * onRtcOffset: (rtc) => {
1184
+ * if (rtc.hasRtc) {
1185
+ * // Model uses large coordinates - adjust camera/world origin
1186
+ * viewer.setWorldOffset(rtc.x, rtc.y, rtc.z);
1187
+ * }
1188
+ * },
1200
1189
  * onBatch: (meshes, progress) => {
1201
- * // Add meshes to scene
1202
1190
  * for (const mesh of meshes) {
1203
1191
  * scene.add(createThreeMesh(mesh));
1204
1192
  * }
@@ -1206,6 +1194,7 @@ export class IfcAPI {
1206
1194
  * },
1207
1195
  * onComplete: (stats) => {
1208
1196
  * console.log(`Done! ${stats.totalMeshes} meshes`);
1197
+ * // stats.rtcOffset also available here: {x, y, z, hasRtc}
1209
1198
  * }
1210
1199
  * });
1211
1200
  * ```
@@ -1214,7 +1203,7 @@ export class IfcAPI {
1214
1203
  * @returns {Promise<any>}
1215
1204
  */
1216
1205
  parseMeshesAsync(content, options) {
1217
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1206
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1218
1207
  const len0 = WASM_VECTOR_LEN;
1219
1208
  const ret = wasm.ifcapi_parseMeshesAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1220
1209
  return takeObject(ret);
@@ -1227,7 +1216,7 @@ export class IfcAPI {
1227
1216
  * @returns {any}
1228
1217
  */
1229
1218
  scanEntitiesFast(content) {
1230
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1219
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1231
1220
  const len0 = WASM_VECTOR_LEN;
1232
1221
  const ret = wasm.ifcapi_scanEntitiesFast(this.__wbg_ptr, ptr0, len0);
1233
1222
  return takeObject(ret);
@@ -1252,7 +1241,7 @@ export class IfcAPI {
1252
1241
  * @returns {MeshCollectionWithRtc}
1253
1242
  */
1254
1243
  parseMeshesWithRtc(content) {
1255
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1244
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1256
1245
  const len0 = WASM_VECTOR_LEN;
1257
1246
  const ret = wasm.ifcapi_parseMeshesWithRtc(this.__wbg_ptr, ptr0, len0);
1258
1247
  return MeshCollectionWithRtc.__wrap(ret);
@@ -1296,7 +1285,7 @@ export class IfcAPI {
1296
1285
  * @returns {GpuGeometry}
1297
1286
  */
1298
1287
  parseToGpuGeometry(content) {
1299
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1288
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1300
1289
  const len0 = WASM_VECTOR_LEN;
1301
1290
  const ret = wasm.ifcapi_parseToGpuGeometry(this.__wbg_ptr, ptr0, len0);
1302
1291
  return GpuGeometry.__wrap(ret);
@@ -1324,7 +1313,7 @@ export class IfcAPI {
1324
1313
  * @returns {InstancedMeshCollection}
1325
1314
  */
1326
1315
  parseMeshesInstanced(content) {
1327
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1316
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1328
1317
  const len0 = WASM_VECTOR_LEN;
1329
1318
  const ret = wasm.ifcapi_parseMeshesInstanced(this.__wbg_ptr, ptr0, len0);
1330
1319
  return InstancedMeshCollection.__wrap(ret);
@@ -1339,7 +1328,7 @@ export class IfcAPI {
1339
1328
  let deferred2_1;
1340
1329
  try {
1341
1330
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1342
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1331
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1343
1332
  const len0 = WASM_VECTOR_LEN;
1344
1333
  wasm.ifcapi_debugProcessEntity953(retptr, this.__wbg_ptr, ptr0, len0);
1345
1334
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -1349,7 +1338,7 @@ export class IfcAPI {
1349
1338
  return getStringFromWasm0(r0, r1);
1350
1339
  } finally {
1351
1340
  wasm.__wbindgen_add_to_stack_pointer(16);
1352
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
1341
+ wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
1353
1342
  }
1354
1343
  }
1355
1344
  /**
@@ -1362,7 +1351,7 @@ export class IfcAPI {
1362
1351
  let deferred2_1;
1363
1352
  try {
1364
1353
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1365
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1354
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1366
1355
  const len0 = WASM_VECTOR_LEN;
1367
1356
  wasm.ifcapi_debugProcessFirstWall(retptr, this.__wbg_ptr, ptr0, len0);
1368
1357
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -1372,7 +1361,7 @@ export class IfcAPI {
1372
1361
  return getStringFromWasm0(r0, r1);
1373
1362
  } finally {
1374
1363
  wasm.__wbindgen_add_to_stack_pointer(16);
1375
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
1364
+ wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
1376
1365
  }
1377
1366
  }
1378
1367
  /**
@@ -1412,7 +1401,7 @@ export class IfcAPI {
1412
1401
  * @returns {Promise<any>}
1413
1402
  */
1414
1403
  parseToGpuGeometryAsync(content, options) {
1415
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1404
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1416
1405
  const len0 = WASM_VECTOR_LEN;
1417
1406
  const ret = wasm.ifcapi_parseToGpuGeometryAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1418
1407
  return takeObject(ret);
@@ -1426,7 +1415,7 @@ export class IfcAPI {
1426
1415
  * @returns {any}
1427
1416
  */
1428
1417
  scanGeometryEntitiesFast(content) {
1429
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1418
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1430
1419
  const len0 = WASM_VECTOR_LEN;
1431
1420
  const ret = wasm.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, ptr0, len0);
1432
1421
  return takeObject(ret);
@@ -1456,7 +1445,7 @@ export class IfcAPI {
1456
1445
  * @returns {Promise<any>}
1457
1446
  */
1458
1447
  parseMeshesInstancedAsync(content, options) {
1459
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1448
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1460
1449
  const len0 = WASM_VECTOR_LEN;
1461
1450
  const ret = wasm.ifcapi_parseMeshesInstancedAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1462
1451
  return takeObject(ret);
@@ -1470,7 +1459,7 @@ export class IfcAPI {
1470
1459
  * @returns {GpuInstancedGeometryCollection}
1471
1460
  */
1472
1461
  parseToGpuInstancedGeometry(content) {
1473
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1462
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1474
1463
  const len0 = WASM_VECTOR_LEN;
1475
1464
  const ret = wasm.ifcapi_parseToGpuInstancedGeometry(this.__wbg_ptr, ptr0, len0);
1476
1465
  return GpuInstancedGeometryCollection.__wrap(ret);
@@ -1497,7 +1486,7 @@ export class IfcAPI {
1497
1486
  * @returns {Promise<any>}
1498
1487
  */
1499
1488
  parse(content) {
1500
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1489
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1501
1490
  const len0 = WASM_VECTOR_LEN;
1502
1491
  const ret = wasm.ifcapi_parse(this.__wbg_ptr, ptr0, len0);
1503
1492
  return takeObject(ret);
@@ -1519,7 +1508,7 @@ export class IfcAPI {
1519
1508
  return getStringFromWasm0(r0, r1);
1520
1509
  } finally {
1521
1510
  wasm.__wbindgen_add_to_stack_pointer(16);
1522
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1511
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
1523
1512
  }
1524
1513
  }
1525
1514
  /**
@@ -1571,7 +1560,7 @@ export class InstanceData {
1571
1560
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1572
1561
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1573
1562
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
1574
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
1563
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
1575
1564
  return v1;
1576
1565
  } finally {
1577
1566
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1728,6 +1717,60 @@ export class MeshCollection {
1728
1717
  const ptr = this.__destroy_into_raw();
1729
1718
  wasm.__wbg_meshcollection_free(ptr, 0);
1730
1719
  }
1720
+ /**
1721
+ * Get RTC offset X (for converting local coords back to world coords)
1722
+ * Add this to local X coordinates to get world X coordinates
1723
+ * @returns {number}
1724
+ */
1725
+ get rtcOffsetX() {
1726
+ const ret = wasm.gpugeometry_rtcOffsetX(this.__wbg_ptr);
1727
+ return ret;
1728
+ }
1729
+ /**
1730
+ * Get RTC offset Y
1731
+ * @returns {number}
1732
+ */
1733
+ get rtcOffsetY() {
1734
+ const ret = wasm.gpugeometry_rtcOffsetY(this.__wbg_ptr);
1735
+ return ret;
1736
+ }
1737
+ /**
1738
+ * Get RTC offset Z
1739
+ * @returns {number}
1740
+ */
1741
+ get rtcOffsetZ() {
1742
+ const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
1743
+ return ret;
1744
+ }
1745
+ /**
1746
+ * Check if RTC offset is significant (>10km)
1747
+ * @returns {boolean}
1748
+ */
1749
+ hasRtcOffset() {
1750
+ const ret = wasm.meshcollection_hasRtcOffset(this.__wbg_ptr);
1751
+ return ret !== 0;
1752
+ }
1753
+ /**
1754
+ * Convert local coordinates to world coordinates
1755
+ * Use this to convert mesh positions back to original IFC coordinates
1756
+ * @param {number} x
1757
+ * @param {number} y
1758
+ * @param {number} z
1759
+ * @returns {Float64Array}
1760
+ */
1761
+ localToWorld(x, y, z) {
1762
+ try {
1763
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1764
+ wasm.meshcollection_localToWorld(retptr, this.__wbg_ptr, x, y, z);
1765
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1766
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1767
+ var v1 = getArrayF64FromWasm0(r0, r1).slice();
1768
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
1769
+ return v1;
1770
+ } finally {
1771
+ wasm.__wbindgen_add_to_stack_pointer(16);
1772
+ }
1773
+ }
1731
1774
  /**
1732
1775
  * Get total vertex count across all meshes
1733
1776
  * @returns {number}
@@ -1855,7 +1898,7 @@ export class MeshDataJs {
1855
1898
  * @returns {number}
1856
1899
  */
1857
1900
  get vertexCount() {
1858
- const ret = wasm.gpugeometry_totalTriangleCount(this.__wbg_ptr);
1901
+ const ret = wasm.meshdatajs_vertexCount(this.__wbg_ptr);
1859
1902
  return ret >>> 0;
1860
1903
  }
1861
1904
  /**
@@ -1877,7 +1920,7 @@ export class MeshDataJs {
1877
1920
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1878
1921
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1879
1922
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
1880
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
1923
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
1881
1924
  return v1;
1882
1925
  } finally {
1883
1926
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1916,7 +1959,7 @@ export class MeshDataJs {
1916
1959
  return getStringFromWasm0(r0, r1);
1917
1960
  } finally {
1918
1961
  wasm.__wbindgen_add_to_stack_pointer(16);
1919
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1962
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
1920
1963
  }
1921
1964
  }
1922
1965
  /**
@@ -2001,7 +2044,7 @@ export class RtcOffsetJs {
2001
2044
  * @returns {boolean}
2002
2045
  */
2003
2046
  isSignificant() {
2004
- const ret = wasm.rtcoffsetjs_isSignificant(this.__wbg_ptr);
2047
+ const ret = wasm.meshcollection_hasRtcOffset(this.__wbg_ptr);
2005
2048
  return ret !== 0;
2006
2049
  }
2007
2050
  /**
@@ -2018,7 +2061,7 @@ export class RtcOffsetJs {
2018
2061
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2019
2062
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2020
2063
  var v1 = getArrayF64FromWasm0(r0, r1).slice();
2021
- wasm.__wbindgen_export4(r0, r1 * 8, 8);
2064
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
2022
2065
  return v1;
2023
2066
  } finally {
2024
2067
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -2059,7 +2102,7 @@ export class ZeroCopyMesh {
2059
2102
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2060
2103
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2061
2104
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
2062
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
2105
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
2063
2106
  return v1;
2064
2107
  } finally {
2065
2108
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -2076,7 +2119,7 @@ export class ZeroCopyMesh {
2076
2119
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2077
2120
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2078
2121
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
2079
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
2122
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
2080
2123
  return v1;
2081
2124
  } finally {
2082
2125
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -2103,7 +2146,7 @@ export class ZeroCopyMesh {
2103
2146
  * @returns {number}
2104
2147
  */
2105
2148
  get normals_len() {
2106
- const ret = wasm.gpugeometry_indicesLen(this.__wbg_ptr);
2149
+ const ret = wasm.zerocopymesh_normals_len(this.__wbg_ptr);
2107
2150
  return ret >>> 0;
2108
2151
  }
2109
2152
  /**
@@ -2111,7 +2154,7 @@ export class ZeroCopyMesh {
2111
2154
  * @returns {number}
2112
2155
  */
2113
2156
  get normals_ptr() {
2114
- const ret = wasm.gpugeometry_indicesPtr(this.__wbg_ptr);
2157
+ const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
2115
2158
  return ret >>> 0;
2116
2159
  }
2117
2160
  /**
@@ -2127,7 +2170,7 @@ export class ZeroCopyMesh {
2127
2170
  * @returns {number}
2128
2171
  */
2129
2172
  get positions_len() {
2130
- const ret = wasm.gpugeometry_vertexDataLen(this.__wbg_ptr);
2173
+ const ret = wasm.zerocopymesh_positions_len(this.__wbg_ptr);
2131
2174
  return ret >>> 0;
2132
2175
  }
2133
2176
  /**
@@ -2136,7 +2179,7 @@ export class ZeroCopyMesh {
2136
2179
  * @returns {number}
2137
2180
  */
2138
2181
  get positions_ptr() {
2139
- const ret = wasm.gpugeometry_vertexDataPtr(this.__wbg_ptr);
2182
+ const ret = wasm.zerocopymesh_positions_ptr(this.__wbg_ptr);
2140
2183
  return ret >>> 0;
2141
2184
  }
2142
2185
  /**
@@ -2161,7 +2204,7 @@ export class ZeroCopyMesh {
2161
2204
  * @returns {boolean}
2162
2205
  */
2163
2206
  get is_empty() {
2164
- const ret = wasm.gpugeometry_isEmpty(this.__wbg_ptr);
2207
+ const ret = wasm.zerocopymesh_is_empty(this.__wbg_ptr);
2165
2208
  return ret !== 0;
2166
2209
  }
2167
2210
  }
@@ -2213,7 +2256,7 @@ export function version() {
2213
2256
  return getStringFromWasm0(r0, r1);
2214
2257
  } finally {
2215
2258
  wasm.__wbindgen_add_to_stack_pointer(16);
2216
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
2259
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2217
2260
  }
2218
2261
  }
2219
2262
 
@@ -2256,13 +2299,6 @@ function __wbg_get_imports() {
2256
2299
  const ret = Error(getStringFromWasm0(arg0, arg1));
2257
2300
  return addHeapObject(ret);
2258
2301
  };
2259
- imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
2260
- const ret = debugString(getObject(arg1));
2261
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2262
- const len1 = WASM_VECTOR_LEN;
2263
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2264
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2265
- };
2266
2302
  imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
2267
2303
  const ret = typeof(getObject(arg0)) === 'function';
2268
2304
  return ret;
@@ -2311,7 +2347,7 @@ function __wbg_get_imports() {
2311
2347
  deferred0_1 = arg1;
2312
2348
  console.error(getStringFromWasm0(arg0, arg1));
2313
2349
  } finally {
2314
- wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
2350
+ wasm.__wbindgen_export2(deferred0_0, deferred0_1, 1);
2315
2351
  }
2316
2352
  };
2317
2353
  imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
@@ -2357,7 +2393,7 @@ function __wbg_get_imports() {
2357
2393
  const a = state0.a;
2358
2394
  state0.a = 0;
2359
2395
  try {
2360
- return __wasm_bindgen_func_elem_756(a, state0.b, arg0, arg1);
2396
+ return __wasm_bindgen_func_elem_878(a, state0.b, arg0, arg1);
2361
2397
  } finally {
2362
2398
  state0.a = a;
2363
2399
  }
@@ -2419,7 +2455,7 @@ function __wbg_get_imports() {
2419
2455
  };
2420
2456
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
2421
2457
  const ret = getObject(arg1).stack;
2422
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2458
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
2423
2459
  const len1 = WASM_VECTOR_LEN;
2424
2460
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2425
2461
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
@@ -2444,29 +2480,32 @@ function __wbg_get_imports() {
2444
2480
  const ret = getObject(arg0).then(getObject(arg1));
2445
2481
  return addHeapObject(ret);
2446
2482
  };
2483
+ imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
2484
+ console.warn(getObject(arg0));
2485
+ };
2447
2486
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
2448
2487
  // Cast intrinsic for `Ref(String) -> Externref`.
2449
2488
  const ret = getStringFromWasm0(arg0, arg1);
2450
2489
  return addHeapObject(ret);
2451
2490
  };
2452
- imports.wbg.__wbindgen_cast_2ead27b74a7138e7 = function(arg0, arg1) {
2453
- // Cast intrinsic for `Closure(Closure { dtor_idx: 48, function: Function { arguments: [], shim_idx: 49, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2454
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_389, __wasm_bindgen_func_elem_393);
2455
- return addHeapObject(ret);
2456
- };
2457
2491
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
2458
2492
  // Cast intrinsic for `U64 -> Externref`.
2459
2493
  const ret = BigInt.asUintN(64, arg0);
2460
2494
  return addHeapObject(ret);
2461
2495
  };
2496
+ imports.wbg.__wbindgen_cast_7f089052c998c143 = function(arg0, arg1) {
2497
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 105, function: Function { arguments: [Externref], shim_idx: 106, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2498
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_845, __wasm_bindgen_func_elem_847);
2499
+ return addHeapObject(ret);
2500
+ };
2462
2501
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
2463
2502
  // Cast intrinsic for `F64 -> Externref`.
2464
2503
  const ret = arg0;
2465
2504
  return addHeapObject(ret);
2466
2505
  };
2467
- imports.wbg.__wbindgen_cast_f2cc0f2a96e2ef5b = function(arg0, arg1) {
2468
- // Cast intrinsic for `Closure(Closure { dtor_idx: 115, function: Function { arguments: [Externref], shim_idx: 116, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2469
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_720, __wasm_bindgen_func_elem_725);
2506
+ imports.wbg.__wbindgen_cast_fa504d1cec41bd0d = function(arg0, arg1) {
2507
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 45, function: Function { arguments: [], shim_idx: 46, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2508
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_406, __wasm_bindgen_func_elem_408);
2470
2509
  return addHeapObject(ret);
2471
2510
  };
2472
2511
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
Binary file