@ifc-lite/wasm 1.16.2 → 1.16.4

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.2",
8
+ "version": "1.16.4",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
package/pkg/ifc-lite.d.ts CHANGED
@@ -474,6 +474,10 @@ export class IfcAPI {
474
474
  * Get WASM memory for zero-copy access
475
475
  */
476
476
  getMemory(): any;
477
+ /**
478
+ * Clear the cached entity index (call after streaming is complete)
479
+ */
480
+ clearPrePassCache(): void;
477
481
  /**
478
482
  * Create and initialize the IFC API
479
483
  */
@@ -543,6 +547,11 @@ export class IfcAPI {
543
547
  * Much faster than scanning all entities (3x speedup for large files)
544
548
  */
545
549
  scanGeometryEntitiesFast(content: string): any;
550
+ /**
551
+ * Fast scan that only returns metadata-relevant entity refs.
552
+ * This drastically reduces transfer size for huge-file metadata hydration.
553
+ */
554
+ scanRelevantEntitiesFastBytes(data: Uint8Array): any;
546
555
  /**
547
556
  * Parse IFC file (traditional - waits for completion)
548
557
  *
@@ -1052,6 +1061,7 @@ export interface InitOutput {
1052
1061
  readonly gpumeshmetadata_vertexOffset: (a: number) => number;
1053
1062
  readonly ifcapi_buildPrePassFast: (a: number, b: number, c: number) => number;
1054
1063
  readonly ifcapi_buildPrePassOnce: (a: number, b: number, c: number) => number;
1064
+ readonly ifcapi_clearPrePassCache: (a: number) => void;
1055
1065
  readonly ifcapi_debugProcessEntity953: (a: number, b: number, c: number, d: number) => void;
1056
1066
  readonly ifcapi_debugProcessFirstWall: (a: number, b: number, c: number, d: number) => void;
1057
1067
  readonly ifcapi_extractProfiles: (a: number, b: number, c: number, d: number) => number;
@@ -1077,6 +1087,7 @@ export interface InitOutput {
1077
1087
  readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
1078
1088
  readonly ifcapi_scanEntitiesFastBytes: (a: number, b: number, c: number) => number;
1079
1089
  readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
1090
+ readonly ifcapi_scanRelevantEntitiesFastBytes: (a: number, b: number, c: number) => number;
1080
1091
  readonly ifcapi_version: (a: number, b: number) => void;
1081
1092
  readonly instancedata_color: (a: number, b: number) => void;
1082
1093
  readonly instancedata_expressId: (a: number) => number;
@@ -1183,9 +1194,9 @@ export interface InitOutput {
1183
1194
  readonly profileentryjs_expressId: (a: number) => number;
1184
1195
  readonly symboliccircle_expressId: (a: number) => number;
1185
1196
  readonly __wbg_gpuinstancedgeometryref_free: (a: number, b: number) => void;
1186
- readonly __wasm_bindgen_func_elem_1130: (a: number, b: number, c: number) => void;
1187
- readonly __wasm_bindgen_func_elem_1129: (a: number, b: number) => void;
1188
- readonly __wasm_bindgen_func_elem_1169: (a: number, b: number, c: number, d: number) => void;
1197
+ readonly __wasm_bindgen_func_elem_1136: (a: number, b: number, c: number) => void;
1198
+ readonly __wasm_bindgen_func_elem_1135: (a: number, b: number) => void;
1199
+ readonly __wasm_bindgen_func_elem_1175: (a: number, b: number, c: number, d: number) => void;
1189
1200
  readonly __wbindgen_export: (a: number) => void;
1190
1201
  readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
1191
1202
  readonly __wbindgen_export3: (a: number, b: number) => number;
package/pkg/ifc-lite.js CHANGED
@@ -212,12 +212,12 @@ if (!('encodeInto' in cachedTextEncoder)) {
212
212
 
213
213
  let WASM_VECTOR_LEN = 0;
214
214
 
215
- function __wasm_bindgen_func_elem_1130(arg0, arg1, arg2) {
216
- wasm.__wasm_bindgen_func_elem_1130(arg0, arg1, addHeapObject(arg2));
215
+ function __wasm_bindgen_func_elem_1136(arg0, arg1, arg2) {
216
+ wasm.__wasm_bindgen_func_elem_1136(arg0, arg1, addHeapObject(arg2));
217
217
  }
218
218
 
219
- function __wasm_bindgen_func_elem_1169(arg0, arg1, arg2, arg3) {
220
- wasm.__wasm_bindgen_func_elem_1169(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
219
+ function __wasm_bindgen_func_elem_1175(arg0, arg1, arg2, arg3) {
220
+ wasm.__wasm_bindgen_func_elem_1175(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
221
221
  }
222
222
 
223
223
  const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1547,6 +1547,12 @@ export class IfcAPI {
1547
1547
  const ret = wasm.ifcapi_getMemory(this.__wbg_ptr);
1548
1548
  return takeObject(ret);
1549
1549
  }
1550
+ /**
1551
+ * Clear the cached entity index (call after streaming is complete)
1552
+ */
1553
+ clearPrePassCache() {
1554
+ wasm.ifcapi_clearPrePassCache(this.__wbg_ptr);
1555
+ }
1550
1556
  /**
1551
1557
  * Create and initialize the IFC API
1552
1558
  */
@@ -1692,6 +1698,18 @@ export class IfcAPI {
1692
1698
  const ret = wasm.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, ptr0, len0);
1693
1699
  return takeObject(ret);
1694
1700
  }
1701
+ /**
1702
+ * Fast scan that only returns metadata-relevant entity refs.
1703
+ * This drastically reduces transfer size for huge-file metadata hydration.
1704
+ * @param {Uint8Array} data
1705
+ * @returns {any}
1706
+ */
1707
+ scanRelevantEntitiesFastBytes(data) {
1708
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export3);
1709
+ const len0 = WASM_VECTOR_LEN;
1710
+ const ret = wasm.ifcapi_scanRelevantEntitiesFastBytes(this.__wbg_ptr, ptr0, len0);
1711
+ return takeObject(ret);
1712
+ }
1695
1713
  /**
1696
1714
  * Parse IFC file (traditional - waits for completion)
1697
1715
  *
@@ -3075,7 +3093,7 @@ function __wbg_get_imports() {
3075
3093
  const a = state0.a;
3076
3094
  state0.a = 0;
3077
3095
  try {
3078
- return __wasm_bindgen_func_elem_1169(a, state0.b, arg0, arg1);
3096
+ return __wasm_bindgen_func_elem_1175(a, state0.b, arg0, arg1);
3079
3097
  } finally {
3080
3098
  state0.a = a;
3081
3099
  }
@@ -3187,9 +3205,9 @@ function __wbg_get_imports() {
3187
3205
  const ret = BigInt.asUintN(64, arg0);
3188
3206
  return addHeapObject(ret);
3189
3207
  };
3190
- imports.wbg.__wbindgen_cast_69d24e7bda2eee11 = function(arg0, arg1) {
3191
- // Cast intrinsic for `Closure(Closure { dtor_idx: 147, function: Function { arguments: [Externref], shim_idx: 148, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3192
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1129, __wasm_bindgen_func_elem_1130);
3208
+ imports.wbg.__wbindgen_cast_c42a1cfd85e9d91e = function(arg0, arg1) {
3209
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 148, function: Function { arguments: [Externref], shim_idx: 149, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3210
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1135, __wasm_bindgen_func_elem_1136);
3193
3211
  return addHeapObject(ret);
3194
3212
  };
3195
3213
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
Binary file