@ifc-lite/wasm 1.14.0 → 1.14.2

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_1026(arg0, arg1, arg2) {
202
- wasm.__wasm_bindgen_func_elem_1026(arg0, arg1, addHeapObject(arg2));
203
- }
204
-
205
- function __wasm_bindgen_func_elem_478(arg0, arg1) {
206
- wasm.__wasm_bindgen_func_elem_478(arg0, arg1);
207
- }
208
-
209
- function __wasm_bindgen_func_elem_1057(arg0, arg1, arg2, arg3) {
210
- wasm.__wasm_bindgen_func_elem_1057(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,94 +22,24 @@ export class GeoReferenceJs {
304
22
  wasm.__wbg_georeferencejs_free(ptr, 0);
305
23
  }
306
24
  /**
307
- * Eastings (X offset)
308
- * @returns {number}
309
- */
310
- get eastings() {
311
- const ret = wasm.__wbg_get_georeferencejs_eastings(this.__wbg_ptr);
312
- return ret;
313
- }
314
- /**
315
- * Eastings (X offset)
316
- * @param {number} arg0
317
- */
318
- set eastings(arg0) {
319
- wasm.__wbg_set_georeferencejs_eastings(this.__wbg_ptr, arg0);
320
- }
321
- /**
322
- * Northings (Y offset)
323
- * @returns {number}
324
- */
325
- get northings() {
326
- const ret = wasm.__wbg_get_georeferencejs_northings(this.__wbg_ptr);
327
- return ret;
328
- }
329
- /**
330
- * Northings (Y offset)
331
- * @param {number} arg0
332
- */
333
- set northings(arg0) {
334
- wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
335
- }
336
- /**
337
- * Orthogonal height (Z offset)
338
- * @returns {number}
339
- */
340
- get orthogonal_height() {
341
- const ret = wasm.__wbg_get_georeferencejs_orthogonal_height(this.__wbg_ptr);
342
- return ret;
343
- }
344
- /**
345
- * Orthogonal height (Z offset)
346
- * @param {number} arg0
347
- */
348
- set orthogonal_height(arg0) {
349
- wasm.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr, arg0);
350
- }
351
- /**
352
- * X-axis abscissa (cos of rotation)
353
- * @returns {number}
354
- */
355
- get x_axis_abscissa() {
356
- const ret = wasm.__wbg_get_georeferencejs_x_axis_abscissa(this.__wbg_ptr);
357
- return ret;
358
- }
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
- /**
367
- * X-axis ordinate (sin of rotation)
368
- * @returns {number}
369
- */
370
- get x_axis_ordinate() {
371
- const ret = wasm.__wbg_get_georeferencejs_x_axis_ordinate(this.__wbg_ptr);
372
- return ret;
373
- }
374
- /**
375
- * X-axis ordinate (sin of rotation)
376
- * @param {number} arg0
377
- */
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;
388
- }
389
- /**
390
- * Scale factor
391
- * @param {number} arg0
25
+ * Get CRS name
26
+ * @returns {string | undefined}
392
27
  */
393
- set scale(arg0) {
394
- wasm.__wbg_set_georeferencejs_scale(this.__wbg_ptr, arg0);
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
+ }
395
43
  }
396
44
  /**
397
45
  * Transform local coordinates to map coordinates
@@ -433,26 +81,6 @@ export class GeoReferenceJs {
433
81
  wasm.__wbindgen_add_to_stack_pointer(16);
434
82
  }
435
83
  }
436
- /**
437
- * Get CRS name
438
- * @returns {string | undefined}
439
- */
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
- }
455
- }
456
84
  /**
457
85
  * Get rotation angle in radians
458
86
  * @returns {number}
@@ -478,6 +106,96 @@ export class GeoReferenceJs {
478
106
  wasm.__wbindgen_add_to_stack_pointer(16);
479
107
  }
480
108
  }
109
+ /**
110
+ * Eastings (X offset)
111
+ * @returns {number}
112
+ */
113
+ get eastings() {
114
+ const ret = wasm.__wbg_get_georeferencejs_eastings(this.__wbg_ptr);
115
+ return ret;
116
+ }
117
+ /**
118
+ * Northings (Y offset)
119
+ * @returns {number}
120
+ */
121
+ get northings() {
122
+ const ret = wasm.__wbg_get_georeferencejs_northings(this.__wbg_ptr);
123
+ return ret;
124
+ }
125
+ /**
126
+ * Orthogonal height (Z offset)
127
+ * @returns {number}
128
+ */
129
+ get orthogonal_height() {
130
+ const ret = wasm.__wbg_get_georeferencejs_orthogonal_height(this.__wbg_ptr);
131
+ return ret;
132
+ }
133
+ /**
134
+ * Scale factor
135
+ * @returns {number}
136
+ */
137
+ get scale() {
138
+ const ret = wasm.__wbg_get_georeferencejs_scale(this.__wbg_ptr);
139
+ return ret;
140
+ }
141
+ /**
142
+ * X-axis abscissa (cos of rotation)
143
+ * @returns {number}
144
+ */
145
+ get x_axis_abscissa() {
146
+ const ret = wasm.__wbg_get_georeferencejs_x_axis_abscissa(this.__wbg_ptr);
147
+ return ret;
148
+ }
149
+ /**
150
+ * X-axis ordinate (sin of rotation)
151
+ * @returns {number}
152
+ */
153
+ get x_axis_ordinate() {
154
+ const ret = wasm.__wbg_get_georeferencejs_x_axis_ordinate(this.__wbg_ptr);
155
+ return ret;
156
+ }
157
+ /**
158
+ * Eastings (X offset)
159
+ * @param {number} arg0
160
+ */
161
+ set eastings(arg0) {
162
+ wasm.__wbg_set_georeferencejs_eastings(this.__wbg_ptr, arg0);
163
+ }
164
+ /**
165
+ * Northings (Y offset)
166
+ * @param {number} arg0
167
+ */
168
+ set northings(arg0) {
169
+ wasm.__wbg_set_georeferencejs_northings(this.__wbg_ptr, arg0);
170
+ }
171
+ /**
172
+ * Orthogonal height (Z offset)
173
+ * @param {number} arg0
174
+ */
175
+ set orthogonal_height(arg0) {
176
+ wasm.__wbg_set_georeferencejs_orthogonal_height(this.__wbg_ptr, arg0);
177
+ }
178
+ /**
179
+ * Scale factor
180
+ * @param {number} arg0
181
+ */
182
+ set scale(arg0) {
183
+ wasm.__wbg_set_georeferencejs_scale(this.__wbg_ptr, arg0);
184
+ }
185
+ /**
186
+ * X-axis abscissa (cos of rotation)
187
+ * @param {number} arg0
188
+ */
189
+ set x_axis_abscissa(arg0) {
190
+ wasm.__wbg_set_georeferencejs_x_axis_abscissa(this.__wbg_ptr, arg0);
191
+ }
192
+ /**
193
+ * X-axis ordinate (sin of rotation)
194
+ * @param {number} arg0
195
+ */
196
+ set x_axis_ordinate(arg0) {
197
+ wasm.__wbg_set_georeferencejs_x_axis_ordinate(this.__wbg_ptr, arg0);
198
+ }
481
199
  }
482
200
  if (Symbol.dispose) GeoReferenceJs.prototype[Symbol.dispose] = GeoReferenceJs.prototype.free;
483
201
 
@@ -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,94 +338,29 @@ 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
571
344
  * @param {number} y
572
- * @param {number} z
573
- */
574
- set_rtc_offset(x, y, z) {
575
- wasm.gpugeometry_set_rtc_offset(this.__wbg_ptr, x, y, z);
576
- }
577
- /**
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.
590
- * @returns {number}
591
- */
592
- get vertexDataPtr() {
593
- const ret = wasm.gpugeometry_vertexDataPtr(this.__wbg_ptr);
594
- return ret >>> 0;
595
- }
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
- /**
627
- * Get total vertex count
628
- * @returns {number}
345
+ * @param {number} z
629
346
  */
630
- get totalVertexCount() {
631
- const ret = wasm.gpugeometry_totalVertexCount(this.__wbg_ptr);
632
- return ret >>> 0;
347
+ set_rtc_offset(x, y, z) {
348
+ wasm.gpugeometry_set_rtc_offset(this.__wbg_ptr, x, y, z);
633
349
  }
634
350
  /**
635
- * Get byte length of indices (for GPU buffer creation)
351
+ * Get total triangle count
636
352
  * @returns {number}
637
353
  */
638
- get indicesByteLength() {
639
- const ret = wasm.gpugeometry_indicesByteLength(this.__wbg_ptr);
354
+ get totalTriangleCount() {
355
+ const ret = wasm.gpugeometry_totalTriangleCount(this.__wbg_ptr);
640
356
  return ret >>> 0;
641
357
  }
642
358
  /**
643
- * Get total triangle count
359
+ * Get total vertex count
644
360
  * @returns {number}
645
361
  */
646
- get totalTriangleCount() {
647
- const ret = wasm.gpugeometry_totalTriangleCount(this.__wbg_ptr);
362
+ get totalVertexCount() {
363
+ const ret = wasm.gpugeometry_totalVertexCount(this.__wbg_ptr);
648
364
  return ret >>> 0;
649
365
  }
650
366
  /**
@@ -656,21 +372,23 @@ export class GpuGeometry {
656
372
  return ret >>> 0;
657
373
  }
658
374
  /**
659
- * Create a new empty GPU geometry container
375
+ * Get length of vertex data array (in f32 elements, not bytes)
376
+ * @returns {number}
660
377
  */
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;
378
+ get vertexDataLen() {
379
+ const ret = wasm.gpugeometry_vertexDataLen(this.__wbg_ptr);
380
+ return ret >>> 0;
666
381
  }
667
382
  /**
668
- * Check if geometry is empty
669
- * @returns {boolean}
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.
387
+ * @returns {number}
670
388
  */
671
- get isEmpty() {
672
- const ret = wasm.gpugeometry_isEmpty(this.__wbg_ptr);
673
- return ret !== 0;
389
+ get vertexDataPtr() {
390
+ const ret = wasm.gpugeometry_vertexDataPtr(this.__wbg_ptr);
391
+ return ret >>> 0;
674
392
  }
675
393
  }
676
394
  if (Symbol.dispose) GpuGeometry.prototype[Symbol.dispose] = GpuGeometry.prototype.free;
@@ -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,43 +457,53 @@ 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
  }
485
+ /**
486
+ * Create new instanced geometry
487
+ * @param {bigint} geometry_id
488
+ */
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;
494
+ }
767
495
  /**
768
496
  * @returns {number}
769
497
  */
770
- get instanceDataPtr() {
771
- const ret = wasm.gpuinstancedgeometry_instanceDataPtr(this.__wbg_ptr);
498
+ get triangleCount() {
499
+ const ret = wasm.gpuinstancedgeometry_triangleCount(this.__wbg_ptr);
772
500
  return ret >>> 0;
773
501
  }
774
502
  /**
775
503
  * @returns {number}
776
504
  */
777
- get indicesByteLength() {
778
- const ret = wasm.gpuinstancedgeometry_indicesByteLength(this.__wbg_ptr);
505
+ get vertexCount() {
506
+ const ret = wasm.gpuinstancedgeometry_vertexCount(this.__wbg_ptr);
779
507
  return ret >>> 0;
780
508
  }
781
509
  /**
@@ -788,27 +516,17 @@ export class GpuInstancedGeometry {
788
516
  /**
789
517
  * @returns {number}
790
518
  */
791
- get instanceExpressIdsPtr() {
792
- const ret = wasm.gpuinstancedgeometry_instanceExpressIdsPtr(this.__wbg_ptr);
519
+ get vertexDataLen() {
520
+ const ret = wasm.gpuinstancedgeometry_vertexDataLen(this.__wbg_ptr);
793
521
  return ret >>> 0;
794
522
  }
795
523
  /**
796
524
  * @returns {number}
797
525
  */
798
- get instanceDataByteLength() {
799
- const ret = wasm.gpuinstancedgeometry_instanceDataByteLength(this.__wbg_ptr);
526
+ get vertexDataPtr() {
527
+ const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
800
528
  return ret >>> 0;
801
529
  }
802
- /**
803
- * Create new instanced geometry
804
- * @param {bigint} geometry_id
805
- */
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;
811
- }
812
530
  }
813
531
  if (Symbol.dispose) GpuInstancedGeometry.prototype[Symbol.dispose] = GpuInstancedGeometry.prototype.free;
814
532
 
@@ -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
  }
@@ -997,6 +715,22 @@ export class GpuMeshMetadata {
997
715
  const ptr = this.__destroy_into_raw();
998
716
  wasm.__wbg_gpumeshmetadata_free(ptr, 0);
999
717
  }
718
+ /**
719
+ * @returns {Float32Array}
720
+ */
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
+ }
733
+ }
1000
734
  /**
1001
735
  * @returns {number}
1002
736
  */
@@ -1004,6 +738,13 @@ export class GpuMeshMetadata {
1004
738
  const ret = wasm.gpumeshmetadata_expressId(this.__wbg_ptr);
1005
739
  return ret >>> 0;
1006
740
  }
741
+ /**
742
+ * @returns {number}
743
+ */
744
+ get ifcTypeIdx() {
745
+ const ret = wasm.gpumeshmetadata_ifcTypeIdx(this.__wbg_ptr);
746
+ return ret;
747
+ }
1007
748
  /**
1008
749
  * @returns {number}
1009
750
  */
@@ -1012,65 +753,153 @@ export class GpuMeshMetadata {
1012
753
  return ret >>> 0;
1013
754
  }
1014
755
  /**
1015
- * @returns {number}
756
+ * @returns {number}
757
+ */
758
+ get indexOffset() {
759
+ const ret = wasm.gpumeshmetadata_indexOffset(this.__wbg_ptr);
760
+ return ret >>> 0;
761
+ }
762
+ /**
763
+ * @returns {number}
764
+ */
765
+ get vertexCount() {
766
+ const ret = wasm.gpumeshmetadata_vertexCount(this.__wbg_ptr);
767
+ return ret >>> 0;
768
+ }
769
+ /**
770
+ * @returns {number}
771
+ */
772
+ get vertexOffset() {
773
+ const ret = wasm.gpumeshmetadata_vertexOffset(this.__wbg_ptr);
774
+ return ret >>> 0;
775
+ }
776
+ }
777
+ if (Symbol.dispose) GpuMeshMetadata.prototype[Symbol.dispose] = GpuMeshMetadata.prototype.free;
778
+
779
+ /**
780
+ * Main IFC-Lite API
781
+ */
782
+ export class IfcAPI {
783
+ __destroy_into_raw() {
784
+ const ptr = this.__wbg_ptr;
785
+ this.__wbg_ptr = 0;
786
+ IfcAPIFinalization.unregister(this);
787
+ return ptr;
788
+ }
789
+ free() {
790
+ const ptr = this.__destroy_into_raw();
791
+ wasm.__wbg_ifcapi_free(ptr, 0);
792
+ }
793
+ /**
794
+ * Debug: Test processing entity #953 (FacetedBrep wall)
795
+ * @param {string} content
796
+ * @returns {string}
797
+ */
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
+ }
815
+ }
816
+ /**
817
+ * Debug: Test processing a single wall
818
+ * @param {string} content
819
+ * @returns {string}
820
+ */
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
+ }
838
+ }
839
+ /**
840
+ * Extract georeferencing information from IFC content
841
+ * Returns null if no georeferencing is present
842
+ *
843
+ * Example:
844
+ * ```javascript
845
+ * const api = new IfcAPI();
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
+ * }
851
+ * ```
852
+ * @param {string} content
853
+ * @returns {GeoReferenceJs | undefined}
1016
854
  */
