@ifc-lite/wasm 1.6.1 → 1.7.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/pkg/ifc-lite.js CHANGED
@@ -1,286 +1,4 @@
1
- let wasm;
2
-
3
- function addHeapObject(obj) {
4
- if (heap_next === heap.length) heap.push(heap.length + 1);
5
- const idx = heap_next;
6
- heap_next = heap[idx];
7
-
8
- heap[idx] = obj;
9
- return idx;
10
- }
11
-
12
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
13
- ? { register: () => {}, unregister: () => {} }
14
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
15
-
16
- function dropObject(idx) {
17
- if (idx < 132) return;
18
- heap[idx] = heap_next;
19
- heap_next = idx;
20
- }
21
-
22
- function getArrayF32FromWasm0(ptr, len) {
23
- ptr = ptr >>> 0;
24
- return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
25
- }
26
-
27
- function getArrayF64FromWasm0(ptr, len) {
28
- ptr = ptr >>> 0;
29
- return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
30
- }
31
-
32
- function getArrayU32FromWasm0(ptr, len) {
33
- ptr = ptr >>> 0;
34
- return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
35
- }
36
-
37
- let cachedDataViewMemory0 = null;
38
- function getDataViewMemory0() {
39
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
40
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
41
- }
42
- return cachedDataViewMemory0;
43
- }
44
-
45
- let cachedFloat32ArrayMemory0 = null;
46
- function getFloat32ArrayMemory0() {
47
- if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
48
- cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
49
- }
50
- return cachedFloat32ArrayMemory0;
51
- }
52
-
53
- let cachedFloat64ArrayMemory0 = null;
54
- function getFloat64ArrayMemory0() {
55
- if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
56
- cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
57
- }
58
- return cachedFloat64ArrayMemory0;
59
- }
60
-
61
- function getStringFromWasm0(ptr, len) {
62
- ptr = ptr >>> 0;
63
- return decodeText(ptr, len);
64
- }
65
-
66
- let cachedUint32ArrayMemory0 = null;
67
- function getUint32ArrayMemory0() {
68
- if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
69
- cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
70
- }
71
- return cachedUint32ArrayMemory0;
72
- }
73
-
74
- let cachedUint8ArrayMemory0 = null;
75
- function getUint8ArrayMemory0() {
76
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
77
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
78
- }
79
- return cachedUint8ArrayMemory0;
80
- }
81
-
82
- function getObject(idx) { return heap[idx]; }
83
-
84
- function handleError(f, args) {
85
- try {
86
- return f.apply(this, args);
87
- } catch (e) {
88
- wasm.__wbindgen_export(addHeapObject(e));
89
- }
90
- }
91
-
92
- let heap = new Array(128).fill(undefined);
93
- heap.push(undefined, null, true, false);
94
-
95
- let heap_next = heap.length;
96
-
97
- function isLikeNone(x) {
98
- return x === undefined || x === null;
99
- }
100
-
101
- function makeMutClosure(arg0, arg1, dtor, f) {
102
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
103
- const real = (...args) => {
104
-
105
- // First up with a closure we increment the internal reference
106
- // count. This ensures that the Rust closure environment won't
107
- // be deallocated while we're invoking it.
108
- state.cnt++;
109
- const a = state.a;
110
- state.a = 0;
111
- try {
112
- return f(a, state.b, ...args);
113
- } finally {
114
- state.a = a;
115
- real._wbg_cb_unref();
116
- }
117
- };
118
- real._wbg_cb_unref = () => {
119
- if (--state.cnt === 0) {
120
- state.dtor(state.a, state.b);
121
- state.a = 0;
122
- CLOSURE_DTORS.unregister(state);
123
- }
124
- };
125
- CLOSURE_DTORS.register(real, state, state);
126
- return real;
127
- }
128
-
129
- function passStringToWasm0(arg, malloc, realloc) {
130
- if (realloc === undefined) {
131
- const buf = cachedTextEncoder.encode(arg);
132
- const ptr = malloc(buf.length, 1) >>> 0;
133
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
134
- WASM_VECTOR_LEN = buf.length;
135
- return ptr;
136
- }
137
-
138
- let len = arg.length;
139
- let ptr = malloc(len, 1) >>> 0;
140
-
141
- const mem = getUint8ArrayMemory0();
142
-
143
- let offset = 0;
144
-
145
- for (; offset < len; offset++) {
146
- const code = arg.charCodeAt(offset);
147
- if (code > 0x7F) break;
148
- mem[ptr + offset] = code;
149
- }
150
- if (offset !== len) {
151
- if (offset !== 0) {
152
- arg = arg.slice(offset);
153
- }
154
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
155
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
156
- const ret = cachedTextEncoder.encodeInto(arg, view);
157
-
158
- offset += ret.written;
159
- ptr = realloc(ptr, len, offset, 1) >>> 0;
160
- }
161
-
162
- WASM_VECTOR_LEN = offset;
163
- return ptr;
164
- }
165
-
166
- function takeObject(idx) {
167
- const ret = getObject(idx);
168
- dropObject(idx);
169
- return ret;
170
- }
171
-
172
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
173
- cachedTextDecoder.decode();
174
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
175
- let numBytesDecoded = 0;
176
- function decodeText(ptr, len) {
177
- numBytesDecoded += len;
178
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
179
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
180
- cachedTextDecoder.decode();
181
- numBytesDecoded = len;
182
- }
183
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
184
- }
185
-
186
- const cachedTextEncoder = new TextEncoder();
187
-
188
- if (!('encodeInto' in cachedTextEncoder)) {
189
- cachedTextEncoder.encodeInto = function (arg, view) {
190
- const buf = cachedTextEncoder.encode(arg);
191
- view.set(buf);
192
- return {
193
- read: arg.length,
194
- written: buf.length
195
- };
196
- }
197
- }
198
-
199
- let WASM_VECTOR_LEN = 0;
200
-
201
- function __wasm_bindgen_func_elem_474(arg0, arg1) {
202
- wasm.__wasm_bindgen_func_elem_474(arg0, arg1);
203
- }
204
-
205
- function __wasm_bindgen_func_elem_921(arg0, arg1, arg2) {
206
- wasm.__wasm_bindgen_func_elem_921(arg0, arg1, addHeapObject(arg2));
207
- }
208
-
209
- function __wasm_bindgen_func_elem_952(arg0, arg1, arg2, arg3) {
210
- wasm.__wasm_bindgen_func_elem_952(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
211
- }
212
-
213
- const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
214
- ? { register: () => {}, unregister: () => {} }
215
- : new FinalizationRegistry(ptr => wasm.__wbg_georeferencejs_free(ptr >>> 0, 1));
216
-
217
- const GpuGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
218
- ? { register: () => {}, unregister: () => {} }
219
- : new FinalizationRegistry(ptr => wasm.__wbg_gpugeometry_free(ptr >>> 0, 1));
220
-
221
- const GpuInstancedGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
222
- ? { register: () => {}, unregister: () => {} }
223
- : new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometry_free(ptr >>> 0, 1));
224
-
225
- const GpuInstancedGeometryCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
226
- ? { register: () => {}, unregister: () => {} }
227
- : new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometrycollection_free(ptr >>> 0, 1));
228
-
229
- const GpuInstancedGeometryRefFinalization = (typeof FinalizationRegistry === 'undefined')
230
- ? { register: () => {}, unregister: () => {} }
231
- : new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometryref_free(ptr >>> 0, 1));
232
-
233
- const GpuMeshMetadataFinalization = (typeof FinalizationRegistry === 'undefined')
234
- ? { register: () => {}, unregister: () => {} }
235
- : new FinalizationRegistry(ptr => wasm.__wbg_gpumeshmetadata_free(ptr >>> 0, 1));
236
-
237
- const IfcAPIFinalization = (typeof FinalizationRegistry === 'undefined')
238
- ? { register: () => {}, unregister: () => {} }
239
- : new FinalizationRegistry(ptr => wasm.__wbg_ifcapi_free(ptr >>> 0, 1));
240
-
241
- const InstanceDataFinalization = (typeof FinalizationRegistry === 'undefined')
242
- ? { register: () => {}, unregister: () => {} }
243
- : new FinalizationRegistry(ptr => wasm.__wbg_instancedata_free(ptr >>> 0, 1));
244
-
245
- const InstancedGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
246
- ? { register: () => {}, unregister: () => {} }
247
- : new FinalizationRegistry(ptr => wasm.__wbg_instancedgeometry_free(ptr >>> 0, 1));
248
-
249
- const InstancedMeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
250
- ? { register: () => {}, unregister: () => {} }
251
- : new FinalizationRegistry(ptr => wasm.__wbg_instancedmeshcollection_free(ptr >>> 0, 1));
252
-
253
- const MeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
254
- ? { register: () => {}, unregister: () => {} }
255
- : new FinalizationRegistry(ptr => wasm.__wbg_meshcollection_free(ptr >>> 0, 1));
256
-
257
- const MeshCollectionWithRtcFinalization = (typeof FinalizationRegistry === 'undefined')
258
- ? { register: () => {}, unregister: () => {} }
259
- : new FinalizationRegistry(ptr => wasm.__wbg_meshcollectionwithrtc_free(ptr >>> 0, 1));
260
-
261
- const MeshDataJsFinalization = (typeof FinalizationRegistry === 'undefined')
262
- ? { register: () => {}, unregister: () => {} }
263
- : new FinalizationRegistry(ptr => wasm.__wbg_meshdatajs_free(ptr >>> 0, 1));
264
-
265
- const RtcOffsetJsFinalization = (typeof FinalizationRegistry === 'undefined')
266
- ? { register: () => {}, unregister: () => {} }
267
- : new FinalizationRegistry(ptr => wasm.__wbg_rtcoffsetjs_free(ptr >>> 0, 1));
268
-
269
- const SymbolicCircleFinalization = (typeof FinalizationRegistry === 'undefined')
270
- ? { register: () => {}, unregister: () => {} }
271
- : new FinalizationRegistry(ptr => wasm.__wbg_symboliccircle_free(ptr >>> 0, 1));
272
-
273
- const SymbolicPolylineFinalization = (typeof FinalizationRegistry === 'undefined')
274
- ? { register: () => {}, unregister: () => {} }
275
- : new FinalizationRegistry(ptr => wasm.__wbg_symbolicpolyline_free(ptr >>> 0, 1));
276
-
277
- const SymbolicRepresentationCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
278
- ? { register: () => {}, unregister: () => {} }
279
- : new FinalizationRegistry(ptr => wasm.__wbg_symbolicrepresentationcollection_free(ptr >>> 0, 1));
280
-
281
- const ZeroCopyMeshFinalization = (typeof FinalizationRegistry === 'undefined')
282
- ? { register: () => {}, unregister: () => {} }
283
- : new FinalizationRegistry(ptr => wasm.__wbg_zerocopymesh_free(ptr >>> 0, 1));
1
+ /* @ts-self-types="./ifc-lite.d.ts" */
284
2
 
285
3
  /**
286
4
  * Georeferencing information exposed to JavaScript
@@ -304,34 +22,105 @@ export class GeoReferenceJs {
304
22
  wasm.__wbg_georeferencejs_free(ptr, 0);
305
23
  }
306
24
  /**
307
- * Eastings (X offset)
25
+ * Get CRS name
26
+ * @returns {string | undefined}
27
+ */
28
+ get crsName() {
29
+ try {
30
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
31
+ wasm.georeferencejs_crsName(retptr, this.__wbg_ptr);
32
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
33
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
34
+ let v1;
35
+ if (r0 !== 0) {
36
+ v1 = getStringFromWasm0(r0, r1).slice();
37
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
38
+ }
39
+ return v1;
40
+ } finally {
41
+ wasm.__wbindgen_add_to_stack_pointer(16);
42
+ }
43
+ }
44
+ /**
45
+ * Transform local coordinates to map coordinates
46
+ * @param {number} x
47
+ * @param {number} y
48
+ * @param {number} z
49
+ * @returns {Float64Array}
50
+ */
51
+ localToMap(x, y, z) {
52
+ try {
53
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
54
+ wasm.georeferencejs_localToMap(retptr, this.__wbg_ptr, x, y, z);
55
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
56
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
57
+ var v1 = getArrayF64FromWasm0(r0, r1).slice();
58
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
59
+ return v1;
60
+ } finally {
61
+ wasm.__wbindgen_add_to_stack_pointer(16);
62
+ }
63
+ }
64
+ /**
65
+ * Transform map coordinates to local coordinates
66
+ * @param {number} e
67
+ * @param {number} n
68
+ * @param {number} h
69
+ * @returns {Float64Array}
70
+ */
71
+ mapToLocal(e, n, h) {
72
+ try {
73
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
74
+ wasm.georeferencejs_mapToLocal(retptr, this.__wbg_ptr, e, n, h);
75
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
76
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
77
+ var v1 = getArrayF64FromWasm0(r0, r1).slice();
78
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
79
+ return v1;
80
+ } finally {
81
+ wasm.__wbindgen_add_to_stack_pointer(16);
82
+ }
83
+ }
84
+ /**
85
+ * Get rotation angle in radians
308
86
  * @returns {number}
309
87
  */
310
- get eastings() {
311
- const ret = wasm.__wbg_get_georeferencejs_eastings(this.__wbg_ptr);
88
+ get rotation() {
89
+ const ret = wasm.georeferencejs_rotation(this.__wbg_ptr);
312
90
  return ret;
313
91
  }
314
92
  /**
315
- * Eastings (X offset)
316
- * @param {number} arg0
93
+ * Get 4x4 transformation matrix (column-major for WebGL)
94
+ * @returns {Float64Array}
317
95
  */
318
- set eastings(arg0) {
319
- wasm.__wbg_set_georeferencejs_eastings(this.__wbg_ptr, arg0);
96
+ toMatrix() {
97
+ try {
98
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
99
+ wasm.georeferencejs_toMatrix(retptr, this.__wbg_ptr);
100
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
101
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
102
+ var v1 = getArrayF64FromWasm0(r0, r1).slice();
103
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
104
+ return v1;
105
+ } finally {
106
+ wasm.__wbindgen_add_to_stack_pointer(16);
107
+ }
320
108
  }
321
109
  /**
322
- * Northings (Y offset)
110
+ * Eastings (X offset)
323
111
  * @returns {number}
324
112
  */
325
- get northings() {
326
- const ret = wasm.__wbg_get_georeferencejs_northings(this.__wbg_ptr);
113
+ get eastings() {
114
+ const ret = wasm.__wbg_get_georeferencejs_eastings(this.__wbg_ptr);
327
115
  return ret;
328
116
  }
329
117
  /**
330
118
  * Northings (Y offset)
331
- * @param {number} arg0
119
+ * @returns {number}
332
120
  */
333
- set northings(arg0) {
334
- wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
121
+ get northings() {
122
+ const ret = wasm.__wbg_get_georeferencejs_northings(this.__wbg_ptr);
123
+ return ret;
335
124
  }
336
125
  /**
337
126
  * Orthogonal height (Z offset)
@@ -342,11 +131,12 @@ export class GeoReferenceJs {
342
131
  return ret;
343
132
  }
344
133
  /**
345
- * Orthogonal height (Z offset)
346
- * @param {number} arg0
134
+ * Scale factor
135
+ * @returns {number}
347
136
  */
348
- set orthogonal_height(arg0) {
349
- wasm.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr, arg0);
137
+ get scale() {
138
+ const ret = wasm.__wbg_get_georeferencejs_scale(this.__wbg_ptr);
139
+ return ret;
350
140
  }
351
141
  /**
352
142
  * X-axis abscissa (cos of rotation)
@@ -356,13 +146,6 @@ export class GeoReferenceJs {
356
146
  const ret = wasm.__wbg_get_georeferencejs_x_axis_abscissa(this.__wbg_ptr);
357
147
  return ret;
358
148
  }
359
- /**
360
- * X-axis abscissa (cos of rotation)
361
- * @param {number} arg0
362
- */
363
- set x_axis_abscissa(arg0) {
364
- wasm.__wbg_set_georeferencejs_x_axis_abscissa(this.__wbg_ptr, arg0);
365
- }
366
149
  /**
367
150
  * X-axis ordinate (sin of rotation)
368
151
  * @returns {number}
@@ -372,111 +155,46 @@ export class GeoReferenceJs {
372
155
  return ret;
373
156
  }
374
157
  /**
375
- * X-axis ordinate (sin of rotation)
158
+ * Eastings (X offset)
376
159
  * @param {number} arg0
377
160
  */
378
- set x_axis_ordinate(arg0) {
379
- wasm.__wbg_set_georeferencejs_x_axis_ordinate(this.__wbg_ptr, arg0);
380
- }
381
- /**
382
- * Scale factor
383
- * @returns {number}
384
- */
385
- get scale() {
386
- const ret = wasm.__wbg_get_georeferencejs_scale(this.__wbg_ptr);
387
- return ret;
161
+ set eastings(arg0) {
162
+ wasm.__wbg_set_georeferencejs_eastings(this.__wbg_ptr, arg0);
388
163
  }
389
164
  /**
390
- * Scale factor
165
+ * Northings (Y offset)
391
166
  * @param {number} arg0
392
167
  */
393
- set scale(arg0) {
394
- wasm.__wbg_set_georeferencejs_scale(this.__wbg_ptr, arg0);
395
- }
396
- /**
397
- * Transform local coordinates to map coordinates
398
- * @param {number} x
399
- * @param {number} y
400
- * @param {number} z
401
- * @returns {Float64Array}
402
- */
403
- localToMap(x, y, z) {
404
- try {
405
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
406
- wasm.georeferencejs_localToMap(retptr, this.__wbg_ptr, x, y, z);
407
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
408
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
409
- var v1 = getArrayF64FromWasm0(r0, r1).slice();
410
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
411
- return v1;
412
- } finally {
413
- wasm.__wbindgen_add_to_stack_pointer(16);
414
- }
168
+ set northings(arg0) {
169
+ wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
415
170
  }
416
171
  /**
417
- * Transform map coordinates to local coordinates
418
- * @param {number} e
419
- * @param {number} n
420
- * @param {number} h
421
- * @returns {Float64Array}
172
+ * Orthogonal height (Z offset)
173
+ * @param {number} arg0
422
174
  */
423
- mapToLocal(e, n, h) {
424
- try {
425
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
426
- wasm.georeferencejs_mapToLocal(retptr, this.__wbg_ptr, e, n, h);
427
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
428
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
429
- var v1 = getArrayF64FromWasm0(r0, r1).slice();
430
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
431
- return v1;
432
- } finally {
433
- wasm.__wbindgen_add_to_stack_pointer(16);
434
- }
175
+ set orthogonal_height(arg0) {
176
+ wasm.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr, arg0);
435
177
  }
436
178
  /**
437
- * Get CRS name
438
- * @returns {string | undefined}
179
+ * Scale factor
180
+ * @param {number} arg0
439
181
  */
440
- get crsName() {
441
- try {
442
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
443
- wasm.georeferencejs_crsName(retptr, this.__wbg_ptr);
444
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
445
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
446
- let v1;
447
- if (r0 !== 0) {
448
- v1 = getStringFromWasm0(r0, r1).slice();
449
- wasm.__wbindgen_export2(r0, r1 * 1, 1);
450
- }
451
- return v1;
452
- } finally {
453
- wasm.__wbindgen_add_to_stack_pointer(16);
454
- }
182
+ set scale(arg0) {
183
+ wasm.__wbg_set_georeferencejs_scale(this.__wbg_ptr, arg0);
455
184
  }
456
185
  /**
457
- * Get rotation angle in radians
458
- * @returns {number}
186
+ * X-axis abscissa (cos of rotation)
187
+ * @param {number} arg0
459
188
  */
460
- get rotation() {
461
- const ret = wasm.georeferencejs_rotation(this.__wbg_ptr);
462
- return ret;
189
+ set x_axis_abscissa(arg0) {
190
+ wasm.__wbg_set_georeferencejs_x_axis_abscissa(this.__wbg_ptr, arg0);
463
191
  }
464
192
  /**
465
- * Get 4x4 transformation matrix (column-major for WebGL)
466
- * @returns {Float64Array}
193
+ * X-axis ordinate (sin of rotation)
194
+ * @param {number} arg0
467
195
  */
468
- toMatrix() {
469
- try {
470
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
471
- wasm.georeferencejs_toMatrix(retptr, this.__wbg_ptr);
472
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
473
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
474
- var v1 = getArrayF64FromWasm0(r0, r1).slice();
475
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
476
- return v1;
477
- } finally {
478
- wasm.__wbindgen_add_to_stack_pointer(16);
479
- }
196
+ set x_axis_ordinate(arg0) {
197
+ wasm.__wbg_set_georeferencejs_x_axis_ordinate(this.__wbg_ptr, arg0);
480
198
  }
481
199
  }
482
200
  if (Symbol.dispose) GeoReferenceJs.prototype[Symbol.dispose] = GeoReferenceJs.prototype.free;
@@ -510,11 +228,49 @@ export class GpuGeometry {
510
228
  wasm.__wbg_gpugeometry_free(ptr, 0);
511
229
  }
512
230
  /**
513
- * Get number of meshes in this geometry batch
231
+ * Get IFC type name by index
232
+ * @param {number} index
233
+ * @returns {string | undefined}
234
+ */
235
+ getIfcTypeName(index) {
236
+ try {
237
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
238
+ wasm.gpugeometry_getIfcTypeName(retptr, this.__wbg_ptr, index);
239
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
240
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
241
+ let v1;
242
+ if (r0 !== 0) {
243
+ v1 = getStringFromWasm0(r0, r1).slice();
244
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
245
+ }
246
+ return v1;
247
+ } finally {
248
+ wasm.__wbindgen_add_to_stack_pointer(16);
249
+ }
250
+ }
251
+ /**
252
+ * Get metadata for a specific mesh
253
+ * @param {number} index
254
+ * @returns {GpuMeshMetadata | undefined}
255
+ */
256
+ getMeshMetadata(index) {
257
+ const ret = wasm.gpugeometry_getMeshMetadata(this.__wbg_ptr, index);
258
+ return ret === 0 ? undefined : GpuMeshMetadata.__wrap(ret);
259
+ }
260
+ /**
261
+ * Check if RTC offset is active (non-zero)
262
+ * @returns {boolean}
263
+ */
264
+ get hasRtcOffset() {
265
+ const ret = wasm.gpugeometry_hasRtcOffset(this.__wbg_ptr);
266
+ return ret !== 0;
267
+ }
268
+ /**
269
+ * Get byte length of indices (for GPU buffer creation)
514
270
  * @returns {number}
515
271
  */
516
- get meshCount() {
517
- const ret = wasm.gpugeometry_meshCount(this.__wbg_ptr);
272
+ get indicesByteLength() {
273
+ const ret = wasm.gpugeometry_indicesByteLength(this.__wbg_ptr);
518
274
  return ret >>> 0;
519
275
  }
520
276
  /**
@@ -533,6 +289,31 @@ export class GpuGeometry {
533
289
  const ret = wasm.gpugeometry_indicesPtr(this.__wbg_ptr);
534
290
  return ret >>> 0;
535
291
  }
292
+ /**
293
+ * Check if geometry is empty
294
+ * @returns {boolean}
295
+ */
296
+ get isEmpty() {
297
+ const ret = wasm.gpugeometry_isEmpty(this.__wbg_ptr);
298
+ return ret !== 0;
299
+ }
300
+ /**
301
+ * Get number of meshes in this geometry batch
302
+ * @returns {number}
303
+ */
304
+ get meshCount() {
305
+ const ret = wasm.gpugeometry_meshCount(this.__wbg_ptr);
306
+ return ret >>> 0;
307
+ }
308
+ /**
309
+ * Create a new empty GPU geometry container
310
+ */
311
+ constructor() {
312
+ const ret = wasm.gpugeometry_new();
313
+ this.__wbg_ptr = ret >>> 0;
314
+ GpuGeometryFinalization.register(this, this.__wbg_ptr, this);
315
+ return this;
316
+ }
536
317
  /**
537
318
  * Get X component of RTC offset
538
319
  * @returns {number}
@@ -557,14 +338,6 @@ export class GpuGeometry {
557
338
  const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
558
339
  return ret;
559
340
  }
560
- /**
561
- * Check if RTC offset is active (non-zero)
562
- * @returns {boolean}
563
- */
564
- get hasRtcOffset() {
565
- const ret = wasm.gpugeometry_hasRtcOffset(this.__wbg_ptr);
566
- return ret !== 0;
567
- }
568
341
  /**
569
342
  * Set the RTC (Relative To Center) offset applied to coordinates
570
343
  * @param {number} x
@@ -575,54 +348,13 @@ export class GpuGeometry {
575
348
  wasm.gpugeometry_set_rtc_offset(this.__wbg_ptr, x, y, z);
576
349
  }
577
350
  /**
578
- * Get length of vertex data array (in f32 elements, not bytes)
579
- * @returns {number}
580
- */
581
- get vertexDataLen() {
582
- const ret = wasm.gpugeometry_vertexDataLen(this.__wbg_ptr);
583
- return ret >>> 0;
584
- }
585
- /**
586
- * Get pointer to vertex data for zero-copy view
587
- *
588
- * SAFETY: View is only valid until next WASM allocation!
589
- * Create view, upload to GPU, then discard view immediately.
351
+ * Get total triangle count
590
352
  * @returns {number}
591
353
  */
592
- get vertexDataPtr() {
593
- const ret = wasm.gpugeometry_vertexDataPtr(this.__wbg_ptr);
354
+ get totalTriangleCount() {
355
+ const ret = wasm.gpugeometry_totalTriangleCount(this.__wbg_ptr);
594
356
  return ret >>> 0;
595
357
  }
596
- /**
597
- * Get IFC type name by index
598
- * @param {number} index
599
- * @returns {string | undefined}
600
- */
601
- getIfcTypeName(index) {
602
- try {
603
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
604
- wasm.gpugeometry_getIfcTypeName(retptr, this.__wbg_ptr, index);
605
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
606
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
607
- let v1;
608
- if (r0 !== 0) {
609
- v1 = getStringFromWasm0(r0, r1).slice();
610
- wasm.__wbindgen_export2(r0, r1 * 1, 1);
611
- }
612
- return v1;
613
- } finally {
614
- wasm.__wbindgen_add_to_stack_pointer(16);
615
- }
616
- }
617
- /**
618
- * Get metadata for a specific mesh
619
- * @param {number} index
620
- * @returns {GpuMeshMetadata | undefined}
621
- */
622
- getMeshMetadata(index) {
623
- const ret = wasm.gpugeometry_getMeshMetadata(this.__wbg_ptr, index);
624
- return ret === 0 ? undefined : GpuMeshMetadata.__wrap(ret);
625
- }
626
358
  /**
627
359
  * Get total vertex count
628
360
  * @returns {number}
@@ -632,46 +364,32 @@ export class GpuGeometry {
632
364
  return ret >>> 0;
633
365
  }
634
366
  /**
635
- * Get byte length of indices (for GPU buffer creation)
367
+ * Get byte length of vertex data (for GPU buffer creation)
636
368
  * @returns {number}
637
369
  */
638
- get indicesByteLength() {
639
- const ret = wasm.gpugeometry_indicesByteLength(this.__wbg_ptr);
370
+ get vertexDataByteLength() {
371
+ const ret = wasm.gpugeometry_vertexDataByteLength(this.__wbg_ptr);
640
372
  return ret >>> 0;
641
373
  }
642
374
  /**
643
- * Get total triangle count
375
+ * Get length of vertex data array (in f32 elements, not bytes)
644
376
  * @returns {number}
645
377
  */
646
- get totalTriangleCount() {
647
- const ret = wasm.gpugeometry_totalTriangleCount(this.__wbg_ptr);
378
+ get vertexDataLen() {
379
+ const ret = wasm.gpugeometry_vertexDataLen(this.__wbg_ptr);
648
380
  return ret >>> 0;
649
381
  }
650
382
  /**
651
- * Get byte length of vertex data (for GPU buffer creation)
383
+ * Get pointer to vertex data for zero-copy view
384
+ *
385
+ * SAFETY: View is only valid until next WASM allocation!
386
+ * Create view, upload to GPU, then discard view immediately.
652
387
  * @returns {number}
653
388
  */
654
- get vertexDataByteLength() {
655
- const ret = wasm.gpugeometry_vertexDataByteLength(this.__wbg_ptr);
389
+ get vertexDataPtr() {
390
+ const ret = wasm.gpugeometry_vertexDataPtr(this.__wbg_ptr);
656
391
  return ret >>> 0;
657
392
  }
658
- /**
659
- * Create a new empty GPU geometry container
660
- */
661
- constructor() {
662
- const ret = wasm.gpugeometry_new();
663
- this.__wbg_ptr = ret >>> 0;
664
- GpuGeometryFinalization.register(this, this.__wbg_ptr, this);
665
- return this;
666
- }
667
- /**
668
- * Check if geometry is empty
669
- * @returns {boolean}
670
- */
671
- get isEmpty() {
672
- const ret = wasm.gpugeometry_isEmpty(this.__wbg_ptr);
673
- return ret !== 0;
674
- }
675
393
  }
676
394
  if (Symbol.dispose) GpuGeometry.prototype[Symbol.dispose] = GpuGeometry.prototype.free;
677
395
 
@@ -711,22 +429,22 @@ export class GpuInstancedGeometry {
711
429
  /**
712
430
  * @returns {number}
713
431
  */
714
- get indicesLen() {
715
- const ret = wasm.gpuinstancedgeometry_indicesLen(this.__wbg_ptr);
432
+ get indicesByteLength() {
433
+ const ret = wasm.gpuinstancedgeometry_indicesByteLength(this.__wbg_ptr);
716
434
  return ret >>> 0;
717
435
  }
718
436
  /**
719
437
  * @returns {number}
720
438
  */
721
- get indicesPtr() {
722
- const ret = wasm.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr);
439
+ get indicesLen() {
440
+ const ret = wasm.gpuinstancedgeometry_indicesLen(this.__wbg_ptr);
723
441
  return ret >>> 0;
724
442
  }
725
443
  /**
726
444
  * @returns {number}
727
445
  */
728
- get vertexCount() {
729
- const ret = wasm.gpuinstancedgeometry_vertexCount(this.__wbg_ptr);
446
+ get indicesPtr() {
447
+ const ret = wasm.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr);
730
448
  return ret >>> 0;
731
449
  }
732
450
  /**
@@ -739,75 +457,75 @@ export class GpuInstancedGeometry {
739
457
  /**
740
458
  * @returns {number}
741
459
  */
742
- get triangleCount() {
743
- const ret = wasm.gpuinstancedgeometry_triangleCount(this.__wbg_ptr);
460
+ get instanceDataByteLength() {
461
+ const ret = wasm.gpuinstancedgeometry_instanceDataByteLength(this.__wbg_ptr);
744
462
  return ret >>> 0;
745
463
  }
746
464
  /**
747
465
  * @returns {number}
748
466
  */
749
- get vertexDataLen() {
750
- const ret = wasm.gpuinstancedgeometry_vertexDataLen(this.__wbg_ptr);
467
+ get instanceDataLen() {
468
+ const ret = wasm.gpuinstancedgeometry_instanceDataLen(this.__wbg_ptr);
751
469
  return ret >>> 0;
752
470
  }
753
471
  /**
754
472
  * @returns {number}
755
473
  */
756
- get vertexDataPtr() {
757
- const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
474
+ get instanceDataPtr() {
475
+ const ret = wasm.gpuinstancedgeometry_instanceDataPtr(this.__wbg_ptr);
758
476
  return ret >>> 0;
759
477
  }
760
478
  /**
761
479
  * @returns {number}
762
480
  */
763
- get instanceDataLen() {
764
- const ret = wasm.gpuinstancedgeometry_instanceDataLen(this.__wbg_ptr);
481
+ get instanceExpressIdsPtr() {
482
+ const ret = wasm.gpuinstancedgeometry_instanceExpressIdsPtr(this.__wbg_ptr);
765
483
  return ret >>> 0;
766
484
  }
767
485
  /**
768
- * @returns {number}
486
+ * Create new instanced geometry
487
+ * @param {bigint} geometry_id
769
488
  */
770
- get instanceDataPtr() {
771
- const ret = wasm.gpuinstancedgeometry_instanceDataPtr(this.__wbg_ptr);
772
- return ret >>> 0;
489
+ constructor(geometry_id) {
490
+ const ret = wasm.gpuinstancedgeometry_new(geometry_id);
491
+ this.__wbg_ptr = ret >>> 0;
492
+ GpuInstancedGeometryFinalization.register(this, this.__wbg_ptr, this);
493
+ return this;
773
494
  }
774
495
  /**
775
496
  * @returns {number}
776
497
  */
777
- get indicesByteLength() {
778
- const ret = wasm.gpuinstancedgeometry_indicesByteLength(this.__wbg_ptr);
498
+ get triangleCount() {
499
+ const ret = wasm.gpuinstancedgeometry_triangleCount(this.__wbg_ptr);
779
500
  return ret >>> 0;
780
501
  }
781
502
  /**
782
503
  * @returns {number}
783
504
  */
784
- get vertexDataByteLength() {
785
- const ret = wasm.gpuinstancedgeometry_vertexDataByteLength(this.__wbg_ptr);
505
+ get vertexCount() {
506
+ const ret = wasm.gpuinstancedgeometry_vertexCount(this.__wbg_ptr);
786
507
  return ret >>> 0;
787
508
  }
788
509
  /**
789
510
  * @returns {number}
790
511
  */
791
- get instanceExpressIdsPtr() {
792
- const ret = wasm.gpuinstancedgeometry_instanceExpressIdsPtr(this.__wbg_ptr);
512
+ get vertexDataByteLength() {
513
+ const ret = wasm.gpuinstancedgeometry_vertexDataByteLength(this.__wbg_ptr);
793
514
  return ret >>> 0;
794
515
  }
795
516
  /**
796
517
  * @returns {number}
797
518
  */
798
- get instanceDataByteLength() {
799
- const ret = wasm.gpuinstancedgeometry_instanceDataByteLength(this.__wbg_ptr);
519
+ get vertexDataLen() {
520
+ const ret = wasm.gpuinstancedgeometry_vertexDataLen(this.__wbg_ptr);
800
521
  return ret >>> 0;
801
522
  }
802
523
  /**
803
- * Create new instanced geometry
804
- * @param {bigint} geometry_id
524
+ * @returns {number}
805
525
  */
806
- constructor(geometry_id) {
807
- const ret = wasm.gpuinstancedgeometry_new(geometry_id);
808
- this.__wbg_ptr = ret >>> 0;
809
- GpuInstancedGeometryFinalization.register(this, this.__wbg_ptr, this);
810
- return this;
526
+ get vertexDataPtr() {
527
+ const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
528
+ return ret >>> 0;
811
529
  }
812
530
  }
813
531
  if (Symbol.dispose) GpuInstancedGeometry.prototype[Symbol.dispose] = GpuInstancedGeometry.prototype.free;
@@ -841,19 +559,6 @@ export class GpuInstancedGeometryCollection {
841
559
  const ret = wasm.gpuinstancedgeometrycollection_get(this.__wbg_ptr, index);
842
560
  return ret === 0 ? undefined : GpuInstancedGeometry.__wrap(ret);
843
561
  }
844
- constructor() {
845
- const ret = wasm.gpuinstancedgeometrycollection_new();
846
- this.__wbg_ptr = ret >>> 0;
847
- GpuInstancedGeometryCollectionFinalization.register(this, this.__wbg_ptr, this);
848
- return this;
849
- }
850
- /**
851
- * @returns {number}
852
- */
853
- get length() {
854
- const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
855
- return ret >>> 0;
856
- }
857
562
  /**
858
563
  * Get geometry by index with zero-copy access
859
564
  * Returns a reference that provides pointer access
@@ -864,6 +569,19 @@ export class GpuInstancedGeometryCollection {
864
569
  const ret = wasm.gpuinstancedgeometrycollection_getRef(this.__wbg_ptr, index);
865
570
  return ret === 0 ? undefined : GpuInstancedGeometryRef.__wrap(ret);
866
571
  }
572
+ /**
573
+ * @returns {number}
574
+ */
575
+ get length() {
576
+ const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
577
+ return ret >>> 0;
578
+ }
579
+ constructor() {
580
+ const ret = wasm.gpuinstancedgeometrycollection_new();
581
+ this.__wbg_ptr = ret >>> 0;
582
+ GpuInstancedGeometryCollectionFinalization.register(this, this.__wbg_ptr, this);
583
+ return this;
584
+ }
867
585
  }
868
586
  if (Symbol.dispose) GpuInstancedGeometryCollection.prototype[Symbol.dispose] = GpuInstancedGeometryCollection.prototype.free;
869
587
 
@@ -896,6 +614,13 @@ export class GpuInstancedGeometryRef {
896
614
  const ret = wasm.gpuinstancedgeometryref_geometryId(this.__wbg_ptr);
897
615
  return BigInt.asUintN(64, ret);
898
616
  }
617
+ /**
618
+ * @returns {number}
619
+ */
620
+ get indicesByteLength() {
621
+ const ret = wasm.gpuinstancedgeometryref_indicesByteLength(this.__wbg_ptr);
622
+ return ret >>> 0;
623
+ }
899
624
  /**
900
625
  * @returns {number}
901
626
  */
@@ -920,15 +645,8 @@ export class GpuInstancedGeometryRef {
920
645
  /**
921
646
  * @returns {number}
922
647
  */
923
- get vertexDataLen() {
924
- const ret = wasm.gpuinstancedgeometryref_vertexDataLen(this.__wbg_ptr);
925
- return ret >>> 0;
926
- }
927
- /**
928
- * @returns {number}
929
- */
930
- get vertexDataPtr() {
931
- const ret = wasm.gpuinstancedgeometryref_vertexDataPtr(this.__wbg_ptr);
648
+ get instanceDataByteLength() {
649
+ const ret = wasm.gpuinstancedgeometryref_instanceDataByteLength(this.__wbg_ptr);
932
650
  return ret >>> 0;
933
651
  }
934
652
  /**
@@ -948,8 +666,8 @@ export class GpuInstancedGeometryRef {
948
666
  /**
949
667
  * @returns {number}
950
668
  */
951
- get indicesByteLength() {
952
- const ret = wasm.gpuinstancedgeometryref_indicesByteLength(this.__wbg_ptr);
669
+ get instanceExpressIdsPtr() {
670
+ const ret = wasm.gpuinstancedgeometryref_instanceExpressIdsPtr(this.__wbg_ptr);
953
671
  return ret >>> 0;
954
672
  }
955
673
  /**
@@ -962,15 +680,15 @@ export class GpuInstancedGeometryRef {
962
680
  /**
963
681
  * @returns {number}
964
682
  */
965
- get instanceExpressIdsPtr() {
966
- const ret = wasm.gpuinstancedgeometryref_instanceExpressIdsPtr(this.__wbg_ptr);
683
+ get vertexDataLen() {
684
+ const ret = wasm.gpuinstancedgeometryref_vertexDataLen(this.__wbg_ptr);
967
685
  return ret >>> 0;
968
686
  }
969
687
  /**
970
688
  * @returns {number}
971
689
  */
972
- get instanceDataByteLength() {
973
- const ret = wasm.gpuinstancedgeometryref_instanceDataByteLength(this.__wbg_ptr);
690
+ get vertexDataPtr() {
691
+ const ret = wasm.gpuinstancedgeometryref_vertexDataPtr(this.__wbg_ptr);
974
692
  return ret >>> 0;
975
693
  }
976
694
  }
@@ -998,17 +716,26 @@ export class GpuMeshMetadata {
998
716
  wasm.__wbg_gpumeshmetadata_free(ptr, 0);
999
717
  }
1000
718
  /**
1001
- * @returns {number}
719
+ * @returns {Float32Array}
1002
720
  */
1003
- get expressId() {
1004
- const ret = wasm.gpumeshmetadata_expressId(this.__wbg_ptr);
1005
- return ret >>> 0;
721
+ get color() {
722
+ try {
723
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
724
+ wasm.gpumeshmetadata_color(retptr, this.__wbg_ptr);
725
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
726
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
727
+ var v1 = getArrayF32FromWasm0(r0, r1).slice();
728
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
729
+ return v1;
730
+ } finally {
731
+ wasm.__wbindgen_add_to_stack_pointer(16);
732
+ }
1006
733
  }
1007
734
  /**
1008
735
  * @returns {number}
1009
736
  */
1010
- get indexCount() {
1011
- const ret = wasm.gpumeshmetadata_indexCount(this.__wbg_ptr);
737
+ get expressId() {
738
+ const ret = wasm.gpumeshmetadata_expressId(this.__wbg_ptr);
1012
739
  return ret >>> 0;
1013
740
  }
1014
741
  /**
@@ -1018,6 +745,13 @@ export class GpuMeshMetadata {
1018
745
  const ret = wasm.gpumeshmetadata_ifcTypeIdx(this.__wbg_ptr);
1019
746
  return ret;
1020
747
  }
748
+ /**
749
+ * @returns {number}
750
+ */
751
+ get indexCount() {
752
+ const ret = wasm.gpumeshmetadata_indexCount(this.__wbg_ptr);
753
+ return ret >>> 0;
754
+ }
1021
755
  /**
1022
756
  * @returns {number}
1023
757
  */
@@ -1039,22 +773,6 @@ export class GpuMeshMetadata {
1039
773
  const ret = wasm.gpumeshmetadata_vertexOffset(this.__wbg_ptr);
1040
774
  return ret >>> 0;
1041
775
  }
1042
- /**
1043
- * @returns {Float32Array}
1044
- */
1045
- get color() {
1046
- try {
1047
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1048
- wasm.gpumeshmetadata_color(retptr, this.__wbg_ptr);
1049
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1050
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1051
- var v1 = getArrayF32FromWasm0(r0, r1).slice();
1052
- wasm.__wbindgen_export2(r0, r1 * 4, 4);
1053
- return v1;
1054
- } finally {
1055
- wasm.__wbindgen_add_to_stack_pointer(16);
1056
- }
1057
- }
1058
776
  }
1059
777
  if (Symbol.dispose) GpuMeshMetadata.prototype[Symbol.dispose] = GpuMeshMetadata.prototype.free;
1060
778
 
@@ -1073,108 +791,139 @@ export class IfcAPI {
1073
791
  wasm.__wbg_ifcapi_free(ptr, 0);
1074
792
  }
1075
793
  /**
1076
- * Get WASM memory for zero-copy access
1077
- * @returns {any}
794
+ * Debug: Test processing entity #953 (FacetedBrep wall)
795
+ * @param {string} content
796
+ * @returns {string}
1078
797
  */
1079
- getMemory() {
1080
- const ret = wasm.ifcapi_getMemory(this.__wbg_ptr);
1081
- return takeObject(ret);
798
+ debugProcessEntity953(content) {
799
+ let deferred2_0;
800
+ let deferred2_1;
801
+ try {
802
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
803
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
804
+ const len0 = WASM_VECTOR_LEN;
805
+ wasm.ifcapi_debugProcessEntity953(retptr, this.__wbg_ptr, ptr0, len0);
806
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
807
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
808
+ deferred2_0 = r0;
809
+ deferred2_1 = r1;
810
+ return getStringFromWasm0(r0, r1);
811
+ } finally {
812
+ wasm.__wbindgen_add_to_stack_pointer(16);
813
+ wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
814
+ }
1082
815
  }
1083
816
  /**
1084
- * Parse IFC file and return individual meshes with express IDs and colors
1085
- * This matches the MeshData[] format expected by the viewer
1086
- *
1087
- * Example:
1088
- * ```javascript
1089
- * const api = new IfcAPI();
1090
- * const collection = api.parseMeshes(ifcData);
1091
- * for (let i = 0; i < collection.length; i++) {
1092
- * const mesh = collection.get(i);
1093
- * console.log('Express ID:', mesh.expressId);
1094
- * console.log('Positions:', mesh.positions);
1095
- * console.log('Color:', mesh.color);
1096
- * }
1097
- * ```
817
+ * Debug: Test processing a single wall
1098
818
  * @param {string} content
1099
- * @returns {MeshCollection}
819
+ * @returns {string}
1100
820
  */
1101
- parseMeshes(content) {
1102
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1103
- const len0 = WASM_VECTOR_LEN;
1104
- const ret = wasm.ifcapi_parseMeshes(this.__wbg_ptr, ptr0, len0);
1105
- return MeshCollection.__wrap(ret);
821
+ debugProcessFirstWall(content) {
822
+ let deferred2_0;
823
+ let deferred2_1;
824
+ try {
825
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
826
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
827
+ const len0 = WASM_VECTOR_LEN;
828
+ wasm.ifcapi_debugProcessFirstWall(retptr, this.__wbg_ptr, ptr0, len0);
829
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
830
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
831
+ deferred2_0 = r0;
832
+ deferred2_1 = r1;
833
+ return getStringFromWasm0(r0, r1);
834
+ } finally {
835
+ wasm.__wbindgen_add_to_stack_pointer(16);
836
+ wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
837
+ }
1106
838
  }
1107
839
  /**
1108
- * Parse IFC file with streaming events
1109
- * Calls the callback function for each parse event
840
+ * Extract georeferencing information from IFC content
841
+ * Returns null if no georeferencing is present
1110
842
  *
1111
843
  * Example:
1112
844
  * ```javascript
1113
845
  * const api = new IfcAPI();
1114
- * await api.parseStreaming(ifcData, (event) => {
1115
- * console.log('Event:', event);
1116
- * });
846
+ * const georef = api.getGeoReference(ifcData);
847
+ * if (georef) {
848
+ * console.log('CRS:', georef.crsName);
849
+ * const [e, n, h] = georef.localToMap(10, 20, 5);
850
+ * }
1117
851
  * ```
1118
852
  * @param {string} content
1119
- * @param {Function} callback
1120
- * @returns {Promise<any>}
853
+ * @returns {GeoReferenceJs | undefined}
1121
854
  */
1122
- parseStreaming(content, callback) {
855
+ getGeoReference(content) {
1123
856
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1124
857
  const len0 = WASM_VECTOR_LEN;
1125
- const ret = wasm.ifcapi_parseStreaming(this.__wbg_ptr, ptr0, len0, addHeapObject(callback));
858
+ const ret = wasm.ifcapi_getGeoReference(this.__wbg_ptr, ptr0, len0);
859
+ return ret === 0 ? undefined : GeoReferenceJs.__wrap(ret);
860
+ }
861
+ /**
862
+ * Get WASM memory for zero-copy access
863
+ * @returns {any}
864
+ */
865
+ getMemory() {
866
+ const ret = wasm.ifcapi_getMemory(this.__wbg_ptr);
1126
867
  return takeObject(ret);
1127
868
  }
1128
869
  /**
1129
- * Parse IFC file with zero-copy mesh data
1130
- * Maximum performance - returns mesh with direct memory access
870
+ * Check if API is initialized
871
+ * @returns {boolean}
872
+ */
873
+ get is_ready() {
874
+ const ret = wasm.ifcapi_is_ready(this.__wbg_ptr);
875
+ return ret !== 0;
876
+ }
877
+ /**
878
+ * Create and initialize the IFC API
879
+ */
880
+ constructor() {
881
+ const ret = wasm.ifcapi_new();
882
+ this.__wbg_ptr = ret >>> 0;
883
+ IfcAPIFinalization.register(this, this.__wbg_ptr, this);
884
+ return this;
885
+ }
886
+ /**
887
+ * Parse IFC file (traditional - waits for completion)
1131
888
  *
1132
889
  * Example:
1133
890
  * ```javascript
1134
891
  * const api = new IfcAPI();
1135
- * const mesh = await api.parseZeroCopy(ifcData);
1136
- *
1137
- * // Create TypedArray views (NO COPYING!)
1138
- * const memory = await api.getMemory();
1139
- * const positions = new Float32Array(
1140
- * memory.buffer,
1141
- * mesh.positions_ptr,
1142
- * mesh.positions_len
1143
- * );
1144
- *
1145
- * // Upload directly to GPU
1146
- * gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);
892
+ * const result = await api.parse(ifcData);
893
+ * console.log('Entities:', result.entityCount);
1147
894
  * ```
1148
895
  * @param {string} content
1149
- * @returns {ZeroCopyMesh}
896
+ * @returns {Promise<any>}
1150
897
  */
1151
- parseZeroCopy(content) {
898
+ parse(content) {
1152
899
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1153
900
  const len0 = WASM_VECTOR_LEN;
1154
- const ret = wasm.ifcapi_parseZeroCopy(this.__wbg_ptr, ptr0, len0);
1155
- return ZeroCopyMesh.__wrap(ret);
901
+ const ret = wasm.ifcapi_parse(this.__wbg_ptr, ptr0, len0);
902
+ return takeObject(ret);
1156
903
  }
1157
904
  /**
1158
- * Extract georeferencing information from IFC content
1159
- * Returns null if no georeferencing is present
905
+ * Parse IFC file and return individual meshes with express IDs and colors
906
+ * This matches the MeshData[] format expected by the viewer
1160
907
  *
1161
908
  * Example:
1162
909
  * ```javascript
1163
910
  * const api = new IfcAPI();
1164
- * const georef = api.getGeoReference(ifcData);
1165
- * if (georef) {
1166
- * console.log('CRS:', georef.crsName);
1167
- * const [e, n, h] = georef.localToMap(10, 20, 5);
911
+ * const collection = api.parseMeshes(ifcData);
912
+ * for (let i = 0; i < collection.length; i++) {
913
+ * const mesh = collection.get(i);
914
+ * console.log('Express ID:', mesh.expressId);
915
+ * console.log('Positions:', mesh.positions);
916
+ * console.log('Color:', mesh.color);
1168
917
  * }
1169
918
  * ```
1170
919
  * @param {string} content
1171
- * @returns {GeoReferenceJs | undefined}
920
+ * @returns {MeshCollection}
1172
921
  */
1173
- getGeoReference(content) {
922
+ parseMeshes(content) {
1174
923
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1175
924
  const len0 = WASM_VECTOR_LEN;
1176
- const ret = wasm.ifcapi_getGeoReference(this.__wbg_ptr, ptr0, len0);
1177
- return ret === 0 ? undefined : GeoReferenceJs.__wrap(ret);
925
+ const ret = wasm.ifcapi_parseMeshes(this.__wbg_ptr, ptr0, len0);
926
+ return MeshCollection.__wrap(ret);
1178
927
  }
1179
928
  /**
1180
929
  * Parse IFC file with streaming mesh batches for progressive rendering
@@ -1221,16 +970,61 @@ export class IfcAPI {
1221
970
  return takeObject(ret);
1222
971
  }
1223
972
  /**
1224
- * Fast entity scanning using SIMD-accelerated Rust scanner
1225
- * Returns array of entity references for data model parsing
1226
- * Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
973
+ * Parse IFC file and return instanced geometry grouped by geometry hash
974
+ * This reduces draw calls by grouping identical geometries with different transforms
975
+ *
976
+ * Example:
977
+ * ```javascript
978
+ * const api = new IfcAPI();
979
+ * const collection = api.parseMeshesInstanced(ifcData);
980
+ * for (let i = 0; i < collection.length; i++) {
981
+ * const geometry = collection.get(i);
982
+ * console.log('Geometry ID:', geometry.geometryId);
983
+ * console.log('Instances:', geometry.instanceCount);
984
+ * for (let j = 0; j < geometry.instanceCount; j++) {
985
+ * const inst = geometry.getInstance(j);
986
+ * console.log(' Express ID:', inst.expressId);
987
+ * console.log(' Transform:', inst.transform);
988
+ * }
989
+ * }
990
+ * ```
1227
991
  * @param {string} content
1228
- * @returns {any}
992
+ * @returns {InstancedMeshCollection}
1229
993
  */
1230
- scanEntitiesFast(content) {
994
+ parseMeshesInstanced(content) {
1231
995
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1232
996
  const len0 = WASM_VECTOR_LEN;
1233
- const ret = wasm.ifcapi_scanEntitiesFast(this.__wbg_ptr, ptr0, len0);
997
+ const ret = wasm.ifcapi_parseMeshesInstanced(this.__wbg_ptr, ptr0, len0);
998
+ return InstancedMeshCollection.__wrap(ret);
999
+ }
1000
+ /**
1001
+ * Parse IFC file with streaming instanced geometry batches for progressive rendering
1002
+ * Groups identical geometries and yields batches of InstancedGeometry
1003
+ * Uses fast-first-frame streaming: simple geometry (walls, slabs) first
1004
+ *
1005
+ * Example:
1006
+ * ```javascript
1007
+ * const api = new IfcAPI();
1008
+ * await api.parseMeshesInstancedAsync(ifcData, {
1009
+ * batchSize: 25, // Number of unique geometries per batch
1010
+ * onBatch: (geometries, progress) => {
1011
+ * for (const geom of geometries) {
1012
+ * renderer.addInstancedGeometry(geom);
1013
+ * }
1014
+ * },
1015
+ * onComplete: (stats) => {
1016
+ * console.log(`Done! ${stats.totalGeometries} unique geometries, ${stats.totalInstances} instances`);
1017
+ * }
1018
+ * });
1019
+ * ```
1020
+ * @param {string} content
1021
+ * @param {any} options
1022
+ * @returns {Promise<any>}
1023
+ */
1024
+ parseMeshesInstancedAsync(content, options) {
1025
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1026
+ const len0 = WASM_VECTOR_LEN;
1027
+ const ret = wasm.ifcapi_parseMeshesInstancedAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1234
1028
  return takeObject(ret);
1235
1029
  }
1236
1030
  /**
@@ -1258,6 +1052,50 @@ export class IfcAPI {
1258
1052
  const ret = wasm.ifcapi_parseMeshesWithRtc(this.__wbg_ptr, ptr0, len0);
1259
1053
  return MeshCollectionWithRtc.__wrap(ret);
1260
1054
  }
1055
+ /**
1056
+ * Parse IFC file with streaming events
1057
+ * Calls the callback function for each parse event
1058
+ *
1059
+ * Example:
1060
+ * ```javascript
1061
+ * const api = new IfcAPI();
1062
+ * await api.parseStreaming(ifcData, (event) => {
1063
+ * console.log('Event:', event);
1064
+ * });
1065
+ * ```
1066
+ * @param {string} content
1067
+ * @param {Function} callback
1068
+ * @returns {Promise<any>}
1069
+ */
1070
+ parseStreaming(content, callback) {
1071
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1072
+ const len0 = WASM_VECTOR_LEN;
1073
+ const ret = wasm.ifcapi_parseStreaming(this.__wbg_ptr, ptr0, len0, addHeapObject(callback));
1074
+ return takeObject(ret);
1075
+ }
1076
+ /**
1077
+ * Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
1078
+ * These are 2D curves used for architectural drawings instead of sectioning 3D geometry
1079
+ *
1080
+ * Example:
1081
+ * ```javascript
1082
+ * const api = new IfcAPI();
1083
+ * const symbols = api.parseSymbolicRepresentations(ifcData);
1084
+ * console.log('Found', symbols.totalCount, 'symbolic items');
1085
+ * for (let i = 0; i < symbols.polylineCount; i++) {
1086
+ * const polyline = symbols.getPolyline(i);
1087
+ * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
1088
+ * }
1089
+ * ```
1090
+ * @param {string} content
1091
+ * @returns {SymbolicRepresentationCollection}
1092
+ */
1093
+ parseSymbolicRepresentations(content) {
1094
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1095
+ const len0 = WASM_VECTOR_LEN;
1096
+ const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
1097
+ return SymbolicRepresentationCollection.__wrap(ret);
1098
+ }
1261
1099
  /**
1262
1100
  * Parse IFC file and return GPU-ready geometry for zero-copy upload
1263
1101
  *
@@ -1302,80 +1140,6 @@ export class IfcAPI {
1302
1140
  const ret = wasm.ifcapi_parseToGpuGeometry(this.__wbg_ptr, ptr0, len0);
1303
1141
  return GpuGeometry.__wrap(ret);
1304
1142
  }
1305
- /**
1306
- * Parse IFC file and return instanced geometry grouped by geometry hash
1307
- * This reduces draw calls by grouping identical geometries with different transforms
1308
- *
1309
- * Example:
1310
- * ```javascript
1311
- * const api = new IfcAPI();
1312
- * const collection = api.parseMeshesInstanced(ifcData);
1313
- * for (let i = 0; i < collection.length; i++) {
1314
- * const geometry = collection.get(i);
1315
- * console.log('Geometry ID:', geometry.geometryId);
1316
- * console.log('Instances:', geometry.instanceCount);
1317
- * for (let j = 0; j < geometry.instanceCount; j++) {
1318
- * const inst = geometry.getInstance(j);
1319
- * console.log(' Express ID:', inst.expressId);
1320
- * console.log(' Transform:', inst.transform);
1321
- * }
1322
- * }
1323
- * ```
1324
- * @param {string} content
1325
- * @returns {InstancedMeshCollection}
1326
- */
1327
- parseMeshesInstanced(content) {
1328
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1329
- const len0 = WASM_VECTOR_LEN;
1330
- const ret = wasm.ifcapi_parseMeshesInstanced(this.__wbg_ptr, ptr0, len0);
1331
- return InstancedMeshCollection.__wrap(ret);
1332
- }
1333
- /**
1334
- * Debug: Test processing entity #953 (FacetedBrep wall)
1335
- * @param {string} content
1336
- * @returns {string}
1337
- */
1338
- debugProcessEntity953(content) {
1339
- let deferred2_0;
1340
- let deferred2_1;
1341
- try {
1342
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1343
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1344
- const len0 = WASM_VECTOR_LEN;
1345
- wasm.ifcapi_debugProcessEntity953(retptr, this.__wbg_ptr, ptr0, len0);
1346
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1347
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1348
- deferred2_0 = r0;
1349
- deferred2_1 = r1;
1350
- return getStringFromWasm0(r0, r1);
1351
- } finally {
1352
- wasm.__wbindgen_add_to_stack_pointer(16);
1353
- wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
1354
- }
1355
- }
1356
- /**
1357
- * Debug: Test processing a single wall
1358
- * @param {string} content
1359
- * @returns {string}
1360
- */
1361
- debugProcessFirstWall(content) {
1362
- let deferred2_0;
1363
- let deferred2_1;
1364
- try {
1365
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1366
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1367
- const len0 = WASM_VECTOR_LEN;
1368
- wasm.ifcapi_debugProcessFirstWall(retptr, this.__wbg_ptr, ptr0, len0);
1369
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1370
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1371
- deferred2_0 = r0;
1372
- deferred2_1 = r1;
1373
- return getStringFromWasm0(r0, r1);
1374
- } finally {
1375
- wasm.__wbindgen_add_to_stack_pointer(16);
1376
- wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
1377
- }
1378
- }
1379
1143
  /**
1380
1144
  * Parse IFC file with streaming GPU-ready geometry batches
1381
1145
  *
@@ -1419,111 +1183,73 @@ export class IfcAPI {
1419
1183
  return takeObject(ret);
1420
1184
  }
1421
1185
  /**
1422
- * Fast geometry-only entity scanning
1423
- * Scans only entities that have geometry, skipping 99% of non-geometry entities
1424
- * Returns array of geometry entity references for parallel processing
1425
- * Much faster than scanning all entities (3x speedup for large files)
1426
- * @param {string} content
1427
- * @returns {any}
1428
- */
1429
- scanGeometryEntitiesFast(content) {
1430
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1431
- const len0 = WASM_VECTOR_LEN;
1432
- const ret = wasm.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, ptr0, len0);
1433
- return takeObject(ret);
1434
- }
1435
- /**
1436
- * Parse IFC file with streaming instanced geometry batches for progressive rendering
1437
- * Groups identical geometries and yields batches of InstancedGeometry
1438
- * Uses fast-first-frame streaming: simple geometry (walls, slabs) first
1186
+ * Parse IFC file to GPU-ready instanced geometry for zero-copy upload
1439
1187
  *
1440
- * Example:
1441
- * ```javascript
1442
- * const api = new IfcAPI();
1443
- * await api.parseMeshesInstancedAsync(ifcData, {
1444
- * batchSize: 25, // Number of unique geometries per batch
1445
- * onBatch: (geometries, progress) => {
1446
- * for (const geom of geometries) {
1447
- * renderer.addInstancedGeometry(geom);
1448
- * }
1449
- * },
1450
- * onComplete: (stats) => {
1451
- * console.log(`Done! ${stats.totalGeometries} unique geometries, ${stats.totalInstances} instances`);
1452
- * }
1453
- * });
1454
- * ```
1188
+ * Groups identical geometries by hash for efficient GPU instancing.
1189
+ * Returns a collection of instanced geometries with pointer access.
1455
1190
  * @param {string} content
1456
- * @param {any} options
1457
- * @returns {Promise<any>}
1191
+ * @returns {GpuInstancedGeometryCollection}
1458
1192
  */
1459
- parseMeshesInstancedAsync(content, options) {
1193
+ parseToGpuInstancedGeometry(content) {
1460
1194
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1461
1195
  const len0 = WASM_VECTOR_LEN;
1462
- const ret = wasm.ifcapi_parseMeshesInstancedAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1463
- return takeObject(ret);
1196
+ const ret = wasm.ifcapi_parseToGpuInstancedGeometry(this.__wbg_ptr, ptr0, len0);
1197
+ return GpuInstancedGeometryCollection.__wrap(ret);
1464
1198
  }
1465
1199
  /**
1466
- * Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
1467
- * These are 2D curves used for architectural drawings instead of sectioning 3D geometry
1200
+ * Parse IFC file with zero-copy mesh data
1201
+ * Maximum performance - returns mesh with direct memory access
1468
1202
  *
1469
1203
  * Example:
1470
1204
  * ```javascript
1471
1205
  * const api = new IfcAPI();
1472
- * const symbols = api.parseSymbolicRepresentations(ifcData);
1473
- * console.log('Found', symbols.totalCount, 'symbolic items');
1474
- * for (let i = 0; i < symbols.polylineCount; i++) {
1475
- * const polyline = symbols.getPolyline(i);
1476
- * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
1477
- * }
1206
+ * const mesh = await api.parseZeroCopy(ifcData);
1207
+ *
1208
+ * // Create TypedArray views (NO COPYING!)
1209
+ * const memory = await api.getMemory();
1210
+ * const positions = new Float32Array(
1211
+ * memory.buffer,
1212
+ * mesh.positions_ptr,
1213
+ * mesh.positions_len
1214
+ * );
1215
+ *
1216
+ * // Upload directly to GPU
1217
+ * gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);
1478
1218
  * ```
1479
1219
  * @param {string} content
1480
- * @returns {SymbolicRepresentationCollection}
1220
+ * @returns {ZeroCopyMesh}
1481
1221
  */
1482
- parseSymbolicRepresentations(content) {
1222
+ parseZeroCopy(content) {
1483
1223
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1484
1224
  const len0 = WASM_VECTOR_LEN;
1485
- const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
1486
- return SymbolicRepresentationCollection.__wrap(ret);
1225
+ const ret = wasm.ifcapi_parseZeroCopy(this.__wbg_ptr, ptr0, len0);
1226
+ return ZeroCopyMesh.__wrap(ret);
1487
1227
  }
1488
1228
  /**
1489
- * Parse IFC file to GPU-ready instanced geometry for zero-copy upload
1490
- *
1491
- * Groups identical geometries by hash for efficient GPU instancing.
1492
- * Returns a collection of instanced geometries with pointer access.
1229
+ * Fast entity scanning using SIMD-accelerated Rust scanner
1230
+ * Returns array of entity references for data model parsing
1231
+ * Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
1493
1232
  * @param {string} content
1494
- * @returns {GpuInstancedGeometryCollection}
1233
+ * @returns {any}
1495
1234
  */
1496
- parseToGpuInstancedGeometry(content) {
1235
+ scanEntitiesFast(content) {
1497
1236
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1498
1237
  const len0 = WASM_VECTOR_LEN;
1499
- const ret = wasm.ifcapi_parseToGpuInstancedGeometry(this.__wbg_ptr, ptr0, len0);
1500
- return GpuInstancedGeometryCollection.__wrap(ret);
1501
- }
1502
- /**
1503
- * Create and initialize the IFC API
1504
- */
1505
- constructor() {
1506
- const ret = wasm.ifcapi_new();
1507
- this.__wbg_ptr = ret >>> 0;
1508
- IfcAPIFinalization.register(this, this.__wbg_ptr, this);
1509
- return this;
1238
+ const ret = wasm.ifcapi_scanEntitiesFast(this.__wbg_ptr, ptr0, len0);
1239
+ return takeObject(ret);
1510
1240
  }
1511
1241
  /**
1512
- * Parse IFC file (traditional - waits for completion)
1513
- *
1514
- * Example:
1515
- * ```javascript
1516
- * const api = new IfcAPI();
1517
- * const result = await api.parse(ifcData);
1518
- * console.log('Entities:', result.entityCount);
1519
- * ```
1242
+ * Fast geometry-only entity scanning
1243
+ * Scans only entities that have geometry, skipping 99% of non-geometry entities
1244
+ * Returns array of geometry entity references for parallel processing
1245
+ * Much faster than scanning all entities (3x speedup for large files)
1520
1246
  * @param {string} content
1521
- * @returns {Promise<any>}
1247
+ * @returns {any}
1522
1248
  */
1523
- parse(content) {
1249
+ scanGeometryEntitiesFast(content) {
1524
1250
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1525
1251
  const len0 = WASM_VECTOR_LEN;
1526
- const ret = wasm.ifcapi_parse(this.__wbg_ptr, ptr0, len0);
1252
+ const ret = wasm.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, ptr0, len0);
1527
1253
  return takeObject(ret);
1528
1254
  }
1529
1255
  /**
@@ -1546,14 +1272,6 @@ export class IfcAPI {
1546
1272
  wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
1547
1273
  }
1548
1274
  }
1549
- /**
1550
- * Check if API is initialized
1551
- * @returns {boolean}
1552
- */
1553
- get is_ready() {
1554
- const ret = wasm.ifcapi_is_ready(this.__wbg_ptr);
1555
- return ret !== 0;
1556
- }
1557
1275
  }
1558
1276
  if (Symbol.dispose) IfcAPI.prototype[Symbol.dispose] = IfcAPI.prototype.free;
1559
1277
 
@@ -1578,13 +1296,6 @@ export class InstanceData {
1578
1296
  const ptr = this.__destroy_into_raw();
1579
1297
  wasm.__wbg_instancedata_free(ptr, 0);
1580
1298
  }
1581
- /**
1582
- * @returns {number}
1583
- */
1584
- get expressId() {
1585
- const ret = wasm.instancedata_expressId(this.__wbg_ptr);
1586
- return ret >>> 0;
1587
- }
1588
1299
  /**
1589
1300
  * @returns {Float32Array}
1590
1301
  */
@@ -1601,6 +1312,13 @@ export class InstanceData {
1601
1312
  wasm.__wbindgen_add_to_stack_pointer(16);
1602
1313
  }
1603
1314
  }
1315
+ /**
1316
+ * @returns {number}
1317
+ */
1318
+ get expressId() {
1319
+ const ret = wasm.instancedata_expressId(this.__wbg_ptr);
1320
+ return ret >>> 0;
1321
+ }
1604
1322
  /**
1605
1323
  * @returns {Float32Array}
1606
1324
  */
@@ -1647,13 +1365,6 @@ export class InstancedGeometry {
1647
1365
  const ret = wasm.instancedgeometry_get_instance(this.__wbg_ptr, index);
1648
1366
  return ret === 0 ? undefined : InstanceData.__wrap(ret);
1649
1367
  }
1650
- /**
1651
- * @returns {number}
1652
- */
1653
- get instance_count() {
1654
- const ret = wasm.instancedgeometry_instance_count(this.__wbg_ptr);
1655
- return ret >>> 0;
1656
- }
1657
1368
  /**
1658
1369
  * @returns {Uint32Array}
1659
1370
  */
@@ -1661,6 +1372,13 @@ export class InstancedGeometry {
1661
1372
  const ret = wasm.instancedgeometry_indices(this.__wbg_ptr);
1662
1373
  return takeObject(ret);
1663
1374
  }
1375
+ /**
1376
+ * @returns {number}
1377
+ */
1378
+ get instance_count() {
1379
+ const ret = wasm.instancedgeometry_instance_count(this.__wbg_ptr);
1380
+ return ret >>> 0;
1381
+ }
1664
1382
  /**
1665
1383
  * @returns {Float32Array}
1666
1384
  */
@@ -1700,32 +1418,32 @@ export class InstancedMeshCollection {
1700
1418
  wasm.__wbg_instancedmeshcollection_free(ptr, 0);
1701
1419
  }
1702
1420
  /**
1703
- * @returns {number}
1421
+ * @param {number} index
1422
+ * @returns {InstancedGeometry | undefined}
1704
1423
  */
1705
- get totalInstances() {
1706
- const ret = wasm.instancedmeshcollection_totalInstances(this.__wbg_ptr);
1707
- return ret >>> 0;
1424
+ get(index) {
1425
+ const ret = wasm.instancedmeshcollection_get(this.__wbg_ptr, index);
1426
+ return ret === 0 ? undefined : InstancedGeometry.__wrap(ret);
1708
1427
  }
1709
1428
  /**
1710
1429
  * @returns {number}
1711
1430
  */
1712
- get totalGeometries() {
1431
+ get length() {
1713
1432
  const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
1714
1433
  return ret >>> 0;
1715
1434
  }
1716
1435
  /**
1717
- * @param {number} index
1718
- * @returns {InstancedGeometry | undefined}
1436
+ * @returns {number}
1719
1437
  */
1720
- get(index) {
1721
- const ret = wasm.instancedmeshcollection_get(this.__wbg_ptr, index);
1722
- return ret === 0 ? undefined : InstancedGeometry.__wrap(ret);
1438
+ get totalGeometries() {
1439
+ const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
1440
+ return ret >>> 0;
1723
1441
  }
1724
1442
  /**
1725
1443
  * @returns {number}
1726
1444
  */
1727
- get length() {
1728
- const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
1445
+ get totalInstances() {
1446
+ const ret = wasm.instancedmeshcollection_totalInstances(this.__wbg_ptr);
1729
1447
  return ret >>> 0;
1730
1448
  }
1731
1449
  }
@@ -1753,29 +1471,29 @@ export class MeshCollection {
1753
1471
  wasm.__wbg_meshcollection_free(ptr, 0);
1754
1472
  }
1755
1473
  /**
1756
- * Get RTC offset X (for converting local coords back to world coords)
1757
- * Add this to local X coordinates to get world X coordinates
1758
- * @returns {number}
1759
- */
1760
- get rtcOffsetX() {
1761
- const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
1762
- return ret;
1763
- }
1764
- /**
1765
- * Get RTC offset Y
1766
- * @returns {number}
1474
+ * Get building rotation angle in radians (from IfcSite placement)
1475
+ * Returns None if no rotation was detected
1476
+ * @returns {number | undefined}
1767
1477
  */
1768
- get rtcOffsetY() {
1769
- const ret = wasm.meshcollection_rtcOffsetY(this.__wbg_ptr);
1770
- return ret;
1478
+ get buildingRotation() {
1479
+ try {
1480
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1481
+ wasm.meshcollection_buildingRotation(retptr, this.__wbg_ptr);
1482
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1483
+ var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
1484
+ return r0 === 0 ? undefined : r2;
1485
+ } finally {
1486
+ wasm.__wbindgen_add_to_stack_pointer(16);
1487
+ }
1771
1488
  }
1772
1489
  /**
1773
- * Get RTC offset Z
1774
- * @returns {number}
1490
+ * Get mesh at index
1491
+ * @param {number} index
1492
+ * @returns {MeshDataJs | undefined}
1775
1493
  */
1776
- get rtcOffsetZ() {
1777
- const ret = wasm.meshcollection_rtcOffsetZ(this.__wbg_ptr);
1778
- return ret;
1494
+ get(index) {
1495
+ const ret = wasm.meshcollection_get(this.__wbg_ptr, index);
1496
+ return ret === 0 ? undefined : MeshDataJs.__wrap(ret);
1779
1497
  }
1780
1498
  /**
1781
1499
  * Check if RTC offset is significant (>10km)
@@ -1785,6 +1503,14 @@ export class MeshCollection {
1785
1503
  const ret = wasm.meshcollection_hasRtcOffset(this.__wbg_ptr);
1786
1504
  return ret !== 0;
1787
1505
  }
1506
+ /**
1507
+ * Get number of meshes
1508
+ * @returns {number}
1509
+ */
1510
+ get length() {
1511
+ const ret = wasm.meshcollection_length(this.__wbg_ptr);
1512
+ return ret >>> 0;
1513
+ }
1788
1514
  /**
1789
1515
  * Convert local coordinates to world coordinates
1790
1516
  * Use this to convert mesh positions back to original IFC coordinates
@@ -1807,52 +1533,44 @@ export class MeshCollection {
1807
1533
  }
1808
1534
  }
1809
1535
  /**
1810
- * Get total vertex count across all meshes
1536
+ * Get RTC offset X (for converting local coords back to world coords)
1537
+ * Add this to local X coordinates to get world X coordinates
1811
1538
  * @returns {number}
1812
1539
  */
1813
- get totalVertices() {
1814
- const ret = wasm.meshcollection_totalVertices(this.__wbg_ptr);
1815
- return ret >>> 0;
1540
+ get rtcOffsetX() {
1541
+ const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
1542
+ return ret;
1816
1543
  }
1817
1544
  /**
1818
- * Get total triangle count across all meshes
1545
+ * Get RTC offset Y
1819
1546
  * @returns {number}
1820
1547
  */
1821
- get totalTriangles() {
1822
- const ret = wasm.meshcollection_totalTriangles(this.__wbg_ptr);
1823
- return ret >>> 0;
1548
+ get rtcOffsetY() {
1549
+ const ret = wasm.meshcollection_rtcOffsetY(this.__wbg_ptr);
1550
+ return ret;
1824
1551
  }
1825
1552
  /**
1826
- * Get building rotation angle in radians (from IfcSite placement)
1827
- * Returns None if no rotation was detected
1828
- * @returns {number | undefined}
1553
+ * Get RTC offset Z
1554
+ * @returns {number}
1829
1555
  */
1830
- get buildingRotation() {
1831
- try {
1832
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1833
- wasm.meshcollection_buildingRotation(retptr, this.__wbg_ptr);
1834
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1835
- var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
1836
- return r0 === 0 ? undefined : r2;
1837
- } finally {
1838
- wasm.__wbindgen_add_to_stack_pointer(16);
1839
- }
1556
+ get rtcOffsetZ() {
1557
+ const ret = wasm.meshcollection_rtcOffsetZ(this.__wbg_ptr);
1558
+ return ret;
1840
1559
  }
1841
1560
  /**
1842
- * Get mesh at index
1843
- * @param {number} index
1844
- * @returns {MeshDataJs | undefined}
1561
+ * Get total triangle count across all meshes
1562
+ * @returns {number}
1845
1563
  */
1846
- get(index) {
1847
- const ret = wasm.meshcollection_get(this.__wbg_ptr, index);
1848
- return ret === 0 ? undefined : MeshDataJs.__wrap(ret);
1564
+ get totalTriangles() {
1565
+ const ret = wasm.meshcollection_totalTriangles(this.__wbg_ptr);
1566
+ return ret >>> 0;
1849
1567
  }
1850
1568
  /**
1851
- * Get number of meshes
1569
+ * Get total vertex count across all meshes
1852
1570
  * @returns {number}
1853
1571
  */
1854
- get length() {
1855
- const ret = wasm.meshcollection_length(this.__wbg_ptr);
1572
+ get totalVertices() {
1573
+ const ret = wasm.meshcollection_totalVertices(this.__wbg_ptr);
1856
1574
  return ret >>> 0;
1857
1575
  }
1858
1576
  }
@@ -1879,14 +1597,6 @@ export class MeshCollectionWithRtc {
1879
1597
  const ptr = this.__destroy_into_raw();
1880
1598
  wasm.__wbg_meshcollectionwithrtc_free(ptr, 0);
1881
1599
  }
1882
- /**
1883
- * Get the RTC offset
1884
- * @returns {RtcOffsetJs}
1885
- */
1886
- get rtcOffset() {
1887
- const ret = wasm.meshcollectionwithrtc_rtcOffset(this.__wbg_ptr);
1888
- return RtcOffsetJs.__wrap(ret);
1889
- }
1890
1600
  /**
1891
1601
  * Get mesh at index
1892
1602
  * @param {number} index
@@ -1912,6 +1622,14 @@ export class MeshCollectionWithRtc {
1912
1622
  const ret = wasm.meshcollectionwithrtc_meshes(this.__wbg_ptr);
1913
1623
  return MeshCollection.__wrap(ret);
1914
1624
  }
1625
+ /**
1626
+ * Get the RTC offset
1627
+ * @returns {RtcOffsetJs}
1628
+ */
1629
+ get rtcOffset() {
1630
+ const ret = wasm.meshcollectionwithrtc_rtcOffset(this.__wbg_ptr);
1631
+ return RtcOffsetJs.__wrap(ret);
1632
+ }
1915
1633
  }
1916
1634
  if (Symbol.dispose) MeshCollectionWithRtc.prototype[Symbol.dispose] = MeshCollectionWithRtc.prototype.free;
1917
1635
 
@@ -1936,30 +1654,6 @@ export class MeshDataJs {
1936
1654
  const ptr = this.__destroy_into_raw();
1937
1655
  wasm.__wbg_meshdatajs_free(ptr, 0);
1938
1656
  }
1939
- /**
1940
- * Get express ID
1941
- * @returns {number}
1942
- */
1943
- get expressId() {
1944
- const ret = wasm.meshdatajs_expressId(this.__wbg_ptr);
1945
- return ret >>> 0;
1946
- }
1947
- /**
1948
- * Get vertex count
1949
- * @returns {number}
1950
- */
1951
- get vertexCount() {
1952
- const ret = wasm.meshdatajs_vertexCount(this.__wbg_ptr);
1953
- return ret >>> 0;
1954
- }
1955
- /**
1956
- * Get triangle count
1957
- * @returns {number}
1958
- */
1959
- get triangleCount() {
1960
- const ret = wasm.meshdatajs_triangleCount(this.__wbg_ptr);
1961
- return ret >>> 0;
1962
- }
1963
1657
  /**
1964
1658
  * Get color as [r, g, b, a] array
1965
1659
  * @returns {Float32Array}
@@ -1978,20 +1672,12 @@ export class MeshDataJs {
1978
1672
  }
1979
1673
  }
1980
1674
  /**
1981
- * Get indices as Uint32Array (copy to JS)
1982
- * @returns {Uint32Array}
1983
- */
1984
- get indices() {
1985
- const ret = wasm.meshdatajs_indices(this.__wbg_ptr);
1986
- return takeObject(ret);
1987
- }
1988
- /**
1989
- * Get normals as Float32Array (copy to JS)
1990
- * @returns {Float32Array}
1675
+ * Get express ID
1676
+ * @returns {number}
1991
1677
  */
1992
- get normals() {
1993
- const ret = wasm.meshdatajs_normals(this.__wbg_ptr);
1994
- return takeObject(ret);
1678
+ get expressId() {
1679
+ const ret = wasm.meshdatajs_expressId(this.__wbg_ptr);
1680
+ return ret >>> 0;
1995
1681
  }
1996
1682
  /**
1997
1683
  * Get IFC type name (e.g., "IfcWall", "IfcSpace")
@@ -2013,6 +1699,22 @@ export class MeshDataJs {
2013
1699
  wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2014
1700
  }
2015
1701
  }
1702
+ /**
1703
+ * Get indices as Uint32Array (copy to JS)
1704
+ * @returns {Uint32Array}
1705
+ */
1706
+ get indices() {
1707
+ const ret = wasm.meshdatajs_indices(this.__wbg_ptr);
1708
+ return takeObject(ret);
1709
+ }
1710
+ /**
1711
+ * Get normals as Float32Array (copy to JS)
1712
+ * @returns {Float32Array}
1713
+ */
1714
+ get normals() {
1715
+ const ret = wasm.meshdatajs_normals(this.__wbg_ptr);
1716
+ return takeObject(ret);
1717
+ }
2016
1718
  /**
2017
1719
  * Get positions as Float32Array (copy to JS)
2018
1720
  * @returns {Float32Array}
@@ -2021,6 +1723,22 @@ export class MeshDataJs {
2021
1723
  const ret = wasm.meshdatajs_positions(this.__wbg_ptr);
2022
1724
  return takeObject(ret);
2023
1725
  }
1726
+ /**
1727
+ * Get triangle count
1728
+ * @returns {number}
1729
+ */
1730
+ get triangleCount() {
1731
+ const ret = wasm.meshdatajs_triangleCount(this.__wbg_ptr);
1732
+ return ret >>> 0;
1733
+ }
1734
+ /**
1735
+ * Get vertex count
1736
+ * @returns {number}
1737
+ */
1738
+ get vertexCount() {
1739
+ const ret = wasm.meshdatajs_vertexCount(this.__wbg_ptr);
1740
+ return ret >>> 0;
1741
+ }
2024
1742
  }
2025
1743
  if (Symbol.dispose) MeshDataJs.prototype[Symbol.dispose] = MeshDataJs.prototype.free;
2026
1744
 
@@ -2053,13 +1771,6 @@ export class RtcOffsetJs {
2053
1771
  const ret = wasm.__wbg_get_georeferencejs_eastings(this.__wbg_ptr);
2054
1772
  return ret;
2055
1773
  }
2056
- /**
2057
- * X offset (subtracted from positions)
2058
- * @param {number} arg0
2059
- */
2060
- set x(arg0) {
2061
- wasm.__wbg_set_georeferencejs_eastings(this.__wbg_ptr, arg0);
2062
- }
2063
1774
  /**
2064
1775
  * Y offset
2065
1776
  * @returns {number}
@@ -2068,13 +1779,6 @@ export class RtcOffsetJs {
2068
1779
  const ret = wasm.__wbg_get_georeferencejs_northings(this.__wbg_ptr);
2069
1780
  return ret;
2070
1781
  }
2071
- /**
2072
- * Y offset
2073
- * @param {number} arg0
2074
- */
2075
- set y(arg0) {
2076
- wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
2077
- }
2078
1782
  /**
2079
1783
  * Z offset
2080
1784
  * @returns {number}
@@ -2083,13 +1787,6 @@ export class RtcOffsetJs {
2083
1787
  const ret = wasm.__wbg_get_georeferencejs_orthogonal_height(this.__wbg_ptr);
2084
1788
  return ret;
2085
1789
  }
2086
- /**
2087
- * Z offset
2088
- * @param {number} arg0
2089
- */
2090
- set z(arg0) {
2091
- wasm.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr, arg0);
2092
- }
2093
1790
  /**
2094
1791
  * Check if offset is significant (>10km)
2095
1792
  * @returns {boolean}
@@ -2118,6 +1815,27 @@ export class RtcOffsetJs {
2118
1815
  wasm.__wbindgen_add_to_stack_pointer(16);
2119
1816
  }
2120
1817
  }
1818
+ /**
1819
+ * X offset (subtracted from positions)
1820
+ * @param {number} arg0
1821
+ */
1822
+ set x(arg0) {
1823
+ wasm.__wbg_set_georeferencejs_eastings(this.__wbg_ptr, arg0);
1824
+ }
1825
+ /**
1826
+ * Y offset
1827
+ * @param {number} arg0
1828
+ */
1829
+ set y(arg0) {
1830
+ wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
1831
+ }
1832
+ /**
1833
+ * Z offset
1834
+ * @param {number} arg0
1835
+ */
1836
+ set z(arg0) {
1837
+ wasm.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr, arg0);
1838
+ }
2121
1839
  }
2122
1840
  if (Symbol.dispose) RtcOffsetJs.prototype[Symbol.dispose] = RtcOffsetJs.prototype.free;
2123
1841
 
@@ -2145,34 +1863,40 @@ export class SymbolicCircle {
2145
1863
  /**
2146
1864
  * @returns {number}
2147
1865
  */
2148
- get expressId() {
2149
- const ret = wasm.gpumeshmetadata_vertexCount(this.__wbg_ptr);
2150
- return ret >>> 0;
1866
+ get centerX() {
1867
+ const ret = wasm.symboliccircle_centerX(this.__wbg_ptr);
1868
+ return ret;
2151
1869
  }
2152
1870
  /**
2153
1871
  * @returns {number}
2154
1872
  */
2155
- get startAngle() {
2156
- const ret = wasm.symboliccircle_startAngle(this.__wbg_ptr);
1873
+ get centerY() {
1874
+ const ret = wasm.symboliccircle_centerY(this.__wbg_ptr);
2157
1875
  return ret;
2158
1876
  }
2159
1877
  /**
2160
- * Check if this is a full circle
2161
- * @returns {boolean}
1878
+ * @returns {number}
2162
1879
  */
2163
- get isFullCircle() {
2164
- const ret = wasm.symboliccircle_isFullCircle(this.__wbg_ptr);
2165
- return ret !== 0;
1880
+ get endAngle() {
1881
+ const ret = wasm.symboliccircle_endAngle(this.__wbg_ptr);
1882
+ return ret;
1883
+ }
1884
+ /**
1885
+ * @returns {number}
1886
+ */
1887
+ get expressId() {
1888
+ const ret = wasm.gpumeshmetadata_vertexCount(this.__wbg_ptr);
1889
+ return ret >>> 0;
2166
1890
  }
2167
1891
  /**
2168
1892
  * @returns {string}
2169
1893
  */
2170
- get repIdentifier() {
1894
+ get ifcType() {
2171
1895
  let deferred1_0;
2172
1896
  let deferred1_1;
2173
1897
  try {
2174
1898
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2175
- wasm.symboliccircle_repIdentifier(retptr, this.__wbg_ptr);
1899
+ wasm.symboliccircle_ifcType(retptr, this.__wbg_ptr);
2176
1900
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2177
1901
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2178
1902
  deferred1_0 = r0;
@@ -2184,35 +1908,29 @@ export class SymbolicCircle {
2184
1908
  }
2185
1909
  }
2186
1910
  /**
2187
- * @returns {number}
2188
- */
2189
- get radius() {
2190
- const ret = wasm.symboliccircle_radius(this.__wbg_ptr);
2191
- return ret;
2192
- }
2193
- /**
2194
- * @returns {number}
1911
+ * Check if this is a full circle
1912
+ * @returns {boolean}
2195
1913
  */
2196
- get centerX() {
2197
- const ret = wasm.symboliccircle_centerX(this.__wbg_ptr);
2198
- return ret;
1914
+ get isFullCircle() {
1915
+ const ret = wasm.symboliccircle_isFullCircle(this.__wbg_ptr);
1916
+ return ret !== 0;
2199
1917
  }
2200
1918
  /**
2201
1919
  * @returns {number}
2202
1920
  */
2203
- get centerY() {
2204
- const ret = wasm.symboliccircle_centerY(this.__wbg_ptr);
1921
+ get radius() {
1922
+ const ret = wasm.symboliccircle_radius(this.__wbg_ptr);
2205
1923
  return ret;
2206
1924
  }
2207
1925
  /**
2208
1926
  * @returns {string}
2209
1927
  */
2210
- get ifcType() {
1928
+ get repIdentifier() {
2211
1929
  let deferred1_0;
2212
1930
  let deferred1_1;
2213
1931
  try {
2214
1932
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2215
- wasm.symboliccircle_ifcType(retptr, this.__wbg_ptr);
1933
+ wasm.symboliccircle_repIdentifier(retptr, this.__wbg_ptr);
2216
1934
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2217
1935
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2218
1936
  deferred1_0 = r0;
@@ -2226,8 +1944,8 @@ export class SymbolicCircle {
2226
1944
  /**
2227
1945
  * @returns {number}
2228
1946
  */
2229
- get endAngle() {
2230
- const ret = wasm.symboliccircle_endAngle(this.__wbg_ptr);
1947
+ get startAngle() {
1948
+ const ret = wasm.symboliccircle_startAngle(this.__wbg_ptr);
2231
1949
  return ret;
2232
1950
  }
2233
1951
  }
@@ -2264,23 +1982,15 @@ export class SymbolicPolyline {
2264
1982
  return ret >>> 0;
2265
1983
  }
2266
1984
  /**
2267
- * Get number of points
2268
- * @returns {number}
2269
- */
2270
- get pointCount() {
2271
- const ret = wasm.symbolicpolyline_pointCount(this.__wbg_ptr);
2272
- return ret >>> 0;
2273
- }
2274
- /**
2275
- * Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
1985
+ * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
2276
1986
  * @returns {string}
2277
1987
  */
2278
- get repIdentifier() {
1988
+ get ifcType() {
2279
1989
  let deferred1_0;
2280
1990
  let deferred1_1;
2281
1991
  try {
2282
1992
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2283
- wasm.symbolicpolyline_repIdentifier(retptr, this.__wbg_ptr);
1993
+ wasm.symbolicpolyline_ifcType(retptr, this.__wbg_ptr);
2284
1994
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2285
1995
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2286
1996
  deferred1_0 = r0;
@@ -2291,6 +2001,22 @@ export class SymbolicPolyline {
2291
2001
  wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2292
2002
  }
2293
2003
  }
2004
+ /**
2005
+ * Check if this is a closed loop
2006
+ * @returns {boolean}
2007
+ */
2008
+ get isClosed() {
2009
+ const ret = wasm.symbolicpolyline_isClosed(this.__wbg_ptr);
2010
+ return ret !== 0;
2011
+ }
2012
+ /**
2013
+ * Get number of points
2014
+ * @returns {number}
2015
+ */
2016
+ get pointCount() {
2017
+ const ret = wasm.symbolicpolyline_pointCount(this.__wbg_ptr);
2018
+ return ret >>> 0;
2019
+ }
2294
2020
  /**
2295
2021
  * Get 2D points as Float32Array [x1, y1, x2, y2, ...]
2296
2022
  * @returns {Float32Array}
@@ -2300,15 +2026,15 @@ export class SymbolicPolyline {
2300
2026
  return takeObject(ret);
2301
2027
  }
2302
2028
  /**
2303
- * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
2029
+ * Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
2304
2030
  * @returns {string}
2305
2031
  */
2306
- get ifcType() {
2032
+ get repIdentifier() {
2307
2033
  let deferred1_0;
2308
2034
  let deferred1_1;
2309
2035
  try {
2310
2036
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2311
- wasm.symbolicpolyline_ifcType(retptr, this.__wbg_ptr);
2037
+ wasm.symbolicpolyline_repIdentifier(retptr, this.__wbg_ptr);
2312
2038
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2313
2039
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2314
2040
  deferred1_0 = r0;
@@ -2319,14 +2045,6 @@ export class SymbolicPolyline {
2319
2045
  wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2320
2046
  }
2321
2047
  }
2322
- /**
2323
- * Check if this is a closed loop
2324
- * @returns {boolean}
2325
- */
2326
- get isClosed() {
2327
- const ret = wasm.symbolicpolyline_isClosed(this.__wbg_ptr);
2328
- return ret !== 0;
2329
- }
2330
2048
  }
2331
2049
  if (Symbol.dispose) SymbolicPolyline.prototype[Symbol.dispose] = SymbolicPolyline.prototype.free;
2332
2050
 
@@ -2351,23 +2069,6 @@ export class SymbolicRepresentationCollection {
2351
2069
  const ptr = this.__destroy_into_raw();
2352
2070
  wasm.__wbg_symbolicrepresentationcollection_free(ptr, 0);
2353
2071
  }
2354
- /**
2355
- * Get circle at index
2356
- * @param {number} index
2357
- * @returns {SymbolicCircle | undefined}
2358
- */
2359
- getCircle(index) {
2360
- const ret = wasm.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, index);
2361
- return ret === 0 ? undefined : SymbolicCircle.__wrap(ret);
2362
- }
2363
- /**
2364
- * Get total count of all symbolic items
2365
- * @returns {number}
2366
- */
2367
- get totalCount() {
2368
- const ret = wasm.symbolicrepresentationcollection_totalCount(this.__wbg_ptr);
2369
- return ret >>> 0;
2370
- }
2371
2072
  /**
2372
2073
  * Get number of circles/arcs
2373
2074
  * @returns {number}
@@ -2377,21 +2078,13 @@ export class SymbolicRepresentationCollection {
2377
2078
  return ret >>> 0;
2378
2079
  }
2379
2080
  /**
2380
- * Get polyline at index
2081
+ * Get circle at index
2381
2082
  * @param {number} index
2382
- * @returns {SymbolicPolyline | undefined}
2383
- */
2384
- getPolyline(index) {
2385
- const ret = wasm.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, index);
2386
- return ret === 0 ? undefined : SymbolicPolyline.__wrap(ret);
2387
- }
2388
- /**
2389
- * Get number of polylines
2390
- * @returns {number}
2083
+ * @returns {SymbolicCircle | undefined}
2391
2084
  */
2392
- get polylineCount() {
2393
- const ret = wasm.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr);
2394
- return ret >>> 0;
2085
+ getCircle(index) {
2086
+ const ret = wasm.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, index);
2087
+ return ret === 0 ? undefined : SymbolicCircle.__wrap(ret);
2395
2088
  }
2396
2089
  /**
2397
2090
  * Get all express IDs that have symbolic representations
@@ -2410,6 +2103,15 @@ export class SymbolicRepresentationCollection {
2410
2103
  wasm.__wbindgen_add_to_stack_pointer(16);
2411
2104
  }
2412
2105
  }
2106
+ /**
2107
+ * Get polyline at index
2108
+ * @param {number} index
2109
+ * @returns {SymbolicPolyline | undefined}
2110
+ */
2111
+ getPolyline(index) {
2112
+ const ret = wasm.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, index);
2113
+ return ret === 0 ? undefined : SymbolicPolyline.__wrap(ret);
2114
+ }
2413
2115
  /**
2414
2116
  * Check if collection is empty
2415
2117
  * @returns {boolean}
@@ -2418,6 +2120,22 @@ export class SymbolicRepresentationCollection {
2418
2120
  const ret = wasm.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr);
2419
2121
  return ret !== 0;
2420
2122
  }
2123
+ /**
2124
+ * Get number of polylines
2125
+ * @returns {number}
2126
+ */
2127
+ get polylineCount() {
2128
+ const ret = wasm.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr);
2129
+ return ret >>> 0;
2130
+ }
2131
+ /**
2132
+ * Get total count of all symbolic items
2133
+ * @returns {number}
2134
+ */
2135
+ get totalCount() {
2136
+ const ret = wasm.symbolicrepresentationcollection_totalCount(this.__wbg_ptr);
2137
+ return ret >>> 0;
2138
+ }
2421
2139
  }
2422
2140
  if (Symbol.dispose) SymbolicRepresentationCollection.prototype[Symbol.dispose] = SymbolicRepresentationCollection.prototype.free;
2423
2141
 
@@ -2492,6 +2210,23 @@ export class ZeroCopyMesh {
2492
2210
  const ret = wasm.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr);
2493
2211
  return ret >>> 0;
2494
2212
  }
2213
+ /**
2214
+ * Check if mesh is empty
2215
+ * @returns {boolean}
2216
+ */
2217
+ get is_empty() {
2218
+ const ret = wasm.zerocopymesh_is_empty(this.__wbg_ptr);
2219
+ return ret !== 0;
2220
+ }
2221
+ /**
2222
+ * Create a new zero-copy mesh from a Mesh
2223
+ */
2224
+ constructor() {
2225
+ const ret = wasm.zerocopymesh_new();
2226
+ this.__wbg_ptr = ret >>> 0;
2227
+ ZeroCopyMeshFinalization.register(this, this.__wbg_ptr, this);
2228
+ return this;
2229
+ }
2495
2230
  /**
2496
2231
  * Get length of normals array
2497
2232
  * @returns {number}
@@ -2504,16 +2239,8 @@ export class ZeroCopyMesh {
2504
2239
  * Get pointer to normals array
2505
2240
  * @returns {number}
2506
2241
  */
2507
- get normals_ptr() {
2508
- const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
2509
- return ret >>> 0;
2510
- }
2511
- /**
2512
- * Get vertex count
2513
- * @returns {number}
2514
- */
2515
- get vertex_count() {
2516
- const ret = wasm.zerocopymesh_vertex_count(this.__wbg_ptr);
2242
+ get normals_ptr() {
2243
+ const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
2517
2244
  return ret >>> 0;
2518
2245
  }
2519
2246
  /**
@@ -2533,85 +2260,589 @@ export class ZeroCopyMesh {
2533
2260
  const ret = wasm.zerocopymesh_positions_ptr(this.__wbg_ptr);
2534
2261
  return ret >>> 0;
2535
2262
  }
2536
- /**
2537
- * Get triangle count
2538
- * @returns {number}
2539
- */
2540
- get triangle_count() {
2541
- const ret = wasm.gpuinstancedgeometry_triangleCount(this.__wbg_ptr);
2542
- return ret >>> 0;
2263
+ /**
2264
+ * Get triangle count
2265
+ * @returns {number}
2266
+ */
2267
+ get triangle_count() {
2268
+ const ret = wasm.gpuinstancedgeometry_triangleCount(this.__wbg_ptr);
2269
+ return ret >>> 0;
2270
+ }
2271
+ /**
2272
+ * Get vertex count
2273
+ * @returns {number}
2274
+ */
2275
+ get vertex_count() {
2276
+ const ret = wasm.zerocopymesh_vertex_count(this.__wbg_ptr);
2277
+ return ret >>> 0;
2278
+ }
2279
+ }
2280
+ if (Symbol.dispose) ZeroCopyMesh.prototype[Symbol.dispose] = ZeroCopyMesh.prototype.free;
2281
+
2282
+ /**
2283
+ * Get WASM memory to allow JavaScript to create TypedArray views
2284
+ * @returns {any}
2285
+ */
2286
+ export function get_memory() {
2287
+ const ret = wasm.get_memory();
2288
+ return takeObject(ret);
2289
+ }
2290
+
2291
+ /**
2292
+ * Initialize the WASM module.
2293
+ *
2294
+ * This function is called automatically when the WASM module is loaded.
2295
+ * It sets up panic hooks for better error messages in the browser console.
2296
+ */
2297
+ export function init() {
2298
+ wasm.init();
2299
+ }
2300
+
2301
+ /**
2302
+ * Get the version of IFC-Lite.
2303
+ *
2304
+ * # Returns
2305
+ *
2306
+ * Version string (e.g., "0.1.0")
2307
+ *
2308
+ * # Example
2309
+ *
2310
+ * ```javascript
2311
+ * console.log(`IFC-Lite version: ${version()}`);
2312
+ * ```
2313
+ * @returns {string}
2314
+ */
2315
+ export function version() {
2316
+ let deferred1_0;
2317
+ let deferred1_1;
2318
+ try {
2319
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2320
+ wasm.version(retptr);
2321
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2322
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2323
+ deferred1_0 = r0;
2324
+ deferred1_1 = r1;
2325
+ return getStringFromWasm0(r0, r1);
2326
+ } finally {
2327
+ wasm.__wbindgen_add_to_stack_pointer(16);
2328
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2329
+ }
2330
+ }
2331
+
2332
+ function __wbg_get_imports() {
2333
+ const import0 = {
2334
+ __proto__: null,
2335
+ __wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
2336
+ const ret = Error(getStringFromWasm0(arg0, arg1));
2337
+ return addHeapObject(ret);
2338
+ },
2339
+ __wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
2340
+ const ret = typeof(getObject(arg0)) === 'function';
2341
+ return ret;
2342
+ },
2343
+ __wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
2344
+ const ret = getObject(arg0) === undefined;
2345
+ return ret;
2346
+ },
2347
+ __wbg___wbindgen_memory_bd1fbcf21fbef3c8: function() {
2348
+ const ret = wasm.memory;
2349
+ return addHeapObject(ret);
2350
+ },
2351
+ __wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
2352
+ const obj = getObject(arg1);
2353
+ const ret = typeof(obj) === 'number' ? obj : undefined;
2354
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
2355
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2356
+ },
2357
+ __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
2358
+ throw new Error(getStringFromWasm0(arg0, arg1));
2359
+ },
2360
+ __wbg__wbg_cb_unref_d9b87ff7982e3b21: function(arg0) {
2361
+ getObject(arg0)._wbg_cb_unref();
2362
+ },
2363
+ __wbg_call_389efe28435a9388: function() { return handleError(function (arg0, arg1) {
2364
+ const ret = getObject(arg0).call(getObject(arg1));
2365
+ return addHeapObject(ret);
2366
+ }, arguments); },
2367
+ __wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {
2368
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2369
+ return addHeapObject(ret);
2370
+ }, arguments); },
2371
+ __wbg_call_812d25f1510c13c8: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2372
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2373
+ return addHeapObject(ret);
2374
+ }, arguments); },
2375
+ __wbg_clearTimeout_5a54f8841c30079a: function(arg0) {
2376
+ const ret = clearTimeout(takeObject(arg0));
2377
+ return addHeapObject(ret);
2378
+ },
2379
+ __wbg_error_7534b8e9a36f1ab4: function(arg0, arg1) {
2380
+ let deferred0_0;
2381
+ let deferred0_1;
2382
+ try {
2383
+ deferred0_0 = arg0;
2384
+ deferred0_1 = arg1;
2385
+ console.error(getStringFromWasm0(arg0, arg1));
2386
+ } finally {
2387
+ wasm.__wbindgen_export2(deferred0_0, deferred0_1, 1);
2388
+ }
2389
+ },
2390
+ __wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
2391
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
2392
+ return addHeapObject(ret);
2393
+ }, arguments); },
2394
+ __wbg_gpugeometry_new: function(arg0) {
2395
+ const ret = GpuGeometry.__wrap(arg0);
2396
+ return addHeapObject(ret);
2397
+ },
2398
+ __wbg_instancedgeometry_new: function(arg0) {
2399
+ const ret = InstancedGeometry.__wrap(arg0);
2400
+ return addHeapObject(ret);
2401
+ },
2402
+ __wbg_length_35a7bace40f36eac: function(arg0) {
2403
+ const ret = getObject(arg0).length;
2404
+ return ret;
2405
+ },
2406
+ __wbg_length_9a7876c9728a0979: function(arg0) {
2407
+ const ret = getObject(arg0).length;
2408
+ return ret;
2409
+ },
2410
+ __wbg_meshdatajs_new: function(arg0) {
2411
+ const ret = MeshDataJs.__wrap(arg0);
2412
+ return addHeapObject(ret);
2413
+ },
2414
+ __wbg_new_361308b2356cecd0: function() {
2415
+ const ret = new Object();
2416
+ return addHeapObject(ret);
2417
+ },
2418
+ __wbg_new_3eb36ae241fe6f44: function() {
2419
+ const ret = new Array();
2420
+ return addHeapObject(ret);
2421
+ },
2422
+ __wbg_new_8a6f238a6ece86ea: function() {
2423
+ const ret = new Error();
2424
+ return addHeapObject(ret);
2425
+ },
2426
+ __wbg_new_b5d9e2fb389fef91: function(arg0, arg1) {
2427
+ try {
2428
+ var state0 = {a: arg0, b: arg1};
2429
+ var cb0 = (arg0, arg1) => {
2430
+ const a = state0.a;
2431
+ state0.a = 0;
2432
+ try {
2433
+ return __wasm_bindgen_func_elem_1044(a, state0.b, arg0, arg1);
2434
+ } finally {
2435
+ state0.a = a;
2436
+ }
2437
+ };
2438
+ const ret = new Promise(cb0);
2439
+ return addHeapObject(ret);
2440
+ } finally {
2441
+ state0.a = state0.b = 0;
2442
+ }
2443
+ },
2444
+ __wbg_new_dca287b076112a51: function() {
2445
+ const ret = new Map();
2446
+ return addHeapObject(ret);
2447
+ },
2448
+ __wbg_new_from_slice_132ef6dc5072cf68: function(arg0, arg1) {
2449
+ const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
2450
+ return addHeapObject(ret);
2451
+ },
2452
+ __wbg_new_from_slice_19d21922ff3c0ae6: function(arg0, arg1) {
2453
+ const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
2454
+ return addHeapObject(ret);
2455
+ },
2456
+ __wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
2457
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
2458
+ return addHeapObject(ret);
2459
+ },
2460
+ __wbg_prototypesetcall_c7e6a26aeade796d: function(arg0, arg1, arg2) {
2461
+ Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
2462
+ },
2463
+ __wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
2464
+ const ret = getObject(arg0).push(getObject(arg1));
2465
+ return ret;
2466
+ },
2467
+ __wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
2468
+ const ret = getObject(arg0).queueMicrotask;
2469
+ return addHeapObject(ret);
2470
+ },
2471
+ __wbg_queueMicrotask_5bb536982f78a56f: function(arg0) {
2472
+ queueMicrotask(getObject(arg0));
2473
+ },
2474
+ __wbg_resolve_002c4b7d9d8f6b64: function(arg0) {
2475
+ const ret = Promise.resolve(getObject(arg0));
2476
+ return addHeapObject(ret);
2477
+ },
2478
+ __wbg_setTimeout_db2dbaeefb6f39c7: function() { return handleError(function (arg0, arg1) {
2479
+ const ret = setTimeout(getObject(arg0), arg1);
2480
+ return addHeapObject(ret);
2481
+ }, arguments); },
2482
+ __wbg_set_1eb0999cf5d27fc8: function(arg0, arg1, arg2) {
2483
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2484
+ return addHeapObject(ret);
2485
+ },
2486
+ __wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
2487
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2488
+ },
2489
+ __wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
2490
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
2491
+ return ret;
2492
+ }, arguments); },
2493
+ __wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
2494
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2495
+ },
2496
+ __wbg_size_0ffc76d0c4697f79: function(arg0) {
2497
+ const ret = getObject(arg0).size;
2498
+ return ret;
2499
+ },
2500
+ __wbg_stack_0ed75d68575b0f3c: function(arg0, arg1) {
2501
+ const ret = getObject(arg1).stack;
2502
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
2503
+ const len1 = WASM_VECTOR_LEN;
2504
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2505
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2506
+ },
2507
+ __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
2508
+ const ret = typeof global === 'undefined' ? null : global;
2509
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2510
+ },
2511
+ __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
2512
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
2513
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2514
+ },
2515
+ __wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
2516
+ const ret = typeof self === 'undefined' ? null : self;
2517
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2518
+ },
2519
+ __wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
2520
+ const ret = typeof window === 'undefined' ? null : window;
2521
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2522
+ },
2523
+ __wbg_then_b9e7b3b5f1a9e1b5: function(arg0, arg1) {
2524
+ const ret = getObject(arg0).then(getObject(arg1));
2525
+ return addHeapObject(ret);
2526
+ },
2527
+ __wbg_warn_f7ae1b2e66ccb930: function(arg0) {
2528
+ console.warn(getObject(arg0));
2529
+ },
2530
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2531
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 133, function: Function { arguments: [Externref], shim_idx: 134, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2532
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1008, __wasm_bindgen_func_elem_1013);
2533
+ return addHeapObject(ret);
2534
+ },
2535
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2536
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 45, function: Function { arguments: [], shim_idx: 46, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2537
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_470, __wasm_bindgen_func_elem_474);
2538
+ return addHeapObject(ret);
2539
+ },
2540
+ __wbindgen_cast_0000000000000003: function(arg0) {
2541
+ // Cast intrinsic for `F64 -> Externref`.
2542
+ const ret = arg0;
2543
+ return addHeapObject(ret);
2544
+ },
2545
+ __wbindgen_cast_0000000000000004: function(arg0, arg1) {
2546
+ // Cast intrinsic for `Ref(String) -> Externref`.
2547
+ const ret = getStringFromWasm0(arg0, arg1);
2548
+ return addHeapObject(ret);
2549
+ },
2550
+ __wbindgen_cast_0000000000000005: function(arg0) {
2551
+ // Cast intrinsic for `U64 -> Externref`.
2552
+ const ret = BigInt.asUintN(64, arg0);
2553
+ return addHeapObject(ret);
2554
+ },
2555
+ __wbindgen_object_clone_ref: function(arg0) {
2556
+ const ret = getObject(arg0);
2557
+ return addHeapObject(ret);
2558
+ },
2559
+ __wbindgen_object_drop_ref: function(arg0) {
2560
+ takeObject(arg0);
2561
+ },
2562
+ };
2563
+ return {
2564
+ __proto__: null,
2565
+ "./ifc-lite_bg.js": import0,
2566
+ };
2567
+ }
2568
+
2569
+ function __wasm_bindgen_func_elem_474(arg0, arg1) {
2570
+ wasm.__wasm_bindgen_func_elem_474(arg0, arg1);
2571
+ }
2572
+
2573
+ function __wasm_bindgen_func_elem_1013(arg0, arg1, arg2) {
2574
+ wasm.__wasm_bindgen_func_elem_1013(arg0, arg1, addHeapObject(arg2));
2575
+ }
2576
+
2577
+ function __wasm_bindgen_func_elem_1044(arg0, arg1, arg2, arg3) {
2578
+ wasm.__wasm_bindgen_func_elem_1044(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2579
+ }
2580
+
2581
+ const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
2582
+ ? { register: () => {}, unregister: () => {} }
2583
+ : new FinalizationRegistry(ptr => wasm.__wbg_georeferencejs_free(ptr >>> 0, 1));
2584
+ const GpuGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
2585
+ ? { register: () => {}, unregister: () => {} }
2586
+ : new FinalizationRegistry(ptr => wasm.__wbg_gpugeometry_free(ptr >>> 0, 1));
2587
+ const GpuInstancedGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
2588
+ ? { register: () => {}, unregister: () => {} }
2589
+ : new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometry_free(ptr >>> 0, 1));
2590
+ const GpuInstancedGeometryCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
2591
+ ? { register: () => {}, unregister: () => {} }
2592
+ : new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometrycollection_free(ptr >>> 0, 1));
2593
+ const GpuInstancedGeometryRefFinalization = (typeof FinalizationRegistry === 'undefined')
2594
+ ? { register: () => {}, unregister: () => {} }
2595
+ : new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometryref_free(ptr >>> 0, 1));
2596
+ const GpuMeshMetadataFinalization = (typeof FinalizationRegistry === 'undefined')
2597
+ ? { register: () => {}, unregister: () => {} }
2598
+ : new FinalizationRegistry(ptr => wasm.__wbg_gpumeshmetadata_free(ptr >>> 0, 1));
2599
+ const IfcAPIFinalization = (typeof FinalizationRegistry === 'undefined')
2600
+ ? { register: () => {}, unregister: () => {} }
2601
+ : new FinalizationRegistry(ptr => wasm.__wbg_ifcapi_free(ptr >>> 0, 1));
2602
+ const InstanceDataFinalization = (typeof FinalizationRegistry === 'undefined')
2603
+ ? { register: () => {}, unregister: () => {} }
2604
+ : new FinalizationRegistry(ptr => wasm.__wbg_instancedata_free(ptr >>> 0, 1));
2605
+ const InstancedGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
2606
+ ? { register: () => {}, unregister: () => {} }
2607
+ : new FinalizationRegistry(ptr => wasm.__wbg_instancedgeometry_free(ptr >>> 0, 1));
2608
+ const InstancedMeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
2609
+ ? { register: () => {}, unregister: () => {} }
2610
+ : new FinalizationRegistry(ptr => wasm.__wbg_instancedmeshcollection_free(ptr >>> 0, 1));
2611
+ const MeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
2612
+ ? { register: () => {}, unregister: () => {} }
2613
+ : new FinalizationRegistry(ptr => wasm.__wbg_meshcollection_free(ptr >>> 0, 1));
2614
+ const MeshCollectionWithRtcFinalization = (typeof FinalizationRegistry === 'undefined')
2615
+ ? { register: () => {}, unregister: () => {} }
2616
+ : new FinalizationRegistry(ptr => wasm.__wbg_meshcollectionwithrtc_free(ptr >>> 0, 1));
2617
+ const MeshDataJsFinalization = (typeof FinalizationRegistry === 'undefined')
2618
+ ? { register: () => {}, unregister: () => {} }
2619
+ : new FinalizationRegistry(ptr => wasm.__wbg_meshdatajs_free(ptr >>> 0, 1));
2620
+ const RtcOffsetJsFinalization = (typeof FinalizationRegistry === 'undefined')
2621
+ ? { register: () => {}, unregister: () => {} }
2622
+ : new FinalizationRegistry(ptr => wasm.__wbg_rtcoffsetjs_free(ptr >>> 0, 1));
2623
+ const SymbolicCircleFinalization = (typeof FinalizationRegistry === 'undefined')
2624
+ ? { register: () => {}, unregister: () => {} }
2625
+ : new FinalizationRegistry(ptr => wasm.__wbg_symboliccircle_free(ptr >>> 0, 1));
2626
+ const SymbolicPolylineFinalization = (typeof FinalizationRegistry === 'undefined')
2627
+ ? { register: () => {}, unregister: () => {} }
2628
+ : new FinalizationRegistry(ptr => wasm.__wbg_symbolicpolyline_free(ptr >>> 0, 1));
2629
+ const SymbolicRepresentationCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
2630
+ ? { register: () => {}, unregister: () => {} }
2631
+ : new FinalizationRegistry(ptr => wasm.__wbg_symbolicrepresentationcollection_free(ptr >>> 0, 1));
2632
+ const ZeroCopyMeshFinalization = (typeof FinalizationRegistry === 'undefined')
2633
+ ? { register: () => {}, unregister: () => {} }
2634
+ : new FinalizationRegistry(ptr => wasm.__wbg_zerocopymesh_free(ptr >>> 0, 1));
2635
+
2636
+ function addHeapObject(obj) {
2637
+ if (heap_next === heap.length) heap.push(heap.length + 1);
2638
+ const idx = heap_next;
2639
+ heap_next = heap[idx];
2640
+
2641
+ heap[idx] = obj;
2642
+ return idx;
2643
+ }
2644
+
2645
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
2646
+ ? { register: () => {}, unregister: () => {} }
2647
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
2648
+
2649
+ function dropObject(idx) {
2650
+ if (idx < 132) return;
2651
+ heap[idx] = heap_next;
2652
+ heap_next = idx;
2653
+ }
2654
+
2655
+ function getArrayF32FromWasm0(ptr, len) {
2656
+ ptr = ptr >>> 0;
2657
+ return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
2658
+ }
2659
+
2660
+ function getArrayF64FromWasm0(ptr, len) {
2661
+ ptr = ptr >>> 0;
2662
+ return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
2663
+ }
2664
+
2665
+ function getArrayU32FromWasm0(ptr, len) {
2666
+ ptr = ptr >>> 0;
2667
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
2668
+ }
2669
+
2670
+ let cachedDataViewMemory0 = null;
2671
+ function getDataViewMemory0() {
2672
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
2673
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
2674
+ }
2675
+ return cachedDataViewMemory0;
2676
+ }
2677
+
2678
+ let cachedFloat32ArrayMemory0 = null;
2679
+ function getFloat32ArrayMemory0() {
2680
+ if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
2681
+ cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
2682
+ }
2683
+ return cachedFloat32ArrayMemory0;
2684
+ }
2685
+
2686
+ let cachedFloat64ArrayMemory0 = null;
2687
+ function getFloat64ArrayMemory0() {
2688
+ if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
2689
+ cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
2690
+ }
2691
+ return cachedFloat64ArrayMemory0;
2692
+ }
2693
+
2694
+ function getStringFromWasm0(ptr, len) {
2695
+ ptr = ptr >>> 0;
2696
+ return decodeText(ptr, len);
2697
+ }
2698
+
2699
+ let cachedUint32ArrayMemory0 = null;
2700
+ function getUint32ArrayMemory0() {
2701
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
2702
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
2703
+ }
2704
+ return cachedUint32ArrayMemory0;
2705
+ }
2706
+
2707
+ let cachedUint8ArrayMemory0 = null;
2708
+ function getUint8ArrayMemory0() {
2709
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
2710
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
2711
+ }
2712
+ return cachedUint8ArrayMemory0;
2713
+ }
2714
+
2715
+ function getObject(idx) { return heap[idx]; }
2716
+
2717
+ function handleError(f, args) {
2718
+ try {
2719
+ return f.apply(this, args);
2720
+ } catch (e) {
2721
+ wasm.__wbindgen_export(addHeapObject(e));
2722
+ }
2723
+ }
2724
+
2725
+ let heap = new Array(128).fill(undefined);
2726
+ heap.push(undefined, null, true, false);
2727
+
2728
+ let heap_next = heap.length;
2729
+
2730
+ function isLikeNone(x) {
2731
+ return x === undefined || x === null;
2732
+ }
2733
+
2734
+ function makeMutClosure(arg0, arg1, dtor, f) {
2735
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
2736
+ const real = (...args) => {
2737
+
2738
+ // First up with a closure we increment the internal reference
2739
+ // count. This ensures that the Rust closure environment won't
2740
+ // be deallocated while we're invoking it.
2741
+ state.cnt++;
2742
+ const a = state.a;
2743
+ state.a = 0;
2744
+ try {
2745
+ return f(a, state.b, ...args);
2746
+ } finally {
2747
+ state.a = a;
2748
+ real._wbg_cb_unref();
2749
+ }
2750
+ };
2751
+ real._wbg_cb_unref = () => {
2752
+ if (--state.cnt === 0) {
2753
+ state.dtor(state.a, state.b);
2754
+ state.a = 0;
2755
+ CLOSURE_DTORS.unregister(state);
2756
+ }
2757
+ };
2758
+ CLOSURE_DTORS.register(real, state, state);
2759
+ return real;
2760
+ }
2761
+
2762
+ function passStringToWasm0(arg, malloc, realloc) {
2763
+ if (realloc === undefined) {
2764
+ const buf = cachedTextEncoder.encode(arg);
2765
+ const ptr = malloc(buf.length, 1) >>> 0;
2766
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
2767
+ WASM_VECTOR_LEN = buf.length;
2768
+ return ptr;
2543
2769
  }
2544
- /**
2545
- * Create a new zero-copy mesh from a Mesh
2546
- */
2547
- constructor() {
2548
- const ret = wasm.zerocopymesh_new();
2549
- this.__wbg_ptr = ret >>> 0;
2550
- ZeroCopyMeshFinalization.register(this, this.__wbg_ptr, this);
2551
- return this;
2770
+
2771
+ let len = arg.length;
2772
+ let ptr = malloc(len, 1) >>> 0;
2773
+
2774
+ const mem = getUint8ArrayMemory0();
2775
+
2776
+ let offset = 0;
2777
+
2778
+ for (; offset < len; offset++) {
2779
+ const code = arg.charCodeAt(offset);
2780
+ if (code > 0x7F) break;
2781
+ mem[ptr + offset] = code;
2552
2782
  }
2553
- /**
2554
- * Check if mesh is empty
2555
- * @returns {boolean}
2556
- */
2557
- get is_empty() {
2558
- const ret = wasm.zerocopymesh_is_empty(this.__wbg_ptr);
2559
- return ret !== 0;
2783
+ if (offset !== len) {
2784
+ if (offset !== 0) {
2785
+ arg = arg.slice(offset);
2786
+ }
2787
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
2788
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
2789
+ const ret = cachedTextEncoder.encodeInto(arg, view);
2790
+
2791
+ offset += ret.written;
2792
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
2560
2793
  }
2561
- }
2562
- if (Symbol.dispose) ZeroCopyMesh.prototype[Symbol.dispose] = ZeroCopyMesh.prototype.free;
2563
2794
 
2564
- /**
2565
- * Get WASM memory to allow JavaScript to create TypedArray views
2566
- * @returns {any}
2567
- */
2568
- export function get_memory() {
2569
- const ret = wasm.get_memory();
2570
- return takeObject(ret);
2795
+ WASM_VECTOR_LEN = offset;
2796
+ return ptr;
2571
2797
  }
2572
2798
 
2573
- /**
2574
- * Initialize the WASM module.
2575
- *
2576
- * This function is called automatically when the WASM module is loaded.
2577
- * It sets up panic hooks for better error messages in the browser console.
2578
- */
2579
- export function init() {
2580
- wasm.init();
2799
+ function takeObject(idx) {
2800
+ const ret = getObject(idx);
2801
+ dropObject(idx);
2802
+ return ret;
2581
2803
  }
2582
2804
 
2583
- /**
2584
- * Get the version of IFC-Lite.
2585
- *
2586
- * # Returns
2587
- *
2588
- * Version string (e.g., "0.1.0")
2589
- *
2590
- * # Example
2591
- *
2592
- * ```javascript
2593
- * console.log(`IFC-Lite version: ${version()}`);
2594
- * ```
2595
- * @returns {string}
2596
- */
2597
- export function version() {
2598
- let deferred1_0;
2599
- let deferred1_1;
2600
- try {
2601
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2602
- wasm.version(retptr);
2603
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2604
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2605
- deferred1_0 = r0;
2606
- deferred1_1 = r1;
2607
- return getStringFromWasm0(r0, r1);
2608
- } finally {
2609
- wasm.__wbindgen_add_to_stack_pointer(16);
2610
- wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2805
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2806
+ cachedTextDecoder.decode();
2807
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
2808
+ let numBytesDecoded = 0;
2809
+ function decodeText(ptr, len) {
2810
+ numBytesDecoded += len;
2811
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
2812
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2813
+ cachedTextDecoder.decode();
2814
+ numBytesDecoded = len;
2611
2815
  }
2816
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
2817
+ }
2818
+
2819
+ const cachedTextEncoder = new TextEncoder();
2820
+
2821
+ if (!('encodeInto' in cachedTextEncoder)) {
2822
+ cachedTextEncoder.encodeInto = function (arg, view) {
2823
+ const buf = cachedTextEncoder.encode(arg);
2824
+ view.set(buf);
2825
+ return {
2826
+ read: arg.length,
2827
+ written: buf.length
2828
+ };
2829
+ };
2612
2830
  }
2613
2831
 
2614
- const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
2832
+ let WASM_VECTOR_LEN = 0;
2833
+
2834
+ let wasmModule, wasm;
2835
+ function __wbg_finalize_init(instance, module) {
2836
+ wasm = instance.exports;
2837
+ wasmModule = module;
2838
+ cachedDataViewMemory0 = null;
2839
+ cachedFloat32ArrayMemory0 = null;
2840
+ cachedFloat64ArrayMemory0 = null;
2841
+ cachedUint32ArrayMemory0 = null;
2842
+ cachedUint8ArrayMemory0 = null;
2843
+ wasm.__wbindgen_start();
2844
+ return wasm;
2845
+ }
2615
2846
 
2616
2847
  async function __wbg_load(module, imports) {
2617
2848
  if (typeof Response === 'function' && module instanceof Response) {
@@ -2619,14 +2850,12 @@ async function __wbg_load(module, imports) {
2619
2850
  try {
2620
2851
  return await WebAssembly.instantiateStreaming(module, imports);
2621
2852
  } catch (e) {
2622
- const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
2853
+ const validResponse = module.ok && expectedResponseType(module.type);
2623
2854
 
2624
2855
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
2625
2856
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
2626
2857
 
2627
- } else {
2628
- throw e;
2629
- }
2858
+ } else { throw e; }
2630
2859
  }
2631
2860
  }
2632
2861
 
@@ -2641,261 +2870,20 @@ async function __wbg_load(module, imports) {
2641
2870
  return instance;
2642
2871
  }
2643
2872
  }
2644
- }
2645
2873
 
2646
- function __wbg_get_imports() {
2647
- const imports = {};
2648
- imports.wbg = {};
2649
- imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
2650
- const ret = Error(getStringFromWasm0(arg0, arg1));
2651
- return addHeapObject(ret);
2652
- };
2653
- imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
2654
- const ret = typeof(getObject(arg0)) === 'function';
2655
- return ret;
2656
- };
2657
- imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
2658
- const ret = getObject(arg0) === undefined;
2659
- return ret;
2660
- };
2661
- imports.wbg.__wbg___wbindgen_memory_a342e963fbcabd68 = function() {
2662
- const ret = wasm.memory;
2663
- return addHeapObject(ret);
2664
- };
2665
- imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
2666
- const obj = getObject(arg1);
2667
- const ret = typeof(obj) === 'number' ? obj : undefined;
2668
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
2669
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2670
- };
2671
- imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
2672
- throw new Error(getStringFromWasm0(arg0, arg1));
2673
- };
2674
- imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
2675
- getObject(arg0)._wbg_cb_unref();
2676
- };
2677
- imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
2678
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2679
- return addHeapObject(ret);
2680
- }, arguments) };
2681
- imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
2682
- const ret = getObject(arg0).call(getObject(arg1));
2683
- return addHeapObject(ret);
2684
- }, arguments) };
2685
- imports.wbg.__wbg_call_c8baa5c5e72d274e = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2686
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2687
- return addHeapObject(ret);
2688
- }, arguments) };
2689
- imports.wbg.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
2690
- const ret = clearTimeout(takeObject(arg0));
2691
- return addHeapObject(ret);
2692
- };
2693
- imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
2694
- let deferred0_0;
2695
- let deferred0_1;
2696
- try {
2697
- deferred0_0 = arg0;
2698
- deferred0_1 = arg1;
2699
- console.error(getStringFromWasm0(arg0, arg1));
2700
- } finally {
2701
- wasm.__wbindgen_export2(deferred0_0, deferred0_1, 1);
2702
- }
2703
- };
2704
- imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
2705
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
2706
- return addHeapObject(ret);
2707
- }, arguments) };
2708
- imports.wbg.__wbg_gpugeometry_new = function(arg0) {
2709
- const ret = GpuGeometry.__wrap(arg0);
2710
- return addHeapObject(ret);
2711
- };
2712
- imports.wbg.__wbg_instancedgeometry_new = function(arg0) {
2713
- const ret = InstancedGeometry.__wrap(arg0);
2714
- return addHeapObject(ret);
2715
- };
2716
- imports.wbg.__wbg_length_86ce4877baf913bb = function(arg0) {
2717
- const ret = getObject(arg0).length;
2718
- return ret;
2719
- };
2720
- imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
2721
- const ret = getObject(arg0).length;
2722
- return ret;
2723
- };
2724
- imports.wbg.__wbg_meshdatajs_new = function(arg0) {
2725
- const ret = MeshDataJs.__wrap(arg0);
2726
- return addHeapObject(ret);
2727
- };
2728
- imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
2729
- const ret = new Object();
2730
- return addHeapObject(ret);
2731
- };
2732
- imports.wbg.__wbg_new_25f239778d6112b9 = function() {
2733
- const ret = new Array();
2734
- return addHeapObject(ret);
2735
- };
2736
- imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
2737
- const ret = new Error();
2738
- return addHeapObject(ret);
2739
- };
2740
- imports.wbg.__wbg_new_b546ae120718850e = function() {
2741
- const ret = new Map();
2742
- return addHeapObject(ret);
2743
- };
2744
- imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
2745
- try {
2746
- var state0 = {a: arg0, b: arg1};
2747
- var cb0 = (arg0, arg1) => {
2748
- const a = state0.a;
2749
- state0.a = 0;
2750
- try {
2751
- return __wasm_bindgen_func_elem_952(a, state0.b, arg0, arg1);
2752
- } finally {
2753
- state0.a = a;
2754
- }
2755
- };
2756
- const ret = new Promise(cb0);
2757
- return addHeapObject(ret);
2758
- } finally {
2759
- state0.a = state0.b = 0;
2874
+ function expectedResponseType(type) {
2875
+ switch (type) {
2876
+ case 'basic': case 'cors': case 'default': return true;
2760
2877
  }
2761
- };
2762
- imports.wbg.__wbg_new_from_slice_41e2764a343e3cb1 = function(arg0, arg1) {
2763
- const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
2764
- return addHeapObject(ret);
2765
- };
2766
- imports.wbg.__wbg_new_from_slice_db0691b69e9d3891 = function(arg0, arg1) {
2767
- const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
2768
- return addHeapObject(ret);
2769
- };
2770
- imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
2771
- const ret = new Function(getStringFromWasm0(arg0, arg1));
2772
- return addHeapObject(ret);
2773
- };
2774
- imports.wbg.__wbg_prototypesetcall_96cc7097487b926d = function(arg0, arg1, arg2) {
2775
- Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
2776
- };
2777
- imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
2778
- const ret = getObject(arg0).push(getObject(arg1));
2779
- return ret;
2780
- };
2781
- imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
2782
- const ret = getObject(arg0).queueMicrotask;
2783
- return addHeapObject(ret);
2784
- };
2785
- imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
2786
- queueMicrotask(getObject(arg0));
2787
- };
2788
- imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
2789
- const ret = Promise.resolve(getObject(arg0));
2790
- return addHeapObject(ret);
2791
- };
2792
- imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
2793
- const ret = setTimeout(getObject(arg0), arg1);
2794
- return addHeapObject(ret);
2795
- }, arguments) };
2796
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
2797
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2798
- };
2799
- imports.wbg.__wbg_set_781438a03c0c3c81 = function() { return handleError(function (arg0, arg1, arg2) {
2800
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
2801
- return ret;
2802
- }, arguments) };
2803
- imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
2804
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2805
- };
2806
- imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
2807
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2808
- return addHeapObject(ret);
2809
- };
2810
- imports.wbg.__wbg_size_aeb57b993c620133 = function(arg0) {
2811
- const ret = getObject(arg0).size;
2812
- return ret;
2813
- };
2814
- imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
2815
- const ret = getObject(arg1).stack;
2816
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
2817
- const len1 = WASM_VECTOR_LEN;
2818
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2819
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2820
- };
2821
- imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
2822
- const ret = typeof global === 'undefined' ? null : global;
2823
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2824
- };
2825
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
2826
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
2827
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2828
- };
2829
- imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
2830
- const ret = typeof self === 'undefined' ? null : self;
2831
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2832
- };
2833
- imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
2834
- const ret = typeof window === 'undefined' ? null : window;
2835
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2836
- };
2837
- imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
2838
- const ret = getObject(arg0).then(getObject(arg1));
2839
- return addHeapObject(ret);
2840
- };
2841
- imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
2842
- console.warn(getObject(arg0));
2843
- };
2844
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
2845
- // Cast intrinsic for `Ref(String) -> Externref`.
2846
- const ret = getStringFromWasm0(arg0, arg1);
2847
- return addHeapObject(ret);
2848
- };
2849
- imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
2850
- // Cast intrinsic for `U64 -> Externref`.
2851
- const ret = BigInt.asUintN(64, arg0);
2852
- return addHeapObject(ret);
2853
- };
2854
- imports.wbg.__wbindgen_cast_7f089052c998c143 = function(arg0, arg1) {
2855
- // Cast intrinsic for `Closure(Closure { dtor_idx: 105, function: Function { arguments: [Externref], shim_idx: 106, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2856
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_919, __wasm_bindgen_func_elem_921);
2857
- return addHeapObject(ret);
2858
- };
2859
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
2860
- // Cast intrinsic for `F64 -> Externref`.
2861
- const ret = arg0;
2862
- return addHeapObject(ret);
2863
- };
2864
- imports.wbg.__wbindgen_cast_fa504d1cec41bd0d = function(arg0, arg1) {
2865
- // Cast intrinsic for `Closure(Closure { dtor_idx: 45, function: Function { arguments: [], shim_idx: 46, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2866
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_472, __wasm_bindgen_func_elem_474);
2867
- return addHeapObject(ret);
2868
- };
2869
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2870
- const ret = getObject(arg0);
2871
- return addHeapObject(ret);
2872
- };
2873
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2874
- takeObject(arg0);
2875
- };
2876
-
2877
- return imports;
2878
- }
2879
-
2880
- function __wbg_finalize_init(instance, module) {
2881
- wasm = instance.exports;
2882
- __wbg_init.__wbindgen_wasm_module = module;
2883
- cachedDataViewMemory0 = null;
2884
- cachedFloat32ArrayMemory0 = null;
2885
- cachedFloat64ArrayMemory0 = null;
2886
- cachedUint32ArrayMemory0 = null;
2887
- cachedUint8ArrayMemory0 = null;
2888
-
2889
-
2890
- wasm.__wbindgen_start();
2891
- return wasm;
2878
+ return false;
2879
+ }
2892
2880
  }
2893
2881
 
2894
2882
  function initSync(module) {
2895
2883
  if (wasm !== undefined) return wasm;
2896
2884
 
2897
2885
 
2898
- if (typeof module !== 'undefined') {
2886
+ if (module !== undefined) {
2899
2887
  if (Object.getPrototypeOf(module) === Object.prototype) {
2900
2888
  ({module} = module)
2901
2889
  } else {
@@ -2915,7 +2903,7 @@ async function __wbg_init(module_or_path) {
2915
2903
  if (wasm !== undefined) return wasm;
2916
2904
 
2917
2905
 
2918
- if (typeof module_or_path !== 'undefined') {
2906
+ if (module_or_path !== undefined) {
2919
2907
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
2920
2908
  ({module_or_path} = module_or_path)
2921
2909
  } else {
@@ -2923,7 +2911,7 @@ async function __wbg_init(module_or_path) {
2923
2911
  }
2924
2912
  }
2925
2913
 
2926
- if (typeof module_or_path === 'undefined') {
2914
+ if (module_or_path === undefined) {
2927
2915
  module_or_path = new URL('ifc-lite_bg.wasm', import.meta.url);
2928
2916
  }
2929
2917
  const imports = __wbg_get_imports();
@@ -2937,5 +2925,4 @@ async function __wbg_init(module_or_path) {
2937
2925
  return __wbg_finalize_init(instance, module);
2938
2926
  }
2939
2927
 
2940
- export { initSync };
2941
- export default __wbg_init;
2928
+ export { initSync, __wbg_init as default };