@ifc-lite/wasm 1.16.1 → 1.16.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "IFC-Lite Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings for IFC-Lite",
8
- "version": "1.16.1",
8
+ "version": "1.16.3",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
package/pkg/ifc-lite.d.ts CHANGED
@@ -412,6 +412,11 @@ export class IfcAPI {
412
412
  * Returns a collection of instanced geometries with pointer access.
413
413
  */
414
414
  parseToGpuInstancedGeometry(content: string): GpuInstancedGeometryCollection;
415
+ /**
416
+ * Process instanced geometry for a subset of pre-scanned entities.
417
+ * Takes raw bytes and pre-pass data from buildPrePassOnce.
418
+ */
419
+ processInstancedGeometryBatch(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, style_ids: Uint32Array, style_colors: Uint8Array): InstancedMeshCollection;
415
420
  /**
416
421
  * Parse IFC file with zero-copy mesh data
417
422
  * Maximum performance - returns mesh with direct memory access
@@ -538,6 +543,11 @@ export class IfcAPI {
538
543
  * Much faster than scanning all entities (3x speedup for large files)
539
544
  */
540
545
  scanGeometryEntitiesFast(content: string): any;
546
+ /**
547
+ * Fast scan that only returns metadata-relevant entity refs.
548
+ * This drastically reduces transfer size for huge-file metadata hydration.
549
+ */
550
+ scanRelevantEntitiesFastBytes(data: Uint8Array): any;
541
551
  /**
542
552
  * Parse IFC file (traditional - waits for completion)
543
553
  *
@@ -1068,9 +1078,11 @@ export interface InitOutput {
1068
1078
  readonly ifcapi_parseToGpuInstancedGeometry: (a: number, b: number, c: number) => number;
1069
1079
  readonly ifcapi_parseZeroCopy: (a: number, b: number, c: number) => number;
1070
1080
  readonly ifcapi_processGeometryBatch: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number) => number;
1081
+ readonly ifcapi_processInstancedGeometryBatch: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => number;
1071
1082
  readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
1072
1083
  readonly ifcapi_scanEntitiesFastBytes: (a: number, b: number, c: number) => number;
1073
1084
  readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
1085
+ readonly ifcapi_scanRelevantEntitiesFastBytes: (a: number, b: number, c: number) => number;
1074
1086
  readonly ifcapi_version: (a: number, b: number) => void;
1075
1087
  readonly instancedata_color: (a: number, b: number) => void;
1076
1088
  readonly instancedata_expressId: (a: number) => number;
@@ -1177,8 +1189,8 @@ export interface InitOutput {
1177
1189
  readonly profileentryjs_expressId: (a: number) => number;
1178
1190
  readonly symboliccircle_expressId: (a: number) => number;
1179
1191
  readonly __wbg_gpuinstancedgeometryref_free: (a: number, b: number) => void;
1180
- readonly __wasm_bindgen_func_elem_1131: (a: number, b: number, c: number) => void;
1181
- readonly __wasm_bindgen_func_elem_1130: (a: number, b: number) => void;
1192
+ readonly __wasm_bindgen_func_elem_1134: (a: number, b: number, c: number) => void;
1193
+ readonly __wasm_bindgen_func_elem_1133: (a: number, b: number) => void;
1182
1194
  readonly __wasm_bindgen_func_elem_1173: (a: number, b: number, c: number, d: number) => void;
1183
1195
  readonly __wbindgen_export: (a: number) => void;
1184
1196
  readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
package/pkg/ifc-lite.js CHANGED
@@ -212,8 +212,8 @@ if (!('encodeInto' in cachedTextEncoder)) {
212
212
 
213
213
  let WASM_VECTOR_LEN = 0;
214
214
 
215
- function __wasm_bindgen_func_elem_1131(arg0, arg1, arg2) {
216
- wasm.__wasm_bindgen_func_elem_1131(arg0, arg1, addHeapObject(arg2));
215
+ function __wasm_bindgen_func_elem_1134(arg0, arg1, arg2) {
216
+ wasm.__wasm_bindgen_func_elem_1134(arg0, arg1, addHeapObject(arg2));
217
217
  }
218
218
 
219
219
  function __wasm_bindgen_func_elem_1173(arg0, arg1, arg2, arg3) {
@@ -1407,6 +1407,32 @@ export class IfcAPI {
1407
1407
  const ret = wasm.ifcapi_parseToGpuInstancedGeometry(this.__wbg_ptr, ptr0, len0);
1408
1408
  return GpuInstancedGeometryCollection.__wrap(ret);
1409
1409
  }
1410
+ /**
1411
+ * Process instanced geometry for a subset of pre-scanned entities.
1412
+ * Takes raw bytes and pre-pass data from buildPrePassOnce.
1413
+ * @param {Uint8Array} data
1414
+ * @param {Uint32Array} jobs_flat
1415
+ * @param {number} unit_scale
1416
+ * @param {number} rtc_x
1417
+ * @param {number} rtc_y
1418
+ * @param {number} rtc_z
1419
+ * @param {boolean} needs_shift
1420
+ * @param {Uint32Array} style_ids
1421
+ * @param {Uint8Array} style_colors
1422
+ * @returns {InstancedMeshCollection}
1423
+ */
1424
+ processInstancedGeometryBatch(data, jobs_flat, unit_scale, rtc_x, rtc_y, rtc_z, needs_shift, style_ids, style_colors) {
1425
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export3);
1426
+ const len0 = WASM_VECTOR_LEN;
1427
+ const ptr1 = passArray32ToWasm0(jobs_flat, wasm.__wbindgen_export3);
1428
+ const len1 = WASM_VECTOR_LEN;
1429
+ const ptr2 = passArray32ToWasm0(style_ids, wasm.__wbindgen_export3);
1430
+ const len2 = WASM_VECTOR_LEN;
1431
+ const ptr3 = passArray8ToWasm0(style_colors, wasm.__wbindgen_export3);
1432
+ const len3 = WASM_VECTOR_LEN;
1433
+ const ret = wasm.ifcapi_processInstancedGeometryBatch(this.__wbg_ptr, ptr0, len0, ptr1, len1, unit_scale, rtc_x, rtc_y, rtc_z, needs_shift, ptr2, len2, ptr3, len3);
1434
+ return InstancedMeshCollection.__wrap(ret);
1435
+ }
1410
1436
  /**
1411
1437
  * Parse IFC file with zero-copy mesh data
1412
1438
  * Maximum performance - returns mesh with direct memory access
@@ -1666,6 +1692,18 @@ export class IfcAPI {
1666
1692
  const ret = wasm.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, ptr0, len0);
1667
1693
  return takeObject(ret);
1668
1694
  }
1695
+ /**
1696
+ * Fast scan that only returns metadata-relevant entity refs.
1697
+ * This drastically reduces transfer size for huge-file metadata hydration.
1698
+ * @param {Uint8Array} data
1699
+ * @returns {any}
1700
+ */
1701
+ scanRelevantEntitiesFastBytes(data) {
1702
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export3);
1703
+ const len0 = WASM_VECTOR_LEN;
1704
+ const ret = wasm.ifcapi_scanRelevantEntitiesFastBytes(this.__wbg_ptr, ptr0, len0);
1705
+ return takeObject(ret);
1706
+ }
1669
1707
  /**
1670
1708
  * Parse IFC file (traditional - waits for completion)
1671
1709
  *
@@ -3161,9 +3199,9 @@ function __wbg_get_imports() {
3161
3199
  const ret = BigInt.asUintN(64, arg0);
3162
3200
  return addHeapObject(ret);
3163
3201
  };
3164
- imports.wbg.__wbindgen_cast_8410bcb836a2825d = function(arg0, arg1) {
3165
- // Cast intrinsic for `Closure(Closure { dtor_idx: 145, function: Function { arguments: [Externref], shim_idx: 146, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3166
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1130, __wasm_bindgen_func_elem_1131);
3202
+ imports.wbg.__wbindgen_cast_c42a1cfd85e9d91e = function(arg0, arg1) {
3203
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 148, function: Function { arguments: [Externref], shim_idx: 149, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3204
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1133, __wasm_bindgen_func_elem_1134);
3167
3205
  return addHeapObject(ret);
3168
3206
  };
3169
3207
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
Binary file