1017
- get ifcTypeIdx() {
1018
- const ret = wasm.gpumeshmetadata_ifcTypeIdx(this.__wbg_ptr);
1019
- return ret;
855
+ getGeoReference(content) {
856
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
857
+ const len0 = WASM_VECTOR_LEN;
858
+ const ret = wasm.ifcapi_getGeoReference(this.__wbg_ptr, ptr0, len0);
859
+ return ret === 0 ? undefined : GeoReferenceJs.__wrap(ret);
1020
860
  }
1021
861
  /**
1022
- * @returns {number}
862
+ * Get WASM memory for zero-copy access
863
+ * @returns {any}
1023
864
  */
1024
- get indexOffset() {
1025
- const ret = wasm.gpumeshmetadata_indexOffset(this.__wbg_ptr);
1026
- return ret >>> 0;
865
+ getMemory() {
866
+ const ret = wasm.ifcapi_getMemory(this.__wbg_ptr);
867
+ return takeObject(ret);
1027
868
  }
1028
869
  /**
1029
- * @returns {number}
870
+ * Check if API is initialized
871
+ * @returns {boolean}
1030
872
  */
1031
- get vertexCount() {
1032
- const ret = wasm.gpumeshmetadata_vertexCount(this.__wbg_ptr);
1033
- return ret >>> 0;
873
+ get is_ready() {
874
+ const ret = wasm.ifcapi_is_ready(this.__wbg_ptr);
875
+ return ret !== 0;
1034
876
  }
1035
877
  /**
1036
- * @returns {number}
878
+ * Create and initialize the IFC API
1037
879
  */
1038
- get vertexOffset() {
1039
- const ret = wasm.gpumeshmetadata_vertexOffset(this.__wbg_ptr);
1040
- return ret >>> 0;
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;
1041
885
  }
1042
886
  /**
1043
- * @returns {Float32Array}
887
+ * Parse IFC file (traditional - waits for completion)
888
+ *
889
+ * Example:
890
+ * ```javascript
891
+ * const api = new IfcAPI();
892
+ * const result = await api.parse(ifcData);
893
+ * console.log('Entities:', result.entityCount);
894
+ * ```
895
+ * @param {string} content
896
+ * @returns {Promise<any>}
1044
897
  */
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
- }
1059
- if (Symbol.dispose) GpuMeshMetadata.prototype[Symbol.dispose] = GpuMeshMetadata.prototype.free;
1060
-
1061
- /**
1062
- * Main IFC-Lite API
1063
- */
1064
- export class IfcAPI {
1065
- __destroy_into_raw() {
1066
- const ptr = this.__wbg_ptr;
1067
- this.__wbg_ptr = 0;
1068
- IfcAPIFinalization.unregister(this);
1069
- return ptr;
1070
- }
1071
- free() {
1072
- const ptr = this.__destroy_into_raw();
1073
- wasm.__wbg_ifcapi_free(ptr, 0);
898
+ parse(content) {
899
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
900
+ const len0 = WASM_VECTOR_LEN;
901
+ const ret = wasm.ifcapi_parse(this.__wbg_ptr, ptr0, len0);
902
+ return takeObject(ret);
1074
903
  }
1075
904
  /**
1076
905
  * Parse IFC file and return individual meshes with express IDs and colors
@@ -1090,55 +919,182 @@ export class IfcAPI {
1090
919
  * @param {string} content
1091
920
  * @returns {MeshCollection}
1092
921
  */
1093
- parseMeshes(content) {
922
+ parseMeshes(content) {
923
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
924
+ const len0 = WASM_VECTOR_LEN;
925
+ const ret = wasm.ifcapi_parseMeshes(this.__wbg_ptr, ptr0, len0);
926
+ return MeshCollection.__wrap(ret);
927
+ }
928
+ /**
929
+ * Parse IFC file with streaming mesh batches for progressive rendering
930
+ * Calls the callback with batches of meshes, yielding to browser between batches
931
+ *
932
+ * Options:
933
+ * - `batchSize`: Number of meshes per batch (default: 25)
934
+ * - `onBatch(meshes, progress)`: Called for each batch of meshes
935
+ * - `onRtcOffset({x, y, z, hasRtc})`: Called early with RTC offset for camera/world setup
936
+ * - `onColorUpdate(Map<id, color>)`: Called with style updates after initial render
937
+ * - `onComplete(stats)`: Called when parsing completes with stats including rtcOffset
938
+ *
939
+ * Example:
940
+ * ```javascript
941
+ * const api = new IfcAPI();
942
+ * await api.parseMeshesAsync(ifcData, {
943
+ * batchSize: 100,
944
+ * onRtcOffset: (rtc) => {
945
+ * if (rtc.hasRtc) {
946
+ * // Model uses large coordinates - adjust camera/world origin
947
+ * viewer.setWorldOffset(rtc.x, rtc.y, rtc.z);
948
+ * }
949
+ * },
950
+ * onBatch: (meshes, progress) => {
951
+ * for (const mesh of meshes) {
952
+ * scene.add(createThreeMesh(mesh));
953
+ * }
954
+ * console.log(`Progress: ${progress.percent}%`);
955
+ * },
956
+ * onComplete: (stats) => {
957
+ * console.log(`Done! ${stats.totalMeshes} meshes`);
958
+ * // stats.rtcOffset also available here: {x, y, z, hasRtc}
959
+ * }
960
+ * });
961
+ * ```
962
+ * @param {string} content
963
+ * @param {any} options
964
+ * @returns {Promise<any>}
965
+ */
966
+ parseMeshesAsync(content, options) {
967
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
968
+ const len0 = WASM_VECTOR_LEN;
969
+ const ret = wasm.ifcapi_parseMeshesAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
970
+ return takeObject(ret);
971
+ }
972
+ /**
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
+ * ```
991
+ * @param {string} content
992
+ * @returns {InstancedMeshCollection}
993
+ */
994
+ parseMeshesInstanced(content) {
995
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
996
+ const len0 = WASM_VECTOR_LEN;
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));
1028
+ return takeObject(ret);
1029
+ }
1030
+ /**
1031
+ * Parse IFC file and return mesh with RTC offset for large coordinates
1032
+ * This handles georeferenced models by shifting to centroid
1033
+ *
1034
+ * Example:
1035
+ * ```javascript
1036
+ * const api = new IfcAPI();
1037
+ * const result = api.parseMeshesWithRtc(ifcData);
1038
+ * const rtcOffset = result.rtcOffset;
1039
+ * const meshes = result.meshes;
1040
+ *
1041
+ * // Convert local coords back to world:
1042
+ * if (rtcOffset.isSignificant()) {
1043
+ * const [wx, wy, wz] = rtcOffset.toWorld(localX, localY, localZ);
1044
+ * }
1045
+ * ```
1046
+ * @param {string} content
1047
+ * @returns {MeshCollectionWithRtc}
1048
+ */
1049
+ parseMeshesWithRtc(content) {
1050
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1051
+ const len0 = WASM_VECTOR_LEN;
1052
+ const ret = wasm.ifcapi_parseMeshesWithRtc(this.__wbg_ptr, ptr0, len0);
1053
+ return MeshCollectionWithRtc.__wrap(ret);
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) {
1094
1071
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1095
1072
  const len0 = WASM_VECTOR_LEN;
1096
- const ret = wasm.ifcapi_parseMeshes(this.__wbg_ptr, ptr0, len0);
1097
- return MeshCollection.__wrap(ret);
1073
+ const ret = wasm.ifcapi_parseStreaming(this.__wbg_ptr, ptr0, len0, addHeapObject(callback));
1074
+ return takeObject(ret);
1098
1075
  }
1099
1076
  /**
1100
- * Parse IFC file with streaming mesh batches for progressive rendering
1101
- * Calls the callback with batches of meshes, yielding to browser between batches
1102
- *
1103
- * Options:
1104
- * - `batchSize`: Number of meshes per batch (default: 25)
1105
- * - `onBatch(meshes, progress)`: Called for each batch of meshes
1106
- * - `onRtcOffset({x, y, z, hasRtc})`: Called early with RTC offset for camera/world setup
1107
- * - `onColorUpdate(Map<id, color>)`: Called with style updates after initial render
1108
- * - `onComplete(stats)`: Called when parsing completes with stats including rtcOffset
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
1109
1079
  *
1110
1080
  * Example:
1111
1081
  * ```javascript
1112
1082
  * const api = new IfcAPI();
1113
- * await api.parseMeshesAsync(ifcData, {
1114
- * batchSize: 100,
1115
- * onRtcOffset: (rtc) => {
1116
- * if (rtc.hasRtc) {
1117
- * // Model uses large coordinates - adjust camera/world origin
1118
- * viewer.setWorldOffset(rtc.x, rtc.y, rtc.z);
1119
- * }
1120
- * },
1121
- * onBatch: (meshes, progress) => {
1122
- * for (const mesh of meshes) {
1123
- * scene.add(createThreeMesh(mesh));
1124
- * }
1125
- * console.log(`Progress: ${progress.percent}%`);
1126
- * },
1127
- * onComplete: (stats) => {
1128
- * console.log(`Done! ${stats.totalMeshes} meshes`);
1129
- * // stats.rtcOffset also available here: {x, y, z, hasRtc}
1130
- * }
1131
- * });
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
+ * }
1132
1089
  * ```
1133
1090
  * @param {string} content
1134
- * @param {any} options
1135
- * @returns {Promise<any>}
1091
+ * @returns {SymbolicRepresentationCollection}
1136
1092
  */
1137
- parseMeshesAsync(content, options) {
1093
+ parseSymbolicRepresentations(content) {
1138
1094
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1139
1095
  const len0 = WASM_VECTOR_LEN;
1140
- const ret = wasm.ifcapi_parseMeshesAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1141
- return takeObject(ret);
1096
+ const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
1097
+ return SymbolicRepresentationCollection.__wrap(ret);
1142
1098
  }
1143
1099
  /**
1144
1100
  * Parse IFC file and return GPU-ready geometry for zero-copy upload
@@ -1184,34 +1140,6 @@ export class IfcAPI {
1184
1140
  const ret = wasm.ifcapi_parseToGpuGeometry(this.__wbg_ptr, ptr0, len0);
1185
1141
  return GpuGeometry.__wrap(ret);
1186
1142
  }
1187
- /**
1188
- * Parse IFC file and return instanced geometry grouped by geometry hash
1189
- * This reduces draw calls by grouping identical geometries with different transforms
1190
- *
1191
- * Example:
1192
- * ```javascript
1193
- * const api = new IfcAPI();
1194
- * const collection = api.parseMeshesInstanced(ifcData);
1195
- * for (let i = 0; i < collection.length; i++) {
1196
- * const geometry = collection.get(i);
1197
- * console.log('Geometry ID:', geometry.geometryId);
1198
- * console.log('Instances:', geometry.instanceCount);
1199
- * for (let j = 0; j < geometry.instanceCount; j++) {
1200
- * const inst = geometry.getInstance(j);
1201
- * console.log(' Express ID:', inst.expressId);
1202
- * console.log(' Transform:', inst.transform);
1203
- * }
1204
- * }
1205
- * ```
1206
- * @param {string} content
1207
- * @returns {InstancedMeshCollection}
1208
- */
1209
- parseMeshesInstanced(content) {
1210
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1211
- const len0 = WASM_VECTOR_LEN;
1212
- const ret = wasm.ifcapi_parseMeshesInstanced(this.__wbg_ptr, ptr0, len0);
1213
- return InstancedMeshCollection.__wrap(ret);
1214
- }
1215
1143
  /**
1216
1144
  * Parse IFC file with streaming GPU-ready geometry batches
1217
1145
  *
@@ -1254,36 +1182,6 @@ export class IfcAPI {
1254
1182
  const ret = wasm.ifcapi_parseToGpuGeometryAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1255
1183
  return takeObject(ret);
1256
1184
  }
1257
- /**
1258
- * Parse IFC file with streaming instanced geometry batches for progressive rendering
1259
- * Groups identical geometries and yields batches of InstancedGeometry
1260
- * Uses fast-first-frame streaming: simple geometry (walls, slabs) first
1261
- *
1262
- * Example:
1263
- * ```javascript
1264
- * const api = new IfcAPI();
1265
- * await api.parseMeshesInstancedAsync(ifcData, {
1266
- * batchSize: 25, // Number of unique geometries per batch
1267
- * onBatch: (geometries, progress) => {
1268
- * for (const geom of geometries) {
1269
- * renderer.addInstancedGeometry(geom);
1270
- * }
1271
- * },
1272
- * onComplete: (stats) => {
1273
- * console.log(`Done! ${stats.totalGeometries} unique geometries, ${stats.totalInstances} instances`);
1274
- * }
1275
- * });
1276
- * ```
1277
- * @param {string} content
1278
- * @param {any} options
1279
- * @returns {Promise<any>}
1280
- */
1281
- parseMeshesInstancedAsync(content, options) {
1282
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1283
- const len0 = WASM_VECTOR_LEN;
1284
- const ret = wasm.ifcapi_parseMeshesInstancedAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1285
- return takeObject(ret);
1286
- }
1287
1185
  /**
1288
1186
  * Parse IFC file to GPU-ready instanced geometry for zero-copy upload
1289
1187
  *
@@ -1327,120 +1225,6 @@ export class IfcAPI {
1327
1225
  const ret = wasm.ifcapi_parseZeroCopy(this.__wbg_ptr, ptr0, len0);
1328
1226
  return ZeroCopyMesh.__wrap(ret);
1329
1227
  }
1330
- /**
1331
- * Debug: Test processing entity #953 (FacetedBrep wall)
1332
- * @param {string} content
1333
- * @returns {string}
1334
- */
1335
- debugProcessEntity953(content) {
1336
- let deferred2_0;
1337
- let deferred2_1;
1338
- try {
1339
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1340
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1341
- const len0 = WASM_VECTOR_LEN;
1342
- wasm.ifcapi_debugProcessEntity953(retptr, this.__wbg_ptr, ptr0, len0);
1343
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1344
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1345
- deferred2_0 = r0;
1346
- deferred2_1 = r1;
1347
- return getStringFromWasm0(r0, r1);
1348
- } finally {
1349
- wasm.__wbindgen_add_to_stack_pointer(16);
1350
- wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
1351
- }
1352
- }
1353
- /**
1354
- * Debug: Test processing a single wall
1355
- * @param {string} content
1356
- * @returns {string}
1357
- */
1358
- debugProcessFirstWall(content) {
1359
- let deferred2_0;
1360
- let deferred2_1;
1361
- try {
1362
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1363
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1364
- const len0 = WASM_VECTOR_LEN;
1365
- wasm.ifcapi_debugProcessFirstWall(retptr, this.__wbg_ptr, ptr0, len0);
1366
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1367
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1368
- deferred2_0 = r0;
1369
- deferred2_1 = r1;
1370
- return getStringFromWasm0(r0, r1);
1371
- } finally {
1372
- wasm.__wbindgen_add_to_stack_pointer(16);
1373
- wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
1374
- }
1375
- }
1376
- /**
1377
- * Extract georeferencing information from IFC content
1378
- * Returns null if no georeferencing is present
1379
- *
1380
- * Example:
1381
- * ```javascript
1382
- * const api = new IfcAPI();
1383
- * const georef = api.getGeoReference(ifcData);
1384
- * if (georef) {
1385
- * console.log('CRS:', georef.crsName);
1386
- * const [e, n, h] = georef.localToMap(10, 20, 5);
1387
- * }
1388
- * ```
1389
- * @param {string} content
1390
- * @returns {GeoReferenceJs | undefined}
1391
- */
1392
- getGeoReference(content) {
1393
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1394
- const len0 = WASM_VECTOR_LEN;
1395
- const ret = wasm.ifcapi_getGeoReference(this.__wbg_ptr, ptr0, len0);
1396
- return ret === 0 ? undefined : GeoReferenceJs.__wrap(ret);
1397
- }
1398
- /**
1399
- * Parse IFC file and return mesh with RTC offset for large coordinates
1400
- * This handles georeferenced models by shifting to centroid
1401
- *
1402
- * Example:
1403
- * ```javascript
1404
- * const api = new IfcAPI();
1405
- * const result = api.parseMeshesWithRtc(ifcData);
1406
- * const rtcOffset = result.rtcOffset;
1407
- * const meshes = result.meshes;
1408
- *
1409
- * // Convert local coords back to world:
1410
- * if (rtcOffset.isSignificant()) {
1411
- * const [wx, wy, wz] = rtcOffset.toWorld(localX, localY, localZ);
1412
- * }
1413
- * ```
1414
- * @param {string} content
1415
- * @returns {MeshCollectionWithRtc}
1416
- */
1417
- parseMeshesWithRtc(content) {
1418
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1419
- const len0 = WASM_VECTOR_LEN;
1420
- const ret = wasm.ifcapi_parseMeshesWithRtc(this.__wbg_ptr, ptr0, len0);
1421
- return MeshCollectionWithRtc.__wrap(ret);
1422
- }
1423
- /**
1424
- * Parse IFC file with streaming events
1425
- * Calls the callback function for each parse event
1426
- *
1427
- * Example:
1428
- * ```javascript
1429
- * const api = new IfcAPI();
1430
- * await api.parseStreaming(ifcData, (event) => {
1431
- * console.log('Event:', event);
1432
- * });
1433
- * ```
1434
- * @param {string} content
1435
- * @param {Function} callback
1436
- * @returns {Promise<any>}
1437
- */
1438
- parseStreaming(content, callback) {
1439
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1440
- const len0 = WASM_VECTOR_LEN;
1441
- const ret = wasm.ifcapi_parseStreaming(this.__wbg_ptr, ptr0, len0, addHeapObject(callback));
1442
- return takeObject(ret);
1443
- }
1444
1228
  /**
1445
1229
  * Fast entity scanning using SIMD-accelerated Rust scanner
1446
1230
  * Returns array of entity references for data model parsing
@@ -1454,6 +1238,19 @@ export class IfcAPI {
1454
1238
  const ret = wasm.ifcapi_scanEntitiesFast(this.__wbg_ptr, ptr0, len0);
1455
1239
  return takeObject(ret);
1456
1240
  }
1241
+ /**
1242
+ * Fast entity scanning from raw bytes (avoids TextDecoder.decode on JS side).
1243
+ * Accepts Uint8Array directly — saves ~2-5s for 487MB files by skipping
1244
+ * JS string creation and UTF-16→UTF-8 conversion.
1245
+ * @param {Uint8Array} data
1246
+ * @returns {any}
1247
+ */
1248
+ scanEntitiesFastBytes(data) {
1249
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export3);
1250
+ const len0 = WASM_VECTOR_LEN;
1251
+ const ret = wasm.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr, ptr0, len0);
1252
+ return takeObject(ret);
1253
+ }
1457
1254
  /**
1458
1255
  * Fast geometry-only entity scanning
1459
1256
  * Scans only entities that have geometry, skipping 99% of non-geometry entities
@@ -1468,41 +1265,6 @@ export class IfcAPI {
1468
1265
  const ret = wasm.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, ptr0, len0);
1469
1266
  return takeObject(ret);
1470
1267
  }
1471
- /**
1472
- * Parse IFC file (traditional - waits for completion)
1473
- *
1474
- * Example:
1475
- * ```javascript
1476
- * const api = new IfcAPI();
1477
- * const result = await api.parse(ifcData);
1478
- * console.log('Entities:', result.entityCount);
1479
- * ```
1480
- * @param {string} content
1481
- * @returns {Promise<any>}
1482
- */
1483
- parse(content) {
1484
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1485
- const len0 = WASM_VECTOR_LEN;
1486
- const ret = wasm.ifcapi_parse(this.__wbg_ptr, ptr0, len0);
1487
- return takeObject(ret);
1488
- }
1489
- /**
1490
- * Get WASM memory for zero-copy access
1491
- * @returns {any}
1492
- */
1493
- getMemory() {
1494
- const ret = wasm.ifcapi_getMemory(this.__wbg_ptr);
1495
- return takeObject(ret);
1496
- }
1497
- /**
1498
- * Create and initialize the IFC API
1499
- */
1500
- constructor() {
1501
- const ret = wasm.ifcapi_new();
1502
- this.__wbg_ptr = ret >>> 0;
1503
- IfcAPIFinalization.register(this, this.__wbg_ptr, this);
1504
- return this;
1505
- }
1506
1268
  /**
1507
1269
  * Get version string
1508
1270
  * @returns {string}
@@ -1523,37 +1285,6 @@ export class IfcAPI {
1523
1285
  wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
1524
1286
  }
1525
1287
  }
1526
- /**
1527
- * Check if API is initialized
1528
- * @returns {boolean}
1529
- */
1530
- get is_ready() {
1531
- const ret = wasm.ifcapi_is_ready(this.__wbg_ptr);
1532
- return ret !== 0;
1533
- }
1534
- /**
1535
- * Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
1536
- * These are 2D curves used for architectural drawings instead of sectioning 3D geometry
1537
- *
1538
- * Example:
1539
- * ```javascript
1540
- * const api = new IfcAPI();
1541
- * const symbols = api.parseSymbolicRepresentations(ifcData);
1542
- * console.log('Found', symbols.totalCount, 'symbolic items');
1543
- * for (let i = 0; i < symbols.polylineCount; i++) {
1544
- * const polyline = symbols.getPolyline(i);
1545
- * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
1546
- * }
1547
- * ```
1548
- * @param {string} content
1549
- * @returns {SymbolicRepresentationCollection}
1550
- */
1551
- parseSymbolicRepresentations(content) {
1552
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1553
- const len0 = WASM_VECTOR_LEN;
1554
- const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
1555
- return SymbolicRepresentationCollection.__wrap(ret);
1556
- }
1557
1288
  }
1558
1289
  if (Symbol.dispose) IfcAPI.prototype[Symbol.dispose] = IfcAPI.prototype.free;
1559
1290
 
@@ -1578,13 +1309,6 @@ export class InstanceData {
1578
1309
  const ptr = this.__destroy_into_raw();
1579
1310
  wasm.__wbg_instancedata_free(ptr, 0);
1580
1311
  }
1581
- /**
1582
- * @returns {number}
1583
- */
1584
- get expressId() {
1585
- const ret = wasm.instancedata_expressId(this.__wbg_ptr);
1586
- return ret >>> 0;
1587
- }
1588
1312
  /**
1589
1313
  * @returns {Float32Array}
1590
1314
  */
@@ -1601,6 +1325,13 @@ export class InstanceData {
1601
1325
  wasm.__wbindgen_add_to_stack_pointer(16);
1602
1326
  }
1603
1327
  }
1328
+ /**
1329
+ * @returns {number}
1330
+ */
1331
+ get expressId() {
1332
+ const ret = wasm.instancedata_expressId(this.__wbg_ptr);
1333
+ return ret >>> 0;
1334
+ }
1604
1335
  /**
1605
1336
  * @returns {Float32Array}
1606
1337
  */
@@ -1636,7 +1367,7 @@ export class InstancedGeometry {
1636
1367
  * @returns {bigint}
1637
1368
  */
1638
1369
  get geometryId() {
1639
- const ret = wasm.gpuinstancedgeometry_geometryId(this.__wbg_ptr);
1370
+ const ret = wasm.instancedgeometry_geometryId(this.__wbg_ptr);
1640
1371
  return BigInt.asUintN(64, ret);
1641
1372
  }
1642
1373
  /**
@@ -1647,13 +1378,6 @@ export class InstancedGeometry {
1647
1378
  const ret = wasm.instancedgeometry_get_instance(this.__wbg_ptr, index);
1648
1379
  return ret === 0 ? undefined : InstanceData.__wrap(ret);
1649
1380
  }
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
1381
  /**
1658
1382
  * @returns {Uint32Array}
1659
1383
  */
@@ -1661,6 +1385,13 @@ export class InstancedGeometry {
1661
1385
  const ret = wasm.instancedgeometry_indices(this.__wbg_ptr);
1662
1386
  return takeObject(ret);
1663
1387
  }
1388
+ /**
1389
+ * @returns {number}
1390
+ */
1391
+ get instance_count() {
1392
+ const ret = wasm.instancedgeometry_instance_count(this.__wbg_ptr);
1393
+ return ret >>> 0;
1394
+ }
1664
1395
  /**
1665
1396
  * @returns {Float32Array}
1666
1397
  */
@@ -1700,32 +1431,32 @@ export class InstancedMeshCollection {
1700
1431
  wasm.__wbg_instancedmeshcollection_free(ptr, 0);
1701
1432
  }
1702
1433
  /**
1703
- * @returns {number}
1434
+ * @param {number} index
1435
+ * @returns {InstancedGeometry | undefined}
1704
1436
  */
1705
- get totalInstances() {
1706
- const ret = wasm.instancedmeshcollection_totalInstances(this.__wbg_ptr);
1707
- return ret >>> 0;
1437
+ get(index) {
1438
+ const ret = wasm.instancedmeshcollection_get(this.__wbg_ptr, index);
1439
+ return ret === 0 ? undefined : InstancedGeometry.__wrap(ret);
1708
1440
  }
1709
1441
  /**
1710
1442
  * @returns {number}
1711
1443
  */
1712
- get totalGeometries() {
1713
- const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
1444
+ get length() {
1445
+ const ret = wasm.instancedmeshcollection_length(this.__wbg_ptr);
1714
1446
  return ret >>> 0;
1715
1447
  }
1716
1448
  /**
1717
- * @param {number} index
1718
- * @returns {InstancedGeometry | undefined}
1449
+ * @returns {number}
1719
1450
  */
1720
- get(index) {
1721
- const ret = wasm.instancedmeshcollection_get(this.__wbg_ptr, index);
1722
- return ret === 0 ? undefined : InstancedGeometry.__wrap(ret);
1451
+ get totalGeometries() {
1452
+ const ret = wasm.instancedmeshcollection_totalGeometries(this.__wbg_ptr);
1453
+ return ret >>> 0;
1723
1454
  }
1724
1455
  /**
1725
1456
  * @returns {number}
1726
1457
  */
1727
- get length() {
1728
- const ret = wasm.gpuinstancedgeometrycollection_length(this.__wbg_ptr);
1458
+ get totalInstances() {
1459
+ const ret = wasm.instancedmeshcollection_totalInstances(this.__wbg_ptr);
1729
1460
  return ret >>> 0;
1730
1461
  }
1731
1462
  }
@@ -1753,29 +1484,29 @@ export class MeshCollection {
1753
1484
  wasm.__wbg_meshcollection_free(ptr, 0);
1754
1485
  }
1755
1486
  /**
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}
1487
+ * Get building rotation angle in radians (from IfcSite placement)
1488
+ * Returns None if no rotation was detected
1489
+ * @returns {number | undefined}
1767
1490
  */
1768
- get rtcOffsetY() {
1769
- const ret = wasm.meshcollection_rtcOffsetY(this.__wbg_ptr);
1770
- return ret;
1491
+ get buildingRotation() {
1492
+ try {
1493
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1494
+ wasm.meshcollection_buildingRotation(retptr, this.__wbg_ptr);
1495
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1496
+ var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
1497
+ return r0 === 0 ? undefined : r2;
1498
+ } finally {
1499
+ wasm.__wbindgen_add_to_stack_pointer(16);
1500
+ }
1771
1501
  }
1772
1502
  /**
1773
- * Get RTC offset Z
1774
- * @returns {number}
1503
+ * Get mesh at index
1504
+ * @param {number} index
1505
+ * @returns {MeshDataJs | undefined}
1775
1506
  */
1776
- get rtcOffsetZ() {
1777
- const ret = wasm.meshcollection_rtcOffsetZ(this.__wbg_ptr);
1778
- return ret;
1507
+ get(index) {
1508
+ const ret = wasm.meshcollection_get(this.__wbg_ptr, index);
1509
+ return ret === 0 ? undefined : MeshDataJs.__wrap(ret);
1779
1510
  }
1780
1511
  /**
1781
1512
  * Check if RTC offset is significant (>10km)
@@ -1785,6 +1516,14 @@ export class MeshCollection {
1785
1516
  const ret = wasm.meshcollection_hasRtcOffset(this.__wbg_ptr);
1786
1517
  return ret !== 0;
1787
1518
  }
1519
+ /**
1520
+ * Get number of meshes
1521
+ * @returns {number}
1522
+ */
1523
+ get length() {
1524
+ const ret = wasm.meshcollection_length(this.__wbg_ptr);
1525
+ return ret >>> 0;
1526
+ }
1788
1527
  /**
1789
1528
  * Convert local coordinates to world coordinates
1790
1529
  * Use this to convert mesh positions back to original IFC coordinates
@@ -1807,52 +1546,44 @@ export class MeshCollection {
1807
1546
  }
1808
1547
  }
1809
1548
  /**
1810
- * Get total vertex count across all meshes
1549
+ * Get RTC offset X (for converting local coords back to world coords)
1550
+ * Add this to local X coordinates to get world X coordinates
1811
1551
  * @returns {number}
1812
1552
  */
1813
- get totalVertices() {
1814
- const ret = wasm.meshcollection_totalVertices(this.__wbg_ptr);
1815
- return ret >>> 0;
1553
+ get rtcOffsetX() {
1554
+ const ret = wasm.meshcollection_rtcOffsetX(this.__wbg_ptr);
1555
+ return ret;
1816
1556
  }
1817
1557
  /**
1818
- * Get total triangle count across all meshes
1558
+ * Get RTC offset Y
1819
1559
  * @returns {number}
1820
1560
  */
1821
- get totalTriangles() {
1822
- const ret = wasm.meshcollection_totalTriangles(this.__wbg_ptr);
1823
- return ret >>> 0;
1561
+ get rtcOffsetY() {
1562
+ const ret = wasm.meshcollection_rtcOffsetY(this.__wbg_ptr);
1563
+ return ret;
1824
1564
  }
1825
1565
  /**
1826
- * Get building rotation angle in radians (from IfcSite placement)
1827
- * Returns None if no rotation was detected
1828
- * @returns {number | undefined}
1566
+ * Get RTC offset Z
1567
+ * @returns {number}
1829
1568
  */
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
- }
1569
+ get rtcOffsetZ() {
1570
+ const ret = wasm.meshcollection_rtcOffsetZ(this.__wbg_ptr);
1571
+ return ret;
1840
1572
  }
1841
1573
  /**
1842
- * Get mesh at index
1843
- * @param {number} index
1844
- * @returns {MeshDataJs | undefined}
1574
+ * Get total triangle count across all meshes
1575
+ * @returns {number}
1845
1576
  */
1846
- get(index) {
1847
- const ret = wasm.meshcollection_get(this.__wbg_ptr, index);
1848
- return ret === 0 ? undefined : MeshDataJs.__wrap(ret);
1577
+ get totalTriangles() {
1578
+ const ret = wasm.meshcollection_totalTriangles(this.__wbg_ptr);
1579
+ return ret >>> 0;
1849
1580
  }
1850
1581
  /**
1851
- * Get number of meshes
1582
+ * Get total vertex count across all meshes
1852
1583
  * @returns {number}
1853
1584
  */
1854
- get length() {
1855
- const ret = wasm.meshcollection_length(this.__wbg_ptr);
1585
+ get totalVertices() {
1586
+ const ret = wasm.meshcollection_totalVertices(this.__wbg_ptr);
1856
1587
  return ret >>> 0;
1857
1588
  }
1858
1589
  }
@@ -1879,14 +1610,6 @@ export class MeshCollectionWithRtc {
1879
1610
  const ptr = this.__destroy_into_raw();
1880
1611
  wasm.__wbg_meshcollectionwithrtc_free(ptr, 0);
1881
1612
  }
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
1613
  /**
1891
1614
  * Get mesh at index
1892
1615
  * @param {number} index
@@ -1901,7 +1624,7 @@ export class MeshCollectionWithRtc {
1901
1624
  * @returns {number}
1902
1625
  */
1903
1626
  get length() {
1904
- const ret = wasm.meshcollection_length(this.__wbg_ptr);
1627
+ const ret = wasm.meshcollectionwithrtc_length(this.__wbg_ptr);
1905
1628
  return ret >>> 0;
1906
1629
  }
1907
1630
  /**
@@ -1912,6 +1635,14 @@ export class MeshCollectionWithRtc {
1912
1635
  const ret = wasm.meshcollectionwithrtc_meshes(this.__wbg_ptr);
1913
1636
  return MeshCollection.__wrap(ret);
1914
1637
  }
1638
+ /**
1639
+ * Get the RTC offset
1640
+ * @returns {RtcOffsetJs}
1641
+ */
1642
+ get rtcOffset() {
1643
+ const ret = wasm.meshcollectionwithrtc_rtcOffset(this.__wbg_ptr);
1644
+ return RtcOffsetJs.__wrap(ret);
1645
+ }
1915
1646
  }
1916
1647
  if (Symbol.dispose) MeshCollectionWithRtc.prototype[Symbol.dispose] = MeshCollectionWithRtc.prototype.free;
1917
1648
 
@@ -1936,30 +1667,6 @@ export class MeshDataJs {
1936
1667
  const ptr = this.__destroy_into_raw();
1937
1668
  wasm.__wbg_meshdatajs_free(ptr, 0);
1938
1669
  }
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
1670
  /**
1964
1671
  * Get color as [r, g, b, a] array
1965
1672
  * @returns {Float32Array}
@@ -1978,20 +1685,12 @@ export class MeshDataJs {
1978
1685
  }
1979
1686
  }
1980
1687
  /**
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}
1688
+ * Get express ID
1689
+ * @returns {number}
1991
1690
  */
1992
- get normals() {
1993
- const ret = wasm.meshdatajs_normals(this.__wbg_ptr);
1994
- return takeObject(ret);
1691
+ get expressId() {
1692
+ const ret = wasm.meshdatajs_expressId(this.__wbg_ptr);
1693
+ return ret >>> 0;
1995
1694
  }
1996
1695
  /**
1997
1696
  * Get IFC type name (e.g., "IfcWall", "IfcSpace")
@@ -2013,6 +1712,22 @@ export class MeshDataJs {
2013
1712
  wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2014
1713
  }
2015
1714
  }
1715
+ /**
1716
+ * Get indices as Uint32Array (copy to JS)
1717
+ * @returns {Uint32Array}
1718
+ */
1719
+ get indices() {
1720
+ const ret = wasm.meshdatajs_indices(this.__wbg_ptr);
1721
+ return takeObject(ret);
1722
+ }
1723
+ /**
1724
+ * Get normals as Float32Array (copy to JS)
1725
+ * @returns {Float32Array}
1726
+ */
1727
+ get normals() {
1728
+ const ret = wasm.meshdatajs_normals(this.__wbg_ptr);
1729
+ return takeObject(ret);
1730
+ }
2016
1731
  /**
2017
1732
  * Get positions as Float32Array (copy to JS)
2018
1733
  * @returns {Float32Array}
@@ -2021,6 +1736,22 @@ export class MeshDataJs {
2021
1736
  const ret = wasm.meshdatajs_positions(this.__wbg_ptr);
2022
1737
  return takeObject(ret);
2023
1738
  }
1739
+ /**
1740
+ * Get triangle count
1741
+ * @returns {number}
1742
+ */
1743
+ get triangleCount() {
1744
+ const ret = wasm.meshdatajs_triangleCount(this.__wbg_ptr);
1745
+ return ret >>> 0;
1746
+ }
1747
+ /**
1748
+ * Get vertex count
1749
+ * @returns {number}
1750
+ */
1751
+ get vertexCount() {
1752
+ const ret = wasm.meshdatajs_vertexCount(this.__wbg_ptr);
1753
+ return ret >>> 0;
1754
+ }
2024
1755
  }
2025
1756
  if (Symbol.dispose) MeshDataJs.prototype[Symbol.dispose] = MeshDataJs.prototype.free;
2026
1757
 
@@ -2050,46 +1781,25 @@ export class RtcOffsetJs {
2050
1781
  * @returns {number}
2051
1782
  */
2052
1783
  get x() {
2053
- const ret = wasm.__wbg_get_georeferencejs_eastings(this.__wbg_ptr);
1784
+ const ret = wasm.__wbg_get_rtcoffsetjs_x(this.__wbg_ptr);
2054
1785
  return ret;
2055
1786
  }
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
1787
  /**
2064
1788
  * Y offset
2065
1789
  * @returns {number}
2066
1790
  */
2067
1791
  get y() {
2068
- const ret = wasm.__wbg_get_georeferencejs_northings(this.__wbg_ptr);
1792
+ const ret = wasm.__wbg_get_rtcoffsetjs_y(this.__wbg_ptr);
2069
1793
  return ret;
2070
1794
  }
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
1795
  /**
2079
1796
  * Z offset
2080
1797
  * @returns {number}
2081
1798
  */
2082
1799
  get z() {
2083
- const ret = wasm.__wbg_get_georeferencejs_orthogonal_height(this.__wbg_ptr);
1800
+ const ret = wasm.__wbg_get_rtcoffsetjs_z(this.__wbg_ptr);
2084
1801
  return ret;
2085
1802
  }
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
1803
  /**
2094
1804
  * Check if offset is significant (>10km)
2095
1805
  * @returns {boolean}
@@ -2118,6 +1828,27 @@ export class RtcOffsetJs {
2118
1828
  wasm.__wbindgen_add_to_stack_pointer(16);
2119
1829
  }
2120
1830
  }
1831
+ /**
1832
+ * X offset (subtracted from positions)
1833
+ * @param {number} arg0
1834
+ */
1835
+ set x(arg0) {
1836
+ wasm.__wbg_set_rtcoffsetjs_x(this.__wbg_ptr, arg0);
1837
+ }
1838
+ /**
1839
+ * Y offset
1840
+ * @param {number} arg0
1841
+ */
1842
+ set y(arg0) {
1843
+ wasm.__wbg_set_rtcoffsetjs_y(this.__wbg_ptr, arg0);
1844
+ }
1845
+ /**
1846
+ * Z offset
1847
+ * @param {number} arg0
1848
+ */
1849
+ set z(arg0) {
1850
+ wasm.__wbg_set_rtcoffsetjs_z(this.__wbg_ptr, arg0);
1851
+ }
2121
1852
  }
2122
1853
  if (Symbol.dispose) RtcOffsetJs.prototype[Symbol.dispose] = RtcOffsetJs.prototype.free;
2123
1854
 
@@ -2145,34 +1876,40 @@ export class SymbolicCircle {
2145
1876
  /**
2146
1877
  * @returns {number}
2147
1878
  */
2148
- get expressId() {
2149
- const ret = wasm.gpumeshmetadata_vertexCount(this.__wbg_ptr);
2150
- return ret >>> 0;
1879
+ get centerX() {
1880
+ const ret = wasm.symboliccircle_centerX(this.__wbg_ptr);
1881
+ return ret;
2151
1882
  }
2152
1883
  /**
2153
1884
  * @returns {number}
2154
1885
  */
2155
- get startAngle() {
2156
- const ret = wasm.symboliccircle_startAngle(this.__wbg_ptr);
1886
+ get centerY() {
1887
+ const ret = wasm.symboliccircle_centerY(this.__wbg_ptr);
2157
1888
  return ret;
2158
1889
  }
2159
1890
  /**
2160
- * Check if this is a full circle
2161
- * @returns {boolean}
1891
+ * @returns {number}
2162
1892
  */
2163
- get isFullCircle() {
2164
- const ret = wasm.symboliccircle_isFullCircle(this.__wbg_ptr);
2165
- return ret !== 0;
1893
+ get endAngle() {
1894
+ const ret = wasm.symboliccircle_endAngle(this.__wbg_ptr);
1895
+ return ret;
1896
+ }
1897
+ /**
1898
+ * @returns {number}
1899
+ */
1900
+ get expressId() {
1901
+ const ret = wasm.symboliccircle_expressId(this.__wbg_ptr);
1902
+ return ret >>> 0;
2166
1903
  }
2167
1904
  /**
2168
1905
  * @returns {string}
2169
1906
  */
2170
- get repIdentifier() {
1907
+ get ifcType() {
2171
1908
  let deferred1_0;
2172
1909
  let deferred1_1;
2173
1910
  try {
2174
1911
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2175
- wasm.symboliccircle_repIdentifier(retptr, this.__wbg_ptr);
1912
+ wasm.symboliccircle_ifcType(retptr, this.__wbg_ptr);
2176
1913
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2177
1914
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2178
1915
  deferred1_0 = r0;
@@ -2184,35 +1921,29 @@ export class SymbolicCircle {
2184
1921
  }
2185
1922
  }
2186
1923
  /**
2187
- * @returns {number}
2188
- */
2189
- get radius() {
2190
- const ret = wasm.symboliccircle_radius(this.__wbg_ptr);
2191
- return ret;
2192
- }
2193
- /**
2194
- * @returns {number}
1924
+ * Check if this is a full circle
1925
+ * @returns {boolean}
2195
1926
  */
2196
- get centerX() {
2197
- const ret = wasm.symboliccircle_centerX(this.__wbg_ptr);
2198
- return ret;
1927
+ get isFullCircle() {
1928
+ const ret = wasm.symboliccircle_isFullCircle(this.__wbg_ptr);
1929
+ return ret !== 0;
2199
1930
  }
2200
1931
  /**
2201
1932
  * @returns {number}
2202
1933
  */
2203
- get centerY() {
2204
- const ret = wasm.symboliccircle_centerY(this.__wbg_ptr);
1934
+ get radius() {
1935
+ const ret = wasm.symboliccircle_radius(this.__wbg_ptr);
2205
1936
  return ret;
2206
1937
  }
2207
1938
  /**
2208
1939
  * @returns {string}
2209
1940
  */
2210
- get ifcType() {
1941
+ get repIdentifier() {
2211
1942
  let deferred1_0;
2212
1943
  let deferred1_1;
2213
1944
  try {
2214
1945
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2215
- wasm.symboliccircle_ifcType(retptr, this.__wbg_ptr);
1946
+ wasm.symboliccircle_repIdentifier(retptr, this.__wbg_ptr);
2216
1947
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2217
1948
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2218
1949
  deferred1_0 = r0;
@@ -2226,8 +1957,8 @@ export class SymbolicCircle {
2226
1957
  /**
2227
1958
  * @returns {number}
2228
1959
  */
2229
- get endAngle() {
2230
- const ret = wasm.symboliccircle_endAngle(this.__wbg_ptr);
1960
+ get startAngle() {
1961
+ const ret = wasm.symboliccircle_startAngle(this.__wbg_ptr);
2231
1962
  return ret;
2232
1963
  }
2233
1964
  }
@@ -2264,23 +1995,15 @@ export class SymbolicPolyline {
2264
1995
  return ret >>> 0;
2265
1996
  }
2266
1997
  /**
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")
1998
+ * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
2276
1999
  * @returns {string}
2277
2000
  */
2278
- get repIdentifier() {
2001
+ get ifcType() {
2279
2002
  let deferred1_0;
2280
2003
  let deferred1_1;
2281
2004
  try {
2282
2005
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2283
- wasm.symbolicpolyline_repIdentifier(retptr, this.__wbg_ptr);
2006
+ wasm.symbolicpolyline_ifcType(retptr, this.__wbg_ptr);
2284
2007
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2285
2008
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2286
2009
  deferred1_0 = r0;
@@ -2291,6 +2014,22 @@ export class SymbolicPolyline {
2291
2014
  wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2292
2015
  }
2293
2016
  }
2017
+ /**
2018
+ * Check if this is a closed loop
2019
+ * @returns {boolean}
2020
+ */
2021
+ get isClosed() {
2022
+ const ret = wasm.symbolicpolyline_isClosed(this.__wbg_ptr);
2023
+ return ret !== 0;
2024
+ }
2025
+ /**
2026
+ * Get number of points
2027
+ * @returns {number}
2028
+ */
2029
+ get pointCount() {
2030
+ const ret = wasm.symbolicpolyline_pointCount(this.__wbg_ptr);
2031
+ return ret >>> 0;
2032
+ }
2294
2033
  /**
2295
2034
  * Get 2D points as Float32Array [x1, y1, x2, y2, ...]
2296
2035
  * @returns {Float32Array}
@@ -2300,15 +2039,15 @@ export class SymbolicPolyline {
2300
2039
  return takeObject(ret);
2301
2040
  }
2302
2041
  /**
2303
- * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
2042
+ * Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
2304
2043
  * @returns {string}
2305
2044
  */
2306
- get ifcType() {
2045
+ get repIdentifier() {
2307
2046
  let deferred1_0;
2308
2047
  let deferred1_1;
2309
2048
  try {
2310
2049
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2311
- wasm.symbolicpolyline_ifcType(retptr, this.__wbg_ptr);
2050
+ wasm.symbolicpolyline_repIdentifier(retptr, this.__wbg_ptr);
2312
2051
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2313
2052
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2314
2053
  deferred1_0 = r0;
@@ -2319,14 +2058,6 @@ export class SymbolicPolyline {
2319
2058
  wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2320
2059
  }
2321
2060
  }
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
2061
  }
2331
2062
  if (Symbol.dispose) SymbolicPolyline.prototype[Symbol.dispose] = SymbolicPolyline.prototype.free;
2332
2063
 
@@ -2351,23 +2082,6 @@ export class SymbolicRepresentationCollection {
2351
2082
  const ptr = this.__destroy_into_raw();
2352
2083
  wasm.__wbg_symbolicrepresentationcollection_free(ptr, 0);
2353
2084
  }
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
2085
  /**
2372
2086
  * Get number of circles/arcs
2373
2087
  * @returns {number}
@@ -2377,21 +2091,13 @@ export class SymbolicRepresentationCollection {
2377
2091
  return ret >>> 0;
2378
2092
  }
2379
2093
  /**
2380
- * Get polyline at index
2094
+ * Get circle at index
2381
2095
  * @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}
2096
+ * @returns {SymbolicCircle | undefined}
2391
2097
  */
2392
- get polylineCount() {
2393
- const ret = wasm.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr);
2394
- return ret >>> 0;
2098
+ getCircle(index) {
2099
+ const ret = wasm.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, index);
2100
+ return ret === 0 ? undefined : SymbolicCircle.__wrap(ret);
2395
2101
  }
2396
2102
  /**
2397
2103
  * Get all express IDs that have symbolic representations
@@ -2410,6 +2116,15 @@ export class SymbolicRepresentationCollection {
2410
2116
  wasm.__wbindgen_add_to_stack_pointer(16);
2411
2117
  }
2412
2118
  }
2119
+ /**
2120
+ * Get polyline at index
2121
+ * @param {number} index
2122
+ * @returns {SymbolicPolyline | undefined}
2123
+ */
2124
+ getPolyline(index) {
2125
+ const ret = wasm.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, index);
2126
+ return ret === 0 ? undefined : SymbolicPolyline.__wrap(ret);
2127
+ }
2413
2128
  /**
2414
2129
  * Check if collection is empty
2415
2130
  * @returns {boolean}
@@ -2418,6 +2133,22 @@ export class SymbolicRepresentationCollection {
2418
2133
  const ret = wasm.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr);
2419
2134
  return ret !== 0;
2420
2135
  }
2136
+ /**
2137
+ * Get number of polylines
2138
+ * @returns {number}
2139
+ */
2140
+ get polylineCount() {
2141
+ const ret = wasm.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr);
2142
+ return ret >>> 0;
2143
+ }
2144
+ /**
2145
+ * Get total count of all symbolic items
2146
+ * @returns {number}
2147
+ */
2148
+ get totalCount() {
2149
+ const ret = wasm.symbolicrepresentationcollection_totalCount(this.__wbg_ptr);
2150
+ return ret >>> 0;
2151
+ }
2421
2152
  }
2422
2153
  if (Symbol.dispose) SymbolicRepresentationCollection.prototype[Symbol.dispose] = SymbolicRepresentationCollection.prototype.free;
2423
2154
 
@@ -2481,7 +2212,7 @@ export class ZeroCopyMesh {
2481
2212
  * @returns {number}
2482
2213
  */
2483
2214
  get indices_len() {
2484
- const ret = wasm.gpuinstancedgeometry_indicesLen(this.__wbg_ptr);
2215
+ const ret = wasm.zerocopymesh_indices_len(this.__wbg_ptr);
2485
2216
  return ret >>> 0;
2486
2217
  }
2487
2218
  /**
@@ -2489,9 +2220,26 @@ export class ZeroCopyMesh {
2489
2220
  * @returns {number}
2490
2221
  */
2491
2222
  get indices_ptr() {
2492
- const ret = wasm.gpuinstancedgeometry_indicesPtr(this.__wbg_ptr);
2223
+ const ret = wasm.zerocopymesh_indices_ptr(this.__wbg_ptr);
2493
2224
  return ret >>> 0;
2494
2225
  }
2226
+ /**
2227
+ * Check if mesh is empty
2228
+ * @returns {boolean}
2229
+ */
2230
+ get is_empty() {
2231
+ const ret = wasm.zerocopymesh_is_empty(this.__wbg_ptr);
2232
+ return ret !== 0;
2233
+ }
2234
+ /**
2235
+ * Create a new zero-copy mesh from a Mesh
2236
+ */
2237
+ constructor() {
2238
+ const ret = wasm.zerocopymesh_new();
2239
+ this.__wbg_ptr = ret >>> 0;
2240
+ ZeroCopyMeshFinalization.register(this, this.__wbg_ptr, this);
2241
+ return this;
2242
+ }
2495
2243
  /**
2496
2244
  * Get length of normals array
2497
2245
  * @returns {number}
@@ -2505,15 +2253,7 @@ export class ZeroCopyMesh {
2505
2253
  * @returns {number}
2506
2254
  */
2507
2255
  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);
2256
+ const ret = wasm.zerocopymesh_normals_ptr(this.__wbg_ptr);
2517
2257
  return ret >>> 0;
2518
2258
  }
2519
2259
  /**
@@ -2533,85 +2273,593 @@ export class ZeroCopyMesh {
2533
2273
  const ret = wasm.zerocopymesh_positions_ptr(this.__wbg_ptr);
2534
2274
  return ret >>> 0;
2535
2275
  }
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;
2276
+ /**
2277
+ * Get triangle count
2278
+ * @returns {number}
2279
+ */
2280
+ get triangle_count() {
2281
+ const ret = wasm.zerocopymesh_triangle_count(this.__wbg_ptr);
2282
+ return ret >>> 0;
2283
+ }
2284
+ /**
2285
+ * Get vertex count
2286
+ * @returns {number}
2287
+ */
2288
+ get vertex_count() {
2289
+ const ret = wasm.zerocopymesh_vertex_count(this.__wbg_ptr);
2290
+ return ret >>> 0;
2291
+ }
2292
+ }
2293
+ if (Symbol.dispose) ZeroCopyMesh.prototype[Symbol.dispose] = ZeroCopyMesh.prototype.free;
2294
+
2295
+ /**
2296
+ * Get WASM memory to allow JavaScript to create TypedArray views
2297
+ * @returns {any}
2298
+ */
2299
+ export function get_memory() {
2300
+ const ret = wasm.get_memory();
2301
+ return takeObject(ret);
2302
+ }
2303
+
2304
+ /**
2305
+ * Initialize the WASM module.
2306
+ *
2307
+ * This function is called automatically when the WASM module is loaded.
2308
+ * It sets up panic hooks for better error messages in the browser console.
2309
+ */
2310
+ export function init() {
2311
+ wasm.init();
2312
+ }
2313
+
2314
+ /**
2315
+ * Get the version of IFC-Lite.
2316
+ *
2317
+ * # Returns
2318
+ *
2319
+ * Version string (e.g., "0.1.0")
2320
+ *
2321
+ * # Example
2322
+ *
2323
+ * ```javascript
2324
+ * console.log(`IFC-Lite version: ${version()}`);
2325
+ * ```
2326
+ * @returns {string}
2327
+ */
2328
+ export function version() {
2329
+ let deferred1_0;
2330
+ let deferred1_1;
2331
+ try {
2332
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2333
+ wasm.version(retptr);
2334
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2335
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2336
+ deferred1_0 = r0;
2337
+ deferred1_1 = r1;
2338
+ return getStringFromWasm0(r0, r1);
2339
+ } finally {
2340
+ wasm.__wbindgen_add_to_stack_pointer(16);
2341
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2342
+ }
2343
+ }
2344
+
2345
+ function __wbg_get_imports() {
2346
+ const import0 = {
2347
+ __proto__: null,
2348
+ __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
2349
+ const ret = Error(getStringFromWasm0(arg0, arg1));
2350
+ return addHeapObject(ret);
2351
+ },
2352
+ __wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
2353
+ const ret = typeof(getObject(arg0)) === 'function';
2354
+ return ret;
2355
+ },
2356
+ __wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
2357
+ const ret = getObject(arg0) === undefined;
2358
+ return ret;
2359
+ },
2360
+ __wbg___wbindgen_memory_edb3f01e3930bbf6: function() {
2361
+ const ret = wasm.memory;
2362
+ return addHeapObject(ret);
2363
+ },
2364
+ __wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
2365
+ const obj = getObject(arg1);
2366
+ const ret = typeof(obj) === 'number' ? obj : undefined;
2367
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
2368
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2369
+ },
2370
+ __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
2371
+ throw new Error(getStringFromWasm0(arg0, arg1));
2372
+ },
2373
+ __wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {
2374
+ getObject(arg0)._wbg_cb_unref();
2375
+ },
2376
+ __wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
2377
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2378
+ return addHeapObject(ret);
2379
+ }, arguments); },
2380
+ __wbg_call_dcc2662fa17a72cf: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2381
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
2382
+ return addHeapObject(ret);
2383
+ }, arguments); },
2384
+ __wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
2385
+ const ret = getObject(arg0).call(getObject(arg1));
2386
+ return addHeapObject(ret);
2387
+ }, arguments); },
2388
+ __wbg_clearTimeout_113b1cde814ec762: function(arg0) {
2389
+ const ret = clearTimeout(takeObject(arg0));
2390
+ return addHeapObject(ret);
2391
+ },
2392
+ __wbg_debug_4b9b1a2d5972be57: function(arg0) {
2393
+ console.debug(getObject(arg0));
2394
+ },
2395
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
2396
+ let deferred0_0;
2397
+ let deferred0_1;
2398
+ try {
2399
+ deferred0_0 = arg0;
2400
+ deferred0_1 = arg1;
2401
+ console.error(getStringFromWasm0(arg0, arg1));
2402
+ } finally {
2403
+ wasm.__wbindgen_export2(deferred0_0, deferred0_1, 1);
2404
+ }
2405
+ },
2406
+ __wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
2407
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
2408
+ return addHeapObject(ret);
2409
+ }, arguments); },
2410
+ __wbg_gpugeometry_new: function(arg0) {
2411
+ const ret = GpuGeometry.__wrap(arg0);
2412
+ return addHeapObject(ret);
2413
+ },
2414
+ __wbg_instancedgeometry_new: function(arg0) {
2415
+ const ret = InstancedGeometry.__wrap(arg0);
2416
+ return addHeapObject(ret);
2417
+ },
2418
+ __wbg_length_259ee9d041e381ad: function(arg0) {
2419
+ const ret = getObject(arg0).length;
2420
+ return ret;
2421
+ },
2422
+ __wbg_length_b3416cf66a5452c8: function(arg0) {
2423
+ const ret = getObject(arg0).length;
2424
+ return ret;
2425
+ },
2426
+ __wbg_meshdatajs_new: function(arg0) {
2427
+ const ret = MeshDataJs.__wrap(arg0);
2428
+ return addHeapObject(ret);
2429
+ },
2430
+ __wbg_new_227d7c05414eb861: function() {
2431
+ const ret = new Error();
2432
+ return addHeapObject(ret);
2433
+ },
2434
+ __wbg_new_a70fbab9066b301f: function() {
2435
+ const ret = new Array();
2436
+ return addHeapObject(ret);
2437
+ },
2438
+ __wbg_new_ab79df5bd7c26067: function() {
2439
+ const ret = new Object();
2440
+ return addHeapObject(ret);
2441
+ },
2442
+ __wbg_new_d098e265629cd10f: function(arg0, arg1) {
2443
+ try {
2444
+ var state0 = {a: arg0, b: arg1};
2445
+ var cb0 = (arg0, arg1) => {
2446
+ const a = state0.a;
2447
+ state0.a = 0;
2448
+ try {
2449
+ return __wasm_bindgen_func_elem_1070(a, state0.b, arg0, arg1);
2450
+ } finally {
2451
+ state0.a = a;
2452
+ }
2453
+ };
2454
+ const ret = new Promise(cb0);
2455
+ return addHeapObject(ret);
2456
+ } finally {
2457
+ state0.a = state0.b = 0;
2458
+ }
2459
+ },
2460
+ __wbg_new_from_slice_898ac63cbd46f332: function(arg0, arg1) {
2461
+ const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
2462
+ return addHeapObject(ret);
2463
+ },
2464
+ __wbg_new_from_slice_ff2c15e8e05ffdfc: function(arg0, arg1) {
2465
+ const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
2466
+ return addHeapObject(ret);
2467
+ },
2468
+ __wbg_prototypesetcall_247ac4333d4d3cb4: function(arg0, arg1, arg2) {
2469
+ Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
2470
+ },
2471
+ __wbg_push_e87b0e732085a946: function(arg0, arg1) {
2472
+ const ret = getObject(arg0).push(getObject(arg1));
2473
+ return ret;
2474
+ },
2475
+ __wbg_queueMicrotask_0c399741342fb10f: function(arg0) {
2476
+ const ret = getObject(arg0).queueMicrotask;
2477
+ return addHeapObject(ret);
2478
+ },
2479
+ __wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
2480
+ queueMicrotask(getObject(arg0));
2481
+ },
2482
+ __wbg_resolve_ae8d83246e5bcc12: function(arg0) {
2483
+ const ret = Promise.resolve(getObject(arg0));
2484
+ return addHeapObject(ret);
2485
+ },
2486
+ __wbg_setTimeout_ef24d2fc3ad97385: function() { return handleError(function (arg0, arg1) {
2487
+ const ret = setTimeout(getObject(arg0), arg1);
2488
+ return addHeapObject(ret);
2489
+ }, arguments); },
2490
+ __wbg_set_282384002438957f: function(arg0, arg1, arg2) {
2491
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2492
+ },
2493
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
2494
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2495
+ },
2496
+ __wbg_set_7eaa4f96924fd6b3: function() { return handleError(function (arg0, arg1, arg2) {
2497
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
2498
+ return ret;
2499
+ }, arguments); },
2500
+ __wbg_stack_3b0d974bbf31e44f: 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_8adb955bd33fac2f: function() {
2508
+ const ret = typeof global === 'undefined' ? null : global;
2509
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2510
+ },
2511
+ __wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
2512
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
2513
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2514
+ },
2515
+ __wbg_static_accessor_SELF_f207c857566db248: function() {
2516
+ const ret = typeof self === 'undefined' ? null : self;
2517
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2518
+ },
2519
+ __wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
2520
+ const ret = typeof window === 'undefined' ? null : window;
2521
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
2522
+ },
2523
+ __wbg_then_098abe61755d12f6: function(arg0, arg1) {
2524
+ const ret = getObject(arg0).then(getObject(arg1));
2525
+ return addHeapObject(ret);
2526
+ },
2527
+ __wbg_warn_69424c2d92a2fa73: function(arg0) {
2528
+ console.warn(getObject(arg0));
2529
+ },
2530
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2531
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 135, function: Function { arguments: [Externref], shim_idx: 136, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2532
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1032, __wasm_bindgen_func_elem_1037);
2533
+ return addHeapObject(ret);
2534
+ },
2535
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2536
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 46, function: Function { arguments: [], shim_idx: 47, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2537
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_480, __wasm_bindgen_func_elem_484);
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_wasm_bg.js": import0,
2566
+ };
2567
+ }
2568
+
2569
+ function __wasm_bindgen_func_elem_484(arg0, arg1) {
2570
+ wasm.__wasm_bindgen_func_elem_484(arg0, arg1);
2571
+ }
2572
+
2573
+ function __wasm_bindgen_func_elem_1037(arg0, arg1, arg2) {
2574
+ try {
2575
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2576
+ wasm.__wasm_bindgen_func_elem_1037(retptr, arg0, arg1, addHeapObject(arg2));
2577
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2578
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2579
+ if (r1) {
2580
+ throw takeObject(r0);
2581
+ }
2582
+ } finally {
2583
+ wasm.__wbindgen_add_to_stack_pointer(16);
2584
+ }
2585
+ }
2586
+
2587
+ function __wasm_bindgen_func_elem_1070(arg0, arg1, arg2, arg3) {
2588
+ wasm.__wasm_bindgen_func_elem_1070(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2589
+ }
2590
+
2591
+ const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
2592
+ ? { register: () => {}, unregister: () => {} }
2593
+ : new FinalizationRegistry(ptr => wasm.__wbg_georeferencejs_free(ptr >>> 0, 1));
2594
+ const GpuGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
2595
+ ? { register: () => {}, unregister: () => {} }
2596
+ : new FinalizationRegistry(ptr => wasm.__wbg_gpugeometry_free(ptr >>> 0, 1));
2597
+ const GpuInstancedGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
2598
+ ? { register: () => {}, unregister: () => {} }
2599
+ : new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometry_free(ptr >>> 0, 1));
2600
+ const GpuInstancedGeometryCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
2601
+ ? { register: () => {}, unregister: () => {} }
2602
+ : new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometrycollection_free(ptr >>> 0, 1));
2603
+ const GpuInstancedGeometryRefFinalization = (typeof FinalizationRegistry === 'undefined')
2604
+ ? { register: () => {}, unregister: () => {} }
2605
+ : new FinalizationRegistry(ptr => wasm.__wbg_gpuinstancedgeometryref_free(ptr >>> 0, 1));
2606
+ const GpuMeshMetadataFinalization = (typeof FinalizationRegistry === 'undefined')
2607
+ ? { register: () => {}, unregister: () => {} }
2608
+ : new FinalizationRegistry(ptr => wasm.__wbg_gpumeshmetadata_free(ptr >>> 0, 1));
2609
+ const IfcAPIFinalization = (typeof FinalizationRegistry === 'undefined')
2610
+ ? { register: () => {}, unregister: () => {} }
2611
+ : new FinalizationRegistry(ptr => wasm.__wbg_ifcapi_free(ptr >>> 0, 1));
2612
+ const InstanceDataFinalization = (typeof FinalizationRegistry === 'undefined')
2613
+ ? { register: () => {}, unregister: () => {} }
2614
+ : new FinalizationRegistry(ptr => wasm.__wbg_instancedata_free(ptr >>> 0, 1));
2615
+ const InstancedGeometryFinalization = (typeof FinalizationRegistry === 'undefined')
2616
+ ? { register: () => {}, unregister: () => {} }
2617
+ : new FinalizationRegistry(ptr => wasm.__wbg_instancedgeometry_free(ptr >>> 0, 1));
2618
+ const InstancedMeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
2619
+ ? { register: () => {}, unregister: () => {} }
2620
+ : new FinalizationRegistry(ptr => wasm.__wbg_instancedmeshcollection_free(ptr >>> 0, 1));
2621
+ const MeshCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
2622
+ ? { register: () => {}, unregister: () => {} }
2623
+ : new FinalizationRegistry(ptr => wasm.__wbg_meshcollection_free(ptr >>> 0, 1));
2624
+ const MeshCollectionWithRtcFinalization = (typeof FinalizationRegistry === 'undefined')
2625
+ ? { register: () => {}, unregister: () => {} }
2626
+ : new FinalizationRegistry(ptr => wasm.__wbg_meshcollectionwithrtc_free(ptr >>> 0, 1));
2627
+ const MeshDataJsFinalization = (typeof FinalizationRegistry === 'undefined')
2628
+ ? { register: () => {}, unregister: () => {} }
2629
+ : new FinalizationRegistry(ptr => wasm.__wbg_meshdatajs_free(ptr >>> 0, 1));
2630
+ const RtcOffsetJsFinalization = (typeof FinalizationRegistry === 'undefined')
2631
+ ? { register: () => {}, unregister: () => {} }
2632
+ : new FinalizationRegistry(ptr => wasm.__wbg_rtcoffsetjs_free(ptr >>> 0, 1));
2633
+ const SymbolicCircleFinalization = (typeof FinalizationRegistry === 'undefined')
2634
+ ? { register: () => {}, unregister: () => {} }
2635
+ : new FinalizationRegistry(ptr => wasm.__wbg_symboliccircle_free(ptr >>> 0, 1));
2636
+ const SymbolicPolylineFinalization = (typeof FinalizationRegistry === 'undefined')
2637
+ ? { register: () => {}, unregister: () => {} }
2638
+ : new FinalizationRegistry(ptr => wasm.__wbg_symbolicpolyline_free(ptr >>> 0, 1));
2639
+ const SymbolicRepresentationCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
2640
+ ? { register: () => {}, unregister: () => {} }
2641
+ : new FinalizationRegistry(ptr => wasm.__wbg_symbolicrepresentationcollection_free(ptr >>> 0, 1));
2642
+ const ZeroCopyMeshFinalization = (typeof FinalizationRegistry === 'undefined')
2643
+ ? { register: () => {}, unregister: () => {} }
2644
+ : new FinalizationRegistry(ptr => wasm.__wbg_zerocopymesh_free(ptr >>> 0, 1));
2645
+
2646
+ function addHeapObject(obj) {
2647
+ if (heap_next === heap.length) heap.push(heap.length + 1);
2648
+ const idx = heap_next;
2649
+ heap_next = heap[idx];
2650
+
2651
+ heap[idx] = obj;
2652
+ return idx;
2653
+ }
2654
+
2655
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
2656
+ ? { register: () => {}, unregister: () => {} }
2657
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
2658
+
2659
+ function dropObject(idx) {
2660
+ if (idx < 1028) return;
2661
+ heap[idx] = heap_next;
2662
+ heap_next = idx;
2663
+ }
2664
+
2665
+ function getArrayF32FromWasm0(ptr, len) {
2666
+ ptr = ptr >>> 0;
2667
+ return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
2668
+ }
2669
+
2670
+ function getArrayF64FromWasm0(ptr, len) {
2671
+ ptr = ptr >>> 0;
2672
+ return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
2673
+ }
2674
+
2675
+ function getArrayU32FromWasm0(ptr, len) {
2676
+ ptr = ptr >>> 0;
2677
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
2678
+ }
2679
+
2680
+ let cachedDataViewMemory0 = null;
2681
+ function getDataViewMemory0() {
2682
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
2683
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
2684
+ }
2685
+ return cachedDataViewMemory0;
2686
+ }
2687
+
2688
+ let cachedFloat32ArrayMemory0 = null;
2689
+ function getFloat32ArrayMemory0() {
2690
+ if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {
2691
+ cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);
2692
+ }
2693
+ return cachedFloat32ArrayMemory0;
2694
+ }
2695
+
2696
+ let cachedFloat64ArrayMemory0 = null;
2697
+ function getFloat64ArrayMemory0() {
2698
+ if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
2699
+ cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
2700
+ }
2701
+ return cachedFloat64ArrayMemory0;
2702
+ }
2703
+
2704
+ function getStringFromWasm0(ptr, len) {
2705
+ ptr = ptr >>> 0;
2706
+ return decodeText(ptr, len);
2707
+ }
2708
+
2709
+ let cachedUint32ArrayMemory0 = null;
2710
+ function getUint32ArrayMemory0() {
2711
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
2712
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
2713
+ }
2714
+ return cachedUint32ArrayMemory0;
2715
+ }
2716
+
2717
+ let cachedUint8ArrayMemory0 = null;
2718
+ function getUint8ArrayMemory0() {
2719
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
2720
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
2721
+ }
2722
+ return cachedUint8ArrayMemory0;
2723
+ }
2724
+
2725
+ function getObject(idx) { return heap[idx]; }
2726
+
2727
+ function handleError(f, args) {
2728
+ try {
2729
+ return f.apply(this, args);
2730
+ } catch (e) {
2731
+ wasm.__wbindgen_export(addHeapObject(e));
2732
+ }
2733
+ }
2734
+
2735
+ let heap = new Array(1024).fill(undefined);
2736
+ heap.push(undefined, null, true, false);
2737
+
2738
+ let heap_next = heap.length;
2739
+
2740
+ function isLikeNone(x) {
2741
+ return x === undefined || x === null;
2742
+ }
2743
+
2744
+ function makeMutClosure(arg0, arg1, dtor, f) {
2745
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
2746
+ const real = (...args) => {
2747
+
2748
+ // First up with a closure we increment the internal reference
2749
+ // count. This ensures that the Rust closure environment won't
2750
+ // be deallocated while we're invoking it.
2751
+ state.cnt++;
2752
+ const a = state.a;
2753
+ state.a = 0;
2754
+ try {
2755
+ return f(a, state.b, ...args);
2756
+ } finally {
2757
+ state.a = a;
2758
+ real._wbg_cb_unref();
2759
+ }
2760
+ };
2761
+ real._wbg_cb_unref = () => {
2762
+ if (--state.cnt === 0) {
2763
+ state.dtor(state.a, state.b);
2764
+ state.a = 0;
2765
+ CLOSURE_DTORS.unregister(state);
2766
+ }
2767
+ };
2768
+ CLOSURE_DTORS.register(real, state, state);
2769
+ return real;
2770
+ }
2771
+
2772
+ function passArray8ToWasm0(arg, malloc) {
2773
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
2774
+ getUint8ArrayMemory0().set(arg, ptr / 1);
2775
+ WASM_VECTOR_LEN = arg.length;
2776
+ return ptr;
2777
+ }
2778
+
2779
+ function passStringToWasm0(arg, malloc, realloc) {
2780
+ if (realloc === undefined) {
2781
+ const buf = cachedTextEncoder.encode(arg);
2782
+ const ptr = malloc(buf.length, 1) >>> 0;
2783
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
2784
+ WASM_VECTOR_LEN = buf.length;
2785
+ return ptr;
2543
2786
  }
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;
2787
+
2788
+ let len = arg.length;
2789
+ let ptr = malloc(len, 1) >>> 0;
2790
+
2791
+ const mem = getUint8ArrayMemory0();
2792
+
2793
+ let offset = 0;
2794
+
2795
+ for (; offset < len; offset++) {
2796
+ const code = arg.charCodeAt(offset);
2797
+ if (code > 0x7F) break;
2798
+ mem[ptr + offset] = code;
2552
2799
  }
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;
2800
+ if (offset !== len) {
2801
+ if (offset !== 0) {
2802
+ arg = arg.slice(offset);
2803
+ }
2804
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
2805
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
2806
+ const ret = cachedTextEncoder.encodeInto(arg, view);
2807
+
2808
+ offset += ret.written;
2809
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
2560
2810
  }
2561
- }
2562
- if (Symbol.dispose) ZeroCopyMesh.prototype[Symbol.dispose] = ZeroCopyMesh.prototype.free;
2563
2811
 
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);
2812
+ WASM_VECTOR_LEN = offset;
2813
+ return ptr;
2571
2814
  }
2572
2815
 
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();
2816
+ function takeObject(idx) {
2817
+ const ret = getObject(idx);
2818
+ dropObject(idx);
2819
+ return ret;
2581
2820
  }
2582
2821
 
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);
2822
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2823
+ cachedTextDecoder.decode();
2824
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
2825
+ let numBytesDecoded = 0;
2826
+ function decodeText(ptr, len) {
2827
+ numBytesDecoded += len;
2828
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
2829
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2830
+ cachedTextDecoder.decode();
2831
+ numBytesDecoded = len;
2611
2832
  }
2833
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
2834
+ }
2835
+
2836
+ const cachedTextEncoder = new TextEncoder();
2837
+
2838
+ if (!('encodeInto' in cachedTextEncoder)) {
2839
+ cachedTextEncoder.encodeInto = function (arg, view) {
2840
+ const buf = cachedTextEncoder.encode(arg);
2841
+ view.set(buf);
2842
+ return {
2843
+ read: arg.length,
2844
+ written: buf.length
2845
+ };
2846
+ };
2612
2847
  }
2613
2848
 
2614
- const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
2849
+ let WASM_VECTOR_LEN = 0;
2850
+
2851
+ let wasmModule, wasm;
2852
+ function __wbg_finalize_init(instance, module) {
2853
+ wasm = instance.exports;
2854
+ wasmModule = module;
2855
+ cachedDataViewMemory0 = null;
2856
+ cachedFloat32ArrayMemory0 = null;
2857
+ cachedFloat64ArrayMemory0 = null;
2858
+ cachedUint32ArrayMemory0 = null;
2859
+ cachedUint8ArrayMemory0 = null;
2860
+ wasm.__wbindgen_start();
2861
+ return wasm;
2862
+ }
2615
2863
 
