@ifc-lite/wasm 1.2.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/pkg/ifc-lite.js CHANGED
@@ -13,71 +13,6 @@ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
13
13
  ? { register: () => {}, unregister: () => {} }
14
14
  : new FinalizationRegistry(state => state.dtor(state.a, state.b));
15
15
 
16
- function debugString(val) {
17
- // primitive types
18
- const type = typeof val;
19
- if (type == 'number' || type == 'boolean' || val == null) {
20
- return `${val}`;
21
- }
22
- if (type == 'string') {
23
- return `"${val}"`;
24
- }
25
- if (type == 'symbol') {
26
- const description = val.description;
27
- if (description == null) {
28
- return 'Symbol';
29
- } else {
30
- return `Symbol(${description})`;
31
- }
32
- }
33
- if (type == 'function') {
34
- const name = val.name;
35
- if (typeof name == 'string' && name.length > 0) {
36
- return `Function(${name})`;
37
- } else {
38
- return 'Function';
39
- }
40
- }
41
- // objects
42
- if (Array.isArray(val)) {
43
- const length = val.length;
44
- let debug = '[';
45
- if (length > 0) {
46
- debug += debugString(val[0]);
47
- }
48
- for(let i = 1; i < length; i++) {
49
- debug += ', ' + debugString(val[i]);
50
- }
51
- debug += ']';
52
- return debug;
53
- }
54
- // Test for built-in
55
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
56
- let className;
57
- if (builtInMatches && builtInMatches.length > 1) {
58
- className = builtInMatches[1];
59
- } else {
60
- // Failed to match the standard '[object ClassName]'
61
- return toString.call(val);
62
- }
63
- if (className == 'Object') {
64
- // we're a user defined class or Object
65
- // JSON.stringify avoids problems with cycles, and is generally much
66
- // easier than looping through ownProperties of `val`.
67
- try {
68
- return 'Object(' + JSON.stringify(val) + ')';
69
- } catch (_) {
70
- return 'Object';
71
- }
72
- }
73
- // errors
74
- if (val instanceof Error) {
75
- return `${val.name}: ${val.message}\n${val.stack}`;
76
- }
77
- // TODO we could test for more things here, like `Set`s and `Map`s.
78
- return className;
79
- }
80
-
81
16
  function dropObject(idx) {
82
17
  if (idx < 132) return;
83
18
  heap[idx] = heap_next;
@@ -150,7 +85,7 @@ function handleError(f, args) {
150
85
  try {
151
86
  return f.apply(this, args);
152
87
  } catch (e) {
153
- wasm.__wbindgen_export3(addHeapObject(e));
88
+ wasm.__wbindgen_export(addHeapObject(e));
154
89
  }
155
90
  }
156
91
 
@@ -263,16 +198,16 @@ if (!('encodeInto' in cachedTextEncoder)) {
263
198
 
264
199
  let WASM_VECTOR_LEN = 0;
265
200
 
266
- function __wasm_bindgen_func_elem_393(arg0, arg1) {
267
- wasm.__wasm_bindgen_func_elem_393(arg0, arg1);
201
+ function __wasm_bindgen_func_elem_474(arg0, arg1) {
202
+ wasm.__wasm_bindgen_func_elem_474(arg0, arg1);
268
203
  }
269
204
 
270
- function __wasm_bindgen_func_elem_725(arg0, arg1, arg2) {
271
- wasm.__wasm_bindgen_func_elem_725(arg0, arg1, addHeapObject(arg2));
205
+ function __wasm_bindgen_func_elem_921(arg0, arg1, arg2) {
206
+ wasm.__wasm_bindgen_func_elem_921(arg0, arg1, addHeapObject(arg2));
272
207
  }
273
208
 
274
- function __wasm_bindgen_func_elem_756(arg0, arg1, arg2, arg3) {
275
- wasm.__wasm_bindgen_func_elem_756(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
209
+ function __wasm_bindgen_func_elem_952(arg0, arg1, arg2, arg3) {
210
+ wasm.__wasm_bindgen_func_elem_952(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
276
211
  }
277
212
 
278
213
  const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -331,6 +266,18 @@ const RtcOffsetJsFinalization = (typeof FinalizationRegistry === 'undefined')
331
266
  ? { register: () => {}, unregister: () => {} }
332
267
  : new FinalizationRegistry(ptr => wasm.__wbg_rtcoffsetjs_free(ptr >>> 0, 1));
333
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
+
334
281
  const ZeroCopyMeshFinalization = (typeof FinalizationRegistry === 'undefined')
335
282
  ? { register: () => {}, unregister: () => {} }
336
283
  : new FinalizationRegistry(ptr => wasm.__wbg_zerocopymesh_free(ptr >>> 0, 1));
@@ -460,7 +407,7 @@ export class GeoReferenceJs {
460
407
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
461
408
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
462
409
  var v1 = getArrayF64FromWasm0(r0, r1).slice();
463
- wasm.__wbindgen_export4(r0, r1 * 8, 8);
410
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
464
411
  return v1;
465
412
  } finally {
466
413
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -480,7 +427,7 @@ export class GeoReferenceJs {
480
427
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
481
428
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
482
429
  var v1 = getArrayF64FromWasm0(r0, r1).slice();
483
- wasm.__wbindgen_export4(r0, r1 * 8, 8);
430
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
484
431
  return v1;
485
432
  } finally {
486
433
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -499,7 +446,7 @@ export class GeoReferenceJs {
499
446
  let v1;
500
447
  if (r0 !== 0) {
501
448
  v1 = getStringFromWasm0(r0, r1).slice();
502
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
449
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
503
450
  }
504
451
  return v1;
505
452
  } finally {
@@ -525,7 +472,7 @@ export class GeoReferenceJs {
525
472
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
526
473
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
527
474
  var v1 = getArrayF64FromWasm0(r0, r1).slice();
528
- wasm.__wbindgen_export4(r0, r1 * 8, 8);
475
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
529
476
  return v1;
530
477
  } finally {
531
478
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -586,6 +533,47 @@ export class GpuGeometry {
586
533
  const ret = wasm.gpugeometry_indicesPtr(this.__wbg_ptr);
587
534
  return ret >>> 0;
588
535
  }
536
+ /**
537
+ * Get X component of RTC offset
538
+ * @returns {number}
539
+ */
540
+ get rtcOffsetX() {
541
+ const ret = wasm.gpugeometry_rtcOffsetX(this.__wbg_ptr);
542
+ return ret;
543
+ }
544
+ /**
545
+ * Get Y component of RTC offset
546
+ * @returns {number}
547
+ */
548
+ get rtcOffsetY() {
549
+ const ret = wasm.gpugeometry_rtcOffsetY(this.__wbg_ptr);
550
+ return ret;
551
+ }
552
+ /**
553
+ * Get Z component of RTC offset
554
+ * @returns {number}
555
+ */
556
+ get rtcOffsetZ() {
557
+ const ret = wasm.gpugeometry_rtcOffsetZ(this.__wbg_ptr);
558
+ return ret;
559
+ }
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
+ /**
569
+ * Set the RTC (Relative To Center) offset applied to coordinates
570
+ * @param {number} x
571
+ * @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
+ }
589
577
  /**
590
578
  * Get length of vertex data array (in f32 elements, not bytes)
591
579
  * @returns {number}
@@ -619,7 +607,7 @@ export class GpuGeometry {
619
607
  let v1;
620
608
  if (r0 !== 0) {
621
609
  v1 = getStringFromWasm0(r0, r1).slice();
622
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
610
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
623
611
  }
624
612
  return v1;
625
613
  } finally {
@@ -766,7 +754,7 @@ export class GpuInstancedGeometry {
766
754
  * @returns {number}
767
755
  */
768
756
  get vertexDataPtr() {
769
- const ret = wasm.gpugeometry_indicesPtr(this.__wbg_ptr);
757
+ const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
770
758
  return ret >>> 0;
771
759
  }
772
760
  /**
@@ -1061,7 +1049,7 @@ export class GpuMeshMetadata {
1061
1049
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1062
1050
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1063
1051
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
1064
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
1052
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
1065
1053
  return v1;
1066
1054
  } finally {
1067
1055
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1111,7 +1099,7 @@ export class IfcAPI {
1111
1099
  * @returns {MeshCollection}
1112
1100
  */
1113
1101
  parseMeshes(content) {
1114
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1102
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1115
1103
  const len0 = WASM_VECTOR_LEN;
1116
1104
  const ret = wasm.ifcapi_parseMeshes(this.__wbg_ptr, ptr0, len0);
1117
1105
  return MeshCollection.__wrap(ret);
@@ -1132,7 +1120,7 @@ export class IfcAPI {
1132
1120
  * @returns {Promise<any>}
1133
1121
  */
1134
1122
  parseStreaming(content, callback) {
1135
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1123
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1136
1124
  const len0 = WASM_VECTOR_LEN;
1137
1125
  const ret = wasm.ifcapi_parseStreaming(this.__wbg_ptr, ptr0, len0, addHeapObject(callback));
1138
1126
  return takeObject(ret);
@@ -1161,7 +1149,7 @@ export class IfcAPI {
1161
1149
  * @returns {ZeroCopyMesh}
1162
1150
  */
1163
1151
  parseZeroCopy(content) {
1164
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1152
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1165
1153
  const len0 = WASM_VECTOR_LEN;
1166
1154
  const ret = wasm.ifcapi_parseZeroCopy(this.__wbg_ptr, ptr0, len0);
1167
1155
  return ZeroCopyMesh.__wrap(ret);
@@ -1183,7 +1171,7 @@ export class IfcAPI {
1183
1171
  * @returns {GeoReferenceJs | undefined}
1184
1172
  */
1185
1173
  getGeoReference(content) {
1186
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1174
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1187
1175
  const len0 = WASM_VECTOR_LEN;
1188
1176
  const ret = wasm.ifcapi_getGeoReference(this.__wbg_ptr, ptr0, len0);
1189
1177
  return ret === 0 ? undefined : GeoReferenceJs.__wrap(ret);
@@ -1192,13 +1180,25 @@ export class IfcAPI {
1192
1180
  * Parse IFC file with streaming mesh batches for progressive rendering
1193
1181
  * Calls the callback with batches of meshes, yielding to browser between batches
1194
1182
  *
1183
+ * Options:
1184
+ * - `batchSize`: Number of meshes per batch (default: 25)
1185
+ * - `onBatch(meshes, progress)`: Called for each batch of meshes
1186
+ * - `onRtcOffset({x, y, z, hasRtc})`: Called early with RTC offset for camera/world setup
1187
+ * - `onColorUpdate(Map<id, color>)`: Called with style updates after initial render
1188
+ * - `onComplete(stats)`: Called when parsing completes with stats including rtcOffset
1189
+ *
1195
1190
  * Example:
1196
1191
  * ```javascript
1197
1192
  * const api = new IfcAPI();
1198
1193
  * await api.parseMeshesAsync(ifcData, {
1199
1194
  * batchSize: 100,
1195
+ * onRtcOffset: (rtc) => {
1196
+ * if (rtc.hasRtc) {
1197
+ * // Model uses large coordinates - adjust camera/world origin
1198
+ * viewer.setWorldOffset(rtc.x, rtc.y, rtc.z);
1199
+ * }
1200
+ * },
1200
1201
  * onBatch: (meshes, progress) => {
1201
- * // Add meshes to scene
1202
1202
  * for (const mesh of meshes) {
1203
1203
  * scene.add(createThreeMesh(mesh));
1204
1204
  * }
@@ -1206,6 +1206,7 @@ export class IfcAPI {
1206
1206
  * },
1207
1207
  * onComplete: (stats) => {
1208
1208
  * console.log(`Done! ${stats.totalMeshes} meshes`);
1209
+ * // stats.rtcOffset also available here: {x, y, z, hasRtc}
1209
1210
  * }
1210
1211
  * });
1211
1212
  * ```
@@ -1214,7 +1215,7 @@ export class IfcAPI {
1214
1215
  * @returns {Promise<any>}
1215
1216
  */
1216
1217
  parseMeshesAsync(content, options) {
1217
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1218
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1218
1219
  const len0 = WASM_VECTOR_LEN;
1219
1220
  const ret = wasm.ifcapi_parseMeshesAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1220
1221
  return takeObject(ret);
@@ -1227,7 +1228,7 @@ export class IfcAPI {
1227
1228
  * @returns {any}
1228
1229
  */
1229
1230
  scanEntitiesFast(content) {
1230
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1231
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1231
1232
  const len0 = WASM_VECTOR_LEN;
1232
1233
  const ret = wasm.ifcapi_scanEntitiesFast(this.__wbg_ptr, ptr0, len0);
1233
1234
  return takeObject(ret);
@@ -1252,7 +1253,7 @@ export class IfcAPI {
1252
1253
  * @returns {MeshCollectionWithRtc}
1253
1254
  */
1254
1255
  parseMeshesWithRtc(content) {
1255
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1256
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1256
1257
  const len0 = WASM_VECTOR_LEN;
1257
1258
  const ret = wasm.ifcapi_parseMeshesWithRtc(this.__wbg_ptr, ptr0, len0);
1258
1259
  return MeshCollectionWithRtc.__wrap(ret);
@@ -1296,7 +1297,7 @@ export class IfcAPI {
1296
1297
  * @returns {GpuGeometry}
1297
1298
  */
1298
1299
  parseToGpuGeometry(content) {
1299
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1300
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1300
1301
  const len0 = WASM_VECTOR_LEN;
1301
1302
  const ret = wasm.ifcapi_parseToGpuGeometry(this.__wbg_ptr, ptr0, len0);
1302
1303
  return GpuGeometry.__wrap(ret);
@@ -1324,7 +1325,7 @@ export class IfcAPI {
1324
1325
  * @returns {InstancedMeshCollection}
1325
1326
  */
1326
1327
  parseMeshesInstanced(content) {
1327
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1328
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1328
1329
  const len0 = WASM_VECTOR_LEN;
1329
1330
  const ret = wasm.ifcapi_parseMeshesInstanced(this.__wbg_ptr, ptr0, len0);
1330
1331
  return InstancedMeshCollection.__wrap(ret);
@@ -1339,7 +1340,7 @@ export class IfcAPI {
1339
1340
  let deferred2_1;
1340
1341
  try {
1341
1342
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1342
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1343
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1343
1344
  const len0 = WASM_VECTOR_LEN;
1344
1345
  wasm.ifcapi_debugProcessEntity953(retptr, this.__wbg_ptr, ptr0, len0);
1345
1346
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -1349,7 +1350,7 @@ export class IfcAPI {
1349
1350
  return getStringFromWasm0(r0, r1);
1350
1351
  } finally {
1351
1352
  wasm.__wbindgen_add_to_stack_pointer(16);
1352
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
1353
+ wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
1353
1354
  }
1354
1355
  }
1355
1356
  /**
@@ -1362,7 +1363,7 @@ export class IfcAPI {
1362
1363
  let deferred2_1;
1363
1364
  try {
1364
1365
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1365
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1366
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1366
1367
  const len0 = WASM_VECTOR_LEN;
1367
1368
  wasm.ifcapi_debugProcessFirstWall(retptr, this.__wbg_ptr, ptr0, len0);
1368
1369
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -1372,7 +1373,7 @@ export class IfcAPI {
1372
1373
  return getStringFromWasm0(r0, r1);
1373
1374
  } finally {
1374
1375
  wasm.__wbindgen_add_to_stack_pointer(16);
1375
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
1376
+ wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
1376
1377
  }
1377
1378
  }
1378
1379
  /**
@@ -1412,7 +1413,7 @@ export class IfcAPI {
1412
1413
  * @returns {Promise<any>}
1413
1414
  */
1414
1415
  parseToGpuGeometryAsync(content, options) {
1415
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1416
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1416
1417
  const len0 = WASM_VECTOR_LEN;
1417
1418
  const ret = wasm.ifcapi_parseToGpuGeometryAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1418
1419
  return takeObject(ret);
@@ -1426,7 +1427,7 @@ export class IfcAPI {
1426
1427
  * @returns {any}
1427
1428
  */
1428
1429
  scanGeometryEntitiesFast(content) {
1429
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1430
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1430
1431
  const len0 = WASM_VECTOR_LEN;
1431
1432
  const ret = wasm.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, ptr0, len0);
1432
1433
  return takeObject(ret);
@@ -1456,11 +1457,34 @@ export class IfcAPI {
1456
1457
  * @returns {Promise<any>}
1457
1458
  */
1458
1459
  parseMeshesInstancedAsync(content, options) {
1459
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1460
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1460
1461
  const len0 = WASM_VECTOR_LEN;
1461
1462
  const ret = wasm.ifcapi_parseMeshesInstancedAsync(this.__wbg_ptr, ptr0, len0, addHeapObject(options));
1462
1463
  return takeObject(ret);
1463
1464
  }
1465
+ /**
1466
+ * Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
1467
+ * These are 2D curves used for architectural drawings instead of sectioning 3D geometry
1468
+ *
1469
+ * Example:
1470
+ * ```javascript
1471
+ * const api = new IfcAPI();
1472
+ * const symbols = api.parseSymbolicRepresentations(ifcData);
1473
+ * console.log('Found', symbols.totalCount, 'symbolic items');
1474
+ * for (let i = 0; i < symbols.polylineCount; i++) {
1475
+ * const polyline = symbols.getPolyline(i);
1476
+ * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
1477
+ * }
1478
+ * ```
1479
+ * @param {string} content
1480
+ * @returns {SymbolicRepresentationCollection}
1481
+ */
1482
+ parseSymbolicRepresentations(content) {
1483
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1484
+ const len0 = WASM_VECTOR_LEN;
1485
+ const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
1486
+ return SymbolicRepresentationCollection.__wrap(ret);
1487
+ }
1464
1488
  /**
1465
1489
  * Parse IFC file to GPU-ready instanced geometry for zero-copy upload
1466
1490
  *
@@ -1470,7 +1494,7 @@ export class IfcAPI {
1470
1494
  * @returns {GpuInstancedGeometryCollection}
1471
1495
  */
1472
1496
  parseToGpuInstancedGeometry(content) {
1473
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1497
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1474
1498
  const len0 = WASM_VECTOR_LEN;
1475
1499
  const ret = wasm.ifcapi_parseToGpuInstancedGeometry(this.__wbg_ptr, ptr0, len0);
1476
1500
  return GpuInstancedGeometryCollection.__wrap(ret);
@@ -1497,7 +1521,7 @@ export class IfcAPI {
1497
1521
  * @returns {Promise<any>}
1498
1522
  */
1499
1523
  parse(content) {
1500
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1524
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1501
1525
  const len0 = WASM_VECTOR_LEN;
1502
1526
  const ret = wasm.ifcapi_parse(this.__wbg_ptr, ptr0, len0);
1503
1527
  return takeObject(ret);
@@ -1519,7 +1543,7 @@ export class IfcAPI {
1519
1543
  return getStringFromWasm0(r0, r1);
1520
1544
  } finally {
1521
1545
  wasm.__wbindgen_add_to_stack_pointer(16);
1522
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1546
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
1523
1547
  }
1524
1548
  }
1525
1549
  /**
@@ -1571,7 +1595,7 @@ export class InstanceData {
1571
1595
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1572
1596
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1573
1597
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
1574
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
1598
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
1575
1599
  return v1;
1576
1600
  } finally {
1577
1601
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1728,6 +1752,60 @@ export class MeshCollection {
1728
1752
  const ptr = this.__destroy_into_raw();
1729
1753
  wasm.__wbg_meshcollection_free(ptr, 0);
1730
1754
  }
1755
+ /**
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}
1767
+ */
1768
+ get rtcOffsetY() {
1769
+ const ret = wasm.meshcollection_rtcOffsetY(this.__wbg_ptr);
1770
+ return ret;
1771
+ }
1772
+ /**
1773
+ * Get RTC offset Z
1774
+ * @returns {number}
1775
+ */
1776
+ get rtcOffsetZ() {
1777
+ const ret = wasm.meshcollection_rtcOffsetZ(this.__wbg_ptr);
1778
+ return ret;
1779
+ }
1780
+ /**
1781
+ * Check if RTC offset is significant (>10km)
1782
+ * @returns {boolean}
1783
+ */
1784
+ hasRtcOffset() {
1785
+ const ret = wasm.meshcollection_hasRtcOffset(this.__wbg_ptr);
1786
+ return ret !== 0;
1787
+ }
1788
+ /**
1789
+ * Convert local coordinates to world coordinates
1790
+ * Use this to convert mesh positions back to original IFC coordinates
1791
+ * @param {number} x
1792
+ * @param {number} y
1793
+ * @param {number} z
1794
+ * @returns {Float64Array}
1795
+ */
1796
+ localToWorld(x, y, z) {
1797
+ try {
1798
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1799
+ wasm.meshcollection_localToWorld(retptr, this.__wbg_ptr, x, y, z);
1800
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1801
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1802
+ var v1 = getArrayF64FromWasm0(r0, r1).slice();
1803
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
1804
+ return v1;
1805
+ } finally {
1806
+ wasm.__wbindgen_add_to_stack_pointer(16);
1807
+ }
1808
+ }
1731
1809
  /**
1732
1810
  * Get total vertex count across all meshes
1733
1811
  * @returns {number}
@@ -1744,6 +1822,22 @@ export class MeshCollection {
1744
1822
  const ret = wasm.meshcollection_totalTriangles(this.__wbg_ptr);
1745
1823
  return ret >>> 0;
1746
1824
  }
1825
+ /**
1826
+ * Get building rotation angle in radians (from IfcSite placement)
1827
+ * Returns None if no rotation was detected
1828
+ * @returns {number | undefined}
1829
+ */
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
+ }
1840
+ }
1747
1841
  /**
1748
1842
  * Get mesh at index
1749
1843
  * @param {number} index
@@ -1807,7 +1901,7 @@ export class MeshCollectionWithRtc {
1807
1901
  * @returns {number}
1808
1902
  */
1809
1903
  get length() {
1810
- const ret = wasm.meshcollectionwithrtc_length(this.__wbg_ptr);
1904
+ const ret = wasm.meshcollection_length(this.__wbg_ptr);
1811
1905
  return ret >>> 0;
1812
1906
  }
1813
1907
  /**
@@ -1855,7 +1949,7 @@ export class MeshDataJs {
1855
1949
  * @returns {number}
1856
1950
  */
1857
1951
  get vertexCount() {
1858
- const ret = wasm.gpugeometry_totalTriangleCount(this.__wbg_ptr);
1952
+ const ret = wasm.meshdatajs_vertexCount(this.__wbg_ptr);
1859
1953
  return ret >>> 0;
1860
1954
  }
1861
1955
  /**
@@ -1877,7 +1971,7 @@ export class MeshDataJs {
1877
1971
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1878
1972
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1879
1973
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
1880
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
1974
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
1881
1975
  return v1;
1882
1976
  } finally {
1883
1977
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1916,7 +2010,7 @@ export class MeshDataJs {
1916
2010
  return getStringFromWasm0(r0, r1);
1917
2011
  } finally {
1918
2012
  wasm.__wbindgen_add_to_stack_pointer(16);
1919
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
2013
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
1920
2014
  }
1921
2015
  }
1922
2016
  /**
@@ -2018,7 +2112,7 @@ export class RtcOffsetJs {
2018
2112
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2019
2113
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2020
2114
  var v1 = getArrayF64FromWasm0(r0, r1).slice();
2021
- wasm.__wbindgen_export4(r0, r1 * 8, 8);
2115
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
2022
2116
  return v1;
2023
2117
  } finally {
2024
2118
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -2027,6 +2121,306 @@ export class RtcOffsetJs {
2027
2121
  }
2028
2122
  if (Symbol.dispose) RtcOffsetJs.prototype[Symbol.dispose] = RtcOffsetJs.prototype.free;
2029
2123
 
2124
+ /**
2125
+ * A 2D circle/arc for symbolic representations
2126
+ */
2127
+ export class SymbolicCircle {
2128
+ static __wrap(ptr) {
2129
+ ptr = ptr >>> 0;
2130
+ const obj = Object.create(SymbolicCircle.prototype);
2131
+ obj.__wbg_ptr = ptr;
2132
+ SymbolicCircleFinalization.register(obj, obj.__wbg_ptr, obj);
2133
+ return obj;
2134
+ }
2135
+ __destroy_into_raw() {
2136
+ const ptr = this.__wbg_ptr;
2137
+ this.__wbg_ptr = 0;
2138
+ SymbolicCircleFinalization.unregister(this);
2139
+ return ptr;
2140
+ }
2141
+ free() {
2142
+ const ptr = this.__destroy_into_raw();
2143
+ wasm.__wbg_symboliccircle_free(ptr, 0);
2144
+ }
2145
+ /**
2146
+ * @returns {number}
2147
+ */
2148
+ get expressId() {
2149
+ const ret = wasm.gpumeshmetadata_vertexCount(this.__wbg_ptr);
2150
+ return ret >>> 0;
2151
+ }
2152
+ /**
2153
+ * @returns {number}
2154
+ */
2155
+ get startAngle() {
2156
+ const ret = wasm.symboliccircle_startAngle(this.__wbg_ptr);
2157
+ return ret;
2158
+ }
2159
+ /**
2160
+ * Check if this is a full circle
2161
+ * @returns {boolean}
2162
+ */
2163
+ get isFullCircle() {
2164
+ const ret = wasm.symboliccircle_isFullCircle(this.__wbg_ptr);
2165
+ return ret !== 0;
2166
+ }
2167
+ /**
2168
+ * @returns {string}
2169
+ */
2170
+ get repIdentifier() {
2171
+ let deferred1_0;
2172
+ let deferred1_1;
2173
+ try {
2174
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2175
+ wasm.symboliccircle_repIdentifier(retptr, this.__wbg_ptr);
2176
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2177
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2178
+ deferred1_0 = r0;
2179
+ deferred1_1 = r1;
2180
+ return getStringFromWasm0(r0, r1);
2181
+ } finally {
2182
+ wasm.__wbindgen_add_to_stack_pointer(16);
2183
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2184
+ }
2185
+ }
2186
+ /**
2187
+ * @returns {number}
2188
+ */
2189
+ get radius() {
2190
+ const ret = wasm.symboliccircle_radius(this.__wbg_ptr);
2191
+ return ret;
2192
+ }
2193
+ /**
2194
+ * @returns {number}
2195
+ */
2196
+ get centerX() {
2197
+ const ret = wasm.symboliccircle_centerX(this.__wbg_ptr);
2198
+ return ret;
2199
+ }
2200
+ /**
2201
+ * @returns {number}
2202
+ */
2203
+ get centerY() {
2204
+ const ret = wasm.symboliccircle_centerY(this.__wbg_ptr);
2205
+ return ret;
2206
+ }
2207
+ /**
2208
+ * @returns {string}
2209
+ */
2210
+ get ifcType() {
2211
+ let deferred1_0;
2212
+ let deferred1_1;
2213
+ try {
2214
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2215
+ wasm.symboliccircle_ifcType(retptr, this.__wbg_ptr);
2216
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2217
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2218
+ deferred1_0 = r0;
2219
+ deferred1_1 = r1;
2220
+ return getStringFromWasm0(r0, r1);
2221
+ } finally {
2222
+ wasm.__wbindgen_add_to_stack_pointer(16);
2223
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2224
+ }
2225
+ }
2226
+ /**
2227
+ * @returns {number}
2228
+ */
2229
+ get endAngle() {
2230
+ const ret = wasm.symboliccircle_endAngle(this.__wbg_ptr);
2231
+ return ret;
2232
+ }
2233
+ }
2234
+ if (Symbol.dispose) SymbolicCircle.prototype[Symbol.dispose] = SymbolicCircle.prototype.free;
2235
+
2236
+ /**
2237
+ * A single 2D polyline for symbolic representations (Plan, Annotation, FootPrint)
2238
+ * Points are stored as [x1, y1, x2, y2, ...] in 2D coordinates
2239
+ */
2240
+ export class SymbolicPolyline {
2241
+ static __wrap(ptr) {
2242
+ ptr = ptr >>> 0;
2243
+ const obj = Object.create(SymbolicPolyline.prototype);
2244
+ obj.__wbg_ptr = ptr;
2245
+ SymbolicPolylineFinalization.register(obj, obj.__wbg_ptr, obj);
2246
+ return obj;
2247
+ }
2248
+ __destroy_into_raw() {
2249
+ const ptr = this.__wbg_ptr;
2250
+ this.__wbg_ptr = 0;
2251
+ SymbolicPolylineFinalization.unregister(this);
2252
+ return ptr;
2253
+ }
2254
+ free() {
2255
+ const ptr = this.__destroy_into_raw();
2256
+ wasm.__wbg_symbolicpolyline_free(ptr, 0);
2257
+ }
2258
+ /**
2259
+ * Get express ID of the parent element
2260
+ * @returns {number}
2261
+ */
2262
+ get expressId() {
2263
+ const ret = wasm.symbolicpolyline_expressId(this.__wbg_ptr);
2264
+ return ret >>> 0;
2265
+ }
2266
+ /**
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")
2276
+ * @returns {string}
2277
+ */
2278
+ get repIdentifier() {
2279
+ let deferred1_0;
2280
+ let deferred1_1;
2281
+ try {
2282
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2283
+ wasm.symbolicpolyline_repIdentifier(retptr, this.__wbg_ptr);
2284
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2285
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2286
+ deferred1_0 = r0;
2287
+ deferred1_1 = r1;
2288
+ return getStringFromWasm0(r0, r1);
2289
+ } finally {
2290
+ wasm.__wbindgen_add_to_stack_pointer(16);
2291
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2292
+ }
2293
+ }
2294
+ /**
2295
+ * Get 2D points as Float32Array [x1, y1, x2, y2, ...]
2296
+ * @returns {Float32Array}
2297
+ */
2298
+ get points() {
2299
+ const ret = wasm.symbolicpolyline_points(this.__wbg_ptr);
2300
+ return takeObject(ret);
2301
+ }
2302
+ /**
2303
+ * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
2304
+ * @returns {string}
2305
+ */
2306
+ get ifcType() {
2307
+ let deferred1_0;
2308
+ let deferred1_1;
2309
+ try {
2310
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2311
+ wasm.symbolicpolyline_ifcType(retptr, this.__wbg_ptr);
2312
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2313
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2314
+ deferred1_0 = r0;
2315
+ deferred1_1 = r1;
2316
+ return getStringFromWasm0(r0, r1);
2317
+ } finally {
2318
+ wasm.__wbindgen_add_to_stack_pointer(16);
2319
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2320
+ }
2321
+ }
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
+ }
2331
+ if (Symbol.dispose) SymbolicPolyline.prototype[Symbol.dispose] = SymbolicPolyline.prototype.free;
2332
+
2333
+ /**
2334
+ * Collection of symbolic representations for an IFC model
2335
+ */
2336
+ export class SymbolicRepresentationCollection {
2337
+ static __wrap(ptr) {
2338
+ ptr = ptr >>> 0;
2339
+ const obj = Object.create(SymbolicRepresentationCollection.prototype);
2340
+ obj.__wbg_ptr = ptr;
2341
+ SymbolicRepresentationCollectionFinalization.register(obj, obj.__wbg_ptr, obj);
2342
+ return obj;
2343
+ }
2344
+ __destroy_into_raw() {
2345
+ const ptr = this.__wbg_ptr;
2346
+ this.__wbg_ptr = 0;
2347
+ SymbolicRepresentationCollectionFinalization.unregister(this);
2348
+ return ptr;
2349
+ }
2350
+ free() {
2351
+ const ptr = this.__destroy_into_raw();
2352
+ wasm.__wbg_symbolicrepresentationcollection_free(ptr, 0);
2353
+ }
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
+ /**
2372
+ * Get number of circles/arcs
2373
+ * @returns {number}
2374
+ */
2375
+ get circleCount() {
2376
+ const ret = wasm.symbolicrepresentationcollection_circleCount(this.__wbg_ptr);
2377
+ return ret >>> 0;
2378
+ }
2379
+ /**
2380
+ * Get polyline at index
2381
+ * @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}
2391
+ */
2392
+ get polylineCount() {
2393
+ const ret = wasm.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr);
2394
+ return ret >>> 0;
2395
+ }
2396
+ /**
2397
+ * Get all express IDs that have symbolic representations
2398
+ * @returns {Uint32Array}
2399
+ */
2400
+ getExpressIds() {
2401
+ try {
2402
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2403
+ wasm.symbolicrepresentationcollection_getExpressIds(retptr, this.__wbg_ptr);
2404
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2405
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2406
+ var v1 = getArrayU32FromWasm0(r0, r1).slice();
2407
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
2408
+ return v1;
2409
+ } finally {
2410
+ wasm.__wbindgen_add_to_stack_pointer(16);
2411
+ }
2412
+ }
2413
+ /**
2414
+ * Check if collection is empty
2415
+ * @returns {boolean}
2416
+ */
2417
+ get isEmpty() {
2418
+ const ret = wasm.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr);
2419
+ return ret !== 0;
2420
+ }
2421
+ }
2422
+ if (Symbol.dispose) SymbolicRepresentationCollection.prototype[Symbol.dispose] = SymbolicRepresentationCollection.prototype.free;
2423
+
2030
2424
  /**
2031
2425
  * Zero-copy mesh that exposes pointers to WASM memory
2032
2426
  */
@@ -2059,7 +2453,7 @@ export class ZeroCopyMesh {
2059
2453
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2060
2454
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2061
2455
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
2062
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
2456
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
2063
2457
  return v1;
2064
2458
  } finally {
2065
2459
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -2076,7 +2470,7 @@ export class ZeroCopyMesh {
2076
2470
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2077
2471
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2078
2472
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
2079
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
2473
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
2080
2474
  return v1;
2081
2475
  } finally {
2082
2476
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -2103,7 +2497,7 @@ export class ZeroCopyMesh {
2103
2497
  * @returns {number}
2104
2498
  */
2105
2499
  get normals_len() {
2106
- const ret = wasm.gpugeometry_indicesLen(this.__wbg_ptr);
2500
+ const ret = wasm.zerocopymesh_normals_len(this.__wbg_ptr);
2107
2501
  return ret >>> 0;
2108
2502
  }
2109
2503
  /**
@@ -2111,7 +2505,7 @@ export class ZeroCopyMesh {
2111
2505
  * @returns {number}
2112
2506
  */
2113
2507
  get normals_ptr() {
2114
- const ret = wasm.gpugeometry_indicesPtr(this.__wbg_ptr);
2508
+ const ret = wasm.gpuinstancedgeometry_vertexDataPtr(this.__wbg_ptr);
2115
2509
  return ret >>> 0;
2116
2510
  }
2117
2511
  /**
@@ -2127,7 +2521,7 @@ export class ZeroCopyMesh {
2127
2521
  * @returns {number}
2128
2522
  */
2129
2523
  get positions_len() {
2130
- const ret = wasm.gpugeometry_vertexDataLen(this.__wbg_ptr);
2524
+ const ret = wasm.zerocopymesh_positions_len(this.__wbg_ptr);
2131
2525
  return ret >>> 0;
2132
2526
  }
2133
2527
  /**
@@ -2136,7 +2530,7 @@ export class ZeroCopyMesh {
2136
2530
  * @returns {number}
2137
2531
  */
2138
2532
  get positions_ptr() {
2139
- const ret = wasm.gpugeometry_vertexDataPtr(this.__wbg_ptr);
2533
+ const ret = wasm.zerocopymesh_positions_ptr(this.__wbg_ptr);
2140
2534
  return ret >>> 0;
2141
2535
  }
2142
2536
  /**
@@ -2161,7 +2555,7 @@ export class ZeroCopyMesh {
2161
2555
  * @returns {boolean}
2162
2556
  */
2163
2557
  get is_empty() {
2164
- const ret = wasm.gpugeometry_isEmpty(this.__wbg_ptr);
2558
+ const ret = wasm.zerocopymesh_is_empty(this.__wbg_ptr);
2165
2559
  return ret !== 0;
2166
2560
  }
2167
2561
  }
@@ -2213,7 +2607,7 @@ export function version() {
2213
2607
  return getStringFromWasm0(r0, r1);
2214
2608
  } finally {
2215
2609
  wasm.__wbindgen_add_to_stack_pointer(16);
2216
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
2610
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
2217
2611
  }
2218
2612
  }
2219
2613
 
@@ -2256,13 +2650,6 @@ function __wbg_get_imports() {
2256
2650
  const ret = Error(getStringFromWasm0(arg0, arg1));
2257
2651
  return addHeapObject(ret);
2258
2652
  };
2259
- imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
2260
- const ret = debugString(getObject(arg1));
2261
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2262
- const len1 = WASM_VECTOR_LEN;
2263
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2264
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2265
- };
2266
2653
  imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
2267
2654
  const ret = typeof(getObject(arg0)) === 'function';
2268
2655
  return ret;
@@ -2311,7 +2698,7 @@ function __wbg_get_imports() {
2311
2698
  deferred0_1 = arg1;
2312
2699
  console.error(getStringFromWasm0(arg0, arg1));
2313
2700
  } finally {
2314
- wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
2701
+ wasm.__wbindgen_export2(deferred0_0, deferred0_1, 1);
2315
2702
  }
2316
2703
  };
2317
2704
  imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
@@ -2326,6 +2713,10 @@ function __wbg_get_imports() {
2326
2713
  const ret = InstancedGeometry.__wrap(arg0);
2327
2714
  return addHeapObject(ret);
2328
2715
  };
2716
+ imports.wbg.__wbg_length_86ce4877baf913bb = function(arg0) {
2717
+ const ret = getObject(arg0).length;
2718
+ return ret;
2719
+ };
2329
2720
  imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
2330
2721
  const ret = getObject(arg0).length;
2331
2722
  return ret;
@@ -2357,7 +2748,7 @@ function __wbg_get_imports() {
2357
2748
  const a = state0.a;
2358
2749
  state0.a = 0;
2359
2750
  try {
2360
- return __wasm_bindgen_func_elem_756(a, state0.b, arg0, arg1);
2751
+ return __wasm_bindgen_func_elem_952(a, state0.b, arg0, arg1);
2361
2752
  } finally {
2362
2753
  state0.a = a;
2363
2754
  }
@@ -2380,6 +2771,9 @@ function __wbg_get_imports() {
2380
2771
  const ret = new Function(getStringFromWasm0(arg0, arg1));
2381
2772
  return addHeapObject(ret);
2382
2773
  };
2774
+ imports.wbg.__wbg_prototypesetcall_96cc7097487b926d = function(arg0, arg1, arg2) {
2775
+ Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
2776
+ };
2383
2777
  imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
2384
2778
  const ret = getObject(arg0).push(getObject(arg1));
2385
2779
  return ret;
@@ -2419,7 +2813,7 @@ function __wbg_get_imports() {
2419
2813
  };
2420
2814
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
2421
2815
  const ret = getObject(arg1).stack;
2422
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2816
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
2423
2817
  const len1 = WASM_VECTOR_LEN;
2424
2818
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2425
2819
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
@@ -2444,29 +2838,32 @@ function __wbg_get_imports() {
2444
2838
  const ret = getObject(arg0).then(getObject(arg1));
2445
2839
  return addHeapObject(ret);
2446
2840
  };
2841
+ imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
2842
+ console.warn(getObject(arg0));
2843
+ };
2447
2844
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
2448
2845
  // Cast intrinsic for `Ref(String) -> Externref`.
2449
2846
  const ret = getStringFromWasm0(arg0, arg1);
2450
2847
  return addHeapObject(ret);
2451
2848
  };
2452
- imports.wbg.__wbindgen_cast_2ead27b74a7138e7 = function(arg0, arg1) {
2453
- // Cast intrinsic for `Closure(Closure { dtor_idx: 48, function: Function { arguments: [], shim_idx: 49, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2454
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_389, __wasm_bindgen_func_elem_393);
2455
- return addHeapObject(ret);
2456
- };
2457
2849
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
2458
2850
  // Cast intrinsic for `U64 -> Externref`.
2459
2851
  const ret = BigInt.asUintN(64, arg0);
2460
2852
  return addHeapObject(ret);
2461
2853
  };
2854
+ imports.wbg.__wbindgen_cast_7f089052c998c143 = function(arg0, arg1) {
2855
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 105, function: Function { arguments: [Externref], shim_idx: 106, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2856
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_919, __wasm_bindgen_func_elem_921);
2857
+ return addHeapObject(ret);
2858
+ };
2462
2859
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
2463
2860
  // Cast intrinsic for `F64 -> Externref`.
2464
2861
  const ret = arg0;
2465
2862
  return addHeapObject(ret);
2466
2863
  };
2467
- imports.wbg.__wbindgen_cast_f2cc0f2a96e2ef5b = function(arg0, arg1) {
2468
- // Cast intrinsic for `Closure(Closure { dtor_idx: 115, function: Function { arguments: [Externref], shim_idx: 116, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2469
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_720, __wasm_bindgen_func_elem_725);
2864
+ imports.wbg.__wbindgen_cast_fa504d1cec41bd0d = function(arg0, arg1) {
2865
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 45, function: Function { arguments: [], shim_idx: 46, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2866
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_472, __wasm_bindgen_func_elem_474);
2470
2867
  return addHeapObject(ret);
2471
2868
  };
2472
2869
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {