@ifc-lite/wasm 3.0.8 → 3.0.9

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": "3.0.8",
8
+ "version": "3.0.9",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
package/pkg/ifc-lite.d.ts CHANGED
@@ -421,6 +421,22 @@ export class IfcAPI {
421
421
  * (native path, non-streaming callers), the lazy build path is unchanged.
422
422
  */
423
423
  setReferencedRepmaps(ids: Uint32Array): void;
424
+ /**
425
+ * Install the pre-computed #1623 Phase 3 don't-bake plan: the flat list of
426
+ * `IfcRepresentationMap` ids that an `IfcMappedItem` instantiates >= 2 times.
427
+ * The streaming pre-pass tallies it in the SAME scan that builds the referenced-
428
+ * repmap set (`styling::build_mapped_instance_plan_from_spans`) and ships the id
429
+ * list here. The batch path arms its router with it (batch-local template mode),
430
+ * so a repeated single-solid mapped source materializes ONCE per batch and the
431
+ * rest ride as instances in the IFNS shard.
432
+ *
433
+ * Same injection contract as [`Self::set_referenced_repmaps`]: installed after
434
+ * `setEntityIndex` (which clears it on content swap), and a no-op absence leaves
435
+ * the batch path materializing every occurrence (byte-identical). Each id is
436
+ * stored as `(2, id)` — the batch-local router only needs the eligibility set
437
+ * (count >= 2); the min-id template slot is unused in batch-local mode.
438
+ */
439
+ setMappedInstancePlan(source_ids: Uint32Array): void;
424
440
  /**
425
441
  * Install the pre-computed [`ifc_lite_geometry::MaterialLayerIndex`] (#563)
426
442
  * from its flat SoA encoding, so the worker's first batch skips the
@@ -1231,6 +1247,7 @@ export interface InitOutput {
1231
1247
  readonly ifcapi_setComputeGeometryHashes: (a: number, b: number, c: number) => void;
1232
1248
  readonly ifcapi_setEntityIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1233
1249
  readonly ifcapi_setInstantiatedTypeIds: (a: number, b: number, c: number) => void;
1250
+ readonly ifcapi_setMappedInstancePlan: (a: number, b: number, c: number) => void;
1234
1251
  readonly ifcapi_setMaterialLayerIndex: (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) => void;
1235
1252
  readonly ifcapi_setMergeLayers: (a: number, b: number) => void;
1236
1253
  readonly ifcapi_setRectParamFastPath: (a: number, b: number) => void;
package/pkg/ifc-lite.js CHANGED
@@ -1537,6 +1537,27 @@ export class IfcAPI {
1537
1537
  const len0 = WASM_VECTOR_LEN;
1538
1538
  wasm.ifcapi_setReferencedRepmaps(this.__wbg_ptr, ptr0, len0);
1539
1539
  }
1540
+ /**
1541
+ * Install the pre-computed #1623 Phase 3 don't-bake plan: the flat list of
1542
+ * `IfcRepresentationMap` ids that an `IfcMappedItem` instantiates >= 2 times.
1543
+ * The streaming pre-pass tallies it in the SAME scan that builds the referenced-
1544
+ * repmap set (`styling::build_mapped_instance_plan_from_spans`) and ships the id
1545
+ * list here. The batch path arms its router with it (batch-local template mode),
1546
+ * so a repeated single-solid mapped source materializes ONCE per batch and the
1547
+ * rest ride as instances in the IFNS shard.
1548
+ *
1549
+ * Same injection contract as [`Self::set_referenced_repmaps`]: installed after
1550
+ * `setEntityIndex` (which clears it on content swap), and a no-op absence leaves
1551
+ * the batch path materializing every occurrence (byte-identical). Each id is
1552
+ * stored as `(2, id)` — the batch-local router only needs the eligibility set
1553
+ * (count >= 2); the min-id template slot is unused in batch-local mode.
1554
+ * @param {Uint32Array} source_ids
1555
+ */
1556
+ setMappedInstancePlan(source_ids) {
1557
+ const ptr0 = passArray32ToWasm0(source_ids, wasm.__wbindgen_export);
1558
+ const len0 = WASM_VECTOR_LEN;
1559
+ wasm.ifcapi_setMappedInstancePlan(this.__wbg_ptr, ptr0, len0);
1560
+ }
1540
1561
  /**
1541
1562
  * Install the pre-computed [`ifc_lite_geometry::MaterialLayerIndex`] (#563)
1542
1563
  * from its flat SoA encoding, so the worker's first batch skips the
Binary file