2616
2864
  async function __wbg_load(module, imports) {
2617
2865
  if (typeof Response === 'function' && module instanceof Response) {
@@ -2619,14 +2867,12 @@ async function __wbg_load(module, imports) {
2619
2867
  try {
2620
2868
  return await WebAssembly.instantiateStreaming(module, imports);
2621
2869
  } catch (e) {
2622
- const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
2870
+ const validResponse = module.ok && expectedResponseType(module.type);
2623
2871
 
2624
2872
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
2625
2873
  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
2874
 
2627
- } else {
2628
- throw e;
2629
- }
2875
+ } else { throw e; }
2630
2876
  }
2631
2877
  }
2632
2878
 
@@ -2641,264 +2887,20 @@ async function __wbg_load(module, imports) {
2641
2887
  return instance;
2642
2888
  }
2643
2889
  }
2644
- }
2645
2890
 
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_debug_9d0c87ddda3dc485 = function(arg0) {
2694
- console.debug(getObject(arg0));
2695
- };
2696
- imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
2697
- let deferred0_0;
2698
- let deferred0_1;
2699
- try {
2700
- deferred0_0 = arg0;
2701
- deferred0_1 = arg1;
2702
- console.error(getStringFromWasm0(arg0, arg1));
2703
- } finally {
2704
- wasm.__wbindgen_export2(deferred0_0, deferred0_1, 1);
2705
- }
2706
- };
2707
- imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
2708
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
2709
- return addHeapObject(ret);
2710
- }, arguments) };
2711
- imports.wbg.__wbg_gpugeometry_new = function(arg0) {
2712
- const ret = GpuGeometry.__wrap(arg0);
2713
- return addHeapObject(ret);
2714
- };
2715
- imports.wbg.__wbg_instancedgeometry_new = function(arg0) {
2716
- const ret = InstancedGeometry.__wrap(arg0);
2717
- return addHeapObject(ret);
2718
- };
2719
- imports.wbg.__wbg_length_86ce4877baf913bb = function(arg0) {
2720
- const ret = getObject(arg0).length;
2721
- return ret;
2722
- };
2723
- imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
2724
- const ret = getObject(arg0).length;
2725
- return ret;
2726
- };
2727
- imports.wbg.__wbg_meshdatajs_new = function(arg0) {
2728
- const ret = MeshDataJs.__wrap(arg0);
2729
- return addHeapObject(ret);
2730
- };
2731
- imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
2732
- const ret = new Object();
2733
- return addHeapObject(ret);
2734
- };
2735
- imports.wbg.__wbg_new_25f239778d6112b9 = function() {
2736
- const ret = new Array();
2737
- return addHeapObject(ret);
2738
- };
2739
- imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
2740
- const ret = new Error();
2741
- return addHeapObject(ret);
2742
- };
2743
- imports.wbg.__wbg_new_b546ae120718850e = function() {
2744
- const ret = new Map();
2745
- return addHeapObject(ret);
2746
- };
2747
- imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
2748
- try {
2749
- var state0 = {a: arg0, b: arg1};
2750
- var cb0 = (arg0, arg1) => {
2751
- const a = state0.a;
2752
- state0.a = 0;
2753
- try {
2754
- return __wasm_bindgen_func_elem_1057(a, state0.b, arg0, arg1);
2755
- } finally {
2756
- state0.a = a;
2757
- }
2758
- };
2759
- const ret = new Promise(cb0);
2760
- return addHeapObject(ret);
2761
- } finally {
2762
- state0.a = state0.b = 0;
2891
+ function expectedResponseType(type) {
2892
+ switch (type) {
2893
+ case 'basic': case 'cors': case 'default': return true;
2763
2894
  }
2764
- };
2765
- imports.wbg.__wbg_new_from_slice_41e2764a343e3cb1 = function(arg0, arg1) {
2766
- const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
2767
- return addHeapObject(ret);
2768
- };
2769
- imports.wbg.__wbg_new_from_slice_db0691b69e9d3891 = function(arg0, arg1) {
2770
- const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
2771
- return addHeapObject(ret);
2772
- };
2773
- imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
2774
- const ret = new Function(getStringFromWasm0(arg0, arg1));
2775
- return addHeapObject(ret);
2776
- };
2777
- imports.wbg.__wbg_prototypesetcall_96cc7097487b926d = function(arg0, arg1, arg2) {
2778
- Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
2779
- };
2780
- imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
2781
- const ret = getObject(arg0).push(getObject(arg1));
2782
- return ret;
2783
- };
2784
- imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
2785
- const ret = getObject(arg0).queueMicrotask;
2786
- return addHeapObject(ret);
2787
- };
2788
- imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
2789
- queueMicrotask(getObject(arg0));
2790
- };
2791
- imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
2792
- const ret = Promise.resolve(getObject(arg0));
2793
- return addHeapObject(ret);
2794
- };
2795
- imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
2796
- const ret = setTimeout(getObject(arg0), arg1);
2797
- return addHeapObject(ret);
2798
- }, arguments) };
2799
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
2800
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
2801
- };
2802
- imports.wbg.__wbg_set_781438a03c0c3c81 = function() { return handleError(function (arg0, arg1, arg2) {
2803
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
2804
- return ret;
2805
- }, arguments) };
2806
- imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
2807
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
2808
- };
2809
- imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
2810
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
2811
- return addHeapObject(ret);
2812
- };
2813
- imports.wbg.__wbg_size_aeb57b993c620133 = function(arg0) {
2814
- const ret = getObject(arg0).size;
2815
- return ret;
2816
- };
2817
- imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
2818
- const ret = getObject(arg1).stack;
2819
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
2820
- const len1 = WASM_VECTOR_LEN;
2821
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2822
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2823
- };
2824
- imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
2825
- const ret = typeof global === 'undefined' ? null : global;
2826
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2827
- };
2828
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
2829
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
2830
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2831
- };
2832
- imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
2833
- const ret = typeof self === 'undefined' ? null : self;
2834
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2835
- };
2836
- imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
2837
- const ret = typeof window === 'undefined' ? null : window;
2838
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
2839
- };
2840
- imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
2841
- const ret = getObject(arg0).then(getObject(arg1));
2842
- return addHeapObject(ret);
2843
- };
2844
- imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
2845
- console.warn(getObject(arg0));
2846
- };
2847
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
2848
- // Cast intrinsic for `Ref(String) -> Externref`.
2849
- const ret = getStringFromWasm0(arg0, arg1);
2850
- return addHeapObject(ret);
2851
- };
2852
- imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
2853
- // Cast intrinsic for `U64 -> Externref`.
2854
- const ret = BigInt.asUintN(64, arg0);
2855
- return addHeapObject(ret);
2856
- };
2857
- imports.wbg.__wbindgen_cast_632ed7cc1a5daedc = function(arg0, arg1) {
2858
- // Cast intrinsic for `Closure(Closure { dtor_idx: 133, function: Function { arguments: [Externref], shim_idx: 134, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2859
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1024, __wasm_bindgen_func_elem_1026);
2860
- return addHeapObject(ret);
2861
- };
2862
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
2863
- // Cast intrinsic for `F64 -> Externref`.
2864
- const ret = arg0;
2865
- return addHeapObject(ret);
2866
- };
2867
- imports.wbg.__wbindgen_cast_f5edc6344c6146a4 = function(arg0, arg1) {
2868
- // Cast intrinsic for `Closure(Closure { dtor_idx: 44, function: Function { arguments: [], shim_idx: 45, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2869
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_476, __wasm_bindgen_func_elem_478);
2870
- return addHeapObject(ret);
2871
- };
2872
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2873
- const ret = getObject(arg0);
2874
- return addHeapObject(ret);
2875
- };
2876
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
2877
- takeObject(arg0);
2878
- };
2879
-
2880
- return imports;
2881
- }
2882
-
2883
- function __wbg_finalize_init(instance, module) {
2884
- wasm = instance.exports;
2885
- __wbg_init.__wbindgen_wasm_module = module;
2886
- cachedDataViewMemory0 = null;
2887
- cachedFloat32ArrayMemory0 = null;
2888
- cachedFloat64ArrayMemory0 = null;
2889
- cachedUint32ArrayMemory0 = null;
2890
- cachedUint8ArrayMemory0 = null;
2891
-
2892
-
2893
- wasm.__wbindgen_start();
2894
- return wasm;
2895
+ return false;
2896
+ }
2895
2897
  }
