@ifc-lite/wasm 9.3.0 → 10.0.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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "IFC-Lite Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings for IFC-Lite",
8
- "version": "9.3.0",
8
+ "version": "10.0.0",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
package/pkg/ifc-lite.d.ts CHANGED
@@ -245,11 +245,15 @@ export class ClashSession {
245
245
  ingest(positions: Float32Array, pos_ranges: Uint32Array, indices: Uint32Array, idx_ranges: Uint32Array, aabbs: Float32Array): void;
246
246
  constructor();
247
247
  /**
248
- * Run one rule. `group_a`/`group_b` are GLOBAL element indices; an empty
249
- * `group_b` means a self-clash within `group_a`. `mode`: 0 = hard,
250
- * 1 = clearance. Records carry GLOBAL element indices.
251
- */
252
- runRule(group_a: Uint32Array, group_b: Uint32Array, mode: number, tolerance: number, clearance: number, report_touch: boolean): ClashRunResult;
248
+ * Run one rule. `group_a`/`group_b` are GLOBAL element indices.
249
+ * OMIT `group_b` (pass `undefined`/`null`) for a self-clash within
250
+ * `group_a`; pass an array -- INCLUDING an empty one -- for a two-sided
251
+ * rule. An empty array is a B side that matched nothing and yields no
252
+ * clashes, which is why this is nullable rather than "empty means
253
+ * self" (#5354). `mode`: 0 = hard, 1 = clearance. Records carry GLOBAL
254
+ * element indices.
255
+ */
256
+ runRule(group_a: Uint32Array, group_b: Uint32Array | null | undefined, mode: number, tolerance: number, clearance: number, report_touch: boolean): ClashRunResult;
253
257
  }
254
258
 
255
259
  /**
package/pkg/ifc-lite.js CHANGED
@@ -338,11 +338,15 @@ export class ClashSession {
338
338
  return this;
339
339
  }
340
340
  /**
341
- * Run one rule. `group_a`/`group_b` are GLOBAL element indices; an empty
342
- * `group_b` means a self-clash within `group_a`. `mode`: 0 = hard,
343
- * 1 = clearance. Records carry GLOBAL element indices.
341
+ * Run one rule. `group_a`/`group_b` are GLOBAL element indices.
342
+ * OMIT `group_b` (pass `undefined`/`null`) for a self-clash within
343
+ * `group_a`; pass an array -- INCLUDING an empty one -- for a two-sided
344
+ * rule. An empty array is a B side that matched nothing and yields no
345
+ * clashes, which is why this is nullable rather than "empty means
346
+ * self" (#5354). `mode`: 0 = hard, 1 = clearance. Records carry GLOBAL
347
+ * element indices.
344
348
  * @param {Uint32Array} group_a
345
- * @param {Uint32Array} group_b
349
+ * @param {Uint32Array | null | undefined} group_b
346
350
  * @param {number} mode
347
351
  * @param {number} tolerance
348
352
  * @param {number} clearance
@@ -352,8 +356,8 @@ export class ClashSession {
352
356
  runRule(group_a, group_b, mode, tolerance, clearance, report_touch) {
353
357
  const ptr0 = passArray32ToWasm0(group_a, wasm.__wbindgen_export);
354
358
  const len0 = WASM_VECTOR_LEN;
355
- const ptr1 = passArray32ToWasm0(group_b, wasm.__wbindgen_export);
356
- const len1 = WASM_VECTOR_LEN;
359
+ var ptr1 = isLikeNone(group_b) ? 0 : passArray32ToWasm0(group_b, wasm.__wbindgen_export);
360
+ var len1 = WASM_VECTOR_LEN;
357
361
  const ret = wasm.clashsession_runRule(this.__wbg_ptr, ptr0, len0, ptr1, len1, mode, tolerance, clearance, report_touch);
358
362
  return ClashRunResult.__wrap(ret);
359
363
  }
Binary file