2896
2898
 
2897
2899
  function initSync(module) {
2898
2900
  if (wasm !== undefined) return wasm;
2899
2901
 
2900
2902
 
2901
- if (typeof module !== 'undefined') {
2903
+ if (module !== undefined) {
2902
2904
  if (Object.getPrototypeOf(module) === Object.prototype) {
2903
2905
  ({module} = module)
2904
2906
  } else {
@@ -2918,7 +2920,7 @@ async function __wbg_init(module_or_path) {
2918
2920
  if (wasm !== undefined) return wasm;
2919
2921
 
2920
2922
 
2921
- if (typeof module_or_path !== 'undefined') {
2923
+ if (module_or_path !== undefined) {
2922
2924
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
2923
2925
  ({module_or_path} = module_or_path)
2924
2926
  } else {
@@ -2926,7 +2928,7 @@ async function __wbg_init(module_or_path) {
2926
2928
  }
2927
2929
  }
2928
2930
 
2929
- if (typeof module_or_path === 'undefined') {
2931
+ if (module_or_path === undefined) {
2930
2932
  module_or_path = new URL('ifc-lite_bg.wasm', import.meta.url);
2931
2933
  }
2932
2934
  const imports = __wbg_get_imports();
@@ -2940,5 +2942,4 @@ async function __wbg_init(module_or_path) {
2940
2942
  return __wbg_finalize_init(instance, module);
2941
2943
  }
2942
2944
 
2943
- export { initSync };
2944
- export default __wbg_init;
2945
+ export { initSync, __wbg_init as default };