@ifc-lite/wasm 2.5.0 → 2.6.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": "2.5.0",
8
+ "version": "2.6.0",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
@@ -21,8 +21,9 @@
21
21
  "types": "./pkg/ifc-lite.d.ts",
22
22
  "exports": {
23
23
  ".": {
24
+ "types": "./pkg/ifc-lite.d.ts",
24
25
  "import": "./pkg/ifc-lite.js",
25
- "types": "./pkg/ifc-lite.d.ts"
26
+ "default": "./pkg/ifc-lite.js"
26
27
  },
27
28
  "./ifc-lite_bg.wasm": "./pkg/ifc-lite_bg.wasm"
28
29
  },
package/pkg/ifc-lite.d.ts CHANGED
@@ -228,6 +228,22 @@ export class IfcAPI {
228
228
  * fail fast.
229
229
  */
230
230
  clearPrePassCache(): void;
231
+ /**
232
+ * Select the tessellation detail level applied by every subsequent
233
+ * `processGeometryBatch` call (issue #976, step 4).
234
+ *
235
+ * `level` is one of `"lowest" | "low" | "medium" | "high" | "highest"`
236
+ * (case-insensitive). `"medium"` is the default and reproduces the
237
+ * engine's historical hardcoded densities byte-for-byte; lower levels
238
+ * trade curved-surface smoothness for throughput, higher levels reduce
239
+ * faceting on pipes / cylinders / NURBS at a triangle-count cost.
240
+ * Pass `null`/`undefined` to reset to the default.
241
+ *
242
+ * Set BEFORE processing — meshes already emitted are not regenerated.
243
+ * Throws on an unrecognized level so typos fail loudly instead of
244
+ * silently rendering at the wrong density.
245
+ */
246
+ setTessellationQuality(level?: string | null): void;
231
247
  /**
232
248
  * Enable or disable per-entity geometry fingerprinting in
233
249
  * `processGeometryBatch`, used by the viewer's revision-diff feature.
@@ -882,6 +898,7 @@ export interface InitOutput {
882
898
  readonly ifcapi_setComputeGeometryHashes: (a: number, b: number, c: number) => void;
883
899
  readonly ifcapi_setEntityIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
884
900
  readonly ifcapi_setMergeLayers: (a: number, b: number) => void;
901
+ readonly ifcapi_setTessellationQuality: (a: number, b: number, c: number, d: number) => void;
885
902
  readonly ifcapi_version: (a: number, b: number) => void;
886
903
  readonly meshOutline2d: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
887
904
  readonly meshcollection_buildingRotation: (a: number, b: number) => void;
package/pkg/ifc-lite.js CHANGED
@@ -252,12 +252,12 @@ if (!('encodeInto' in cachedTextEncoder)) {
252
252
 
253
253
  let WASM_VECTOR_LEN = 0;
254
254
 
255
- function __wasm_bindgen_func_elem_718(arg0, arg1, arg2) {
256
- wasm.__wasm_bindgen_func_elem_718(arg0, arg1, addHeapObject(arg2));
255
+ function __wasm_bindgen_func_elem_721(arg0, arg1, arg2) {
256
+ wasm.__wasm_bindgen_func_elem_721(arg0, arg1, addHeapObject(arg2));
257
257
  }
258
258
 
259
- function __wasm_bindgen_func_elem_752(arg0, arg1, arg2, arg3) {
260
- wasm.__wasm_bindgen_func_elem_752(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
259
+ function __wasm_bindgen_func_elem_755(arg0, arg1, arg2, arg3) {
260
+ wasm.__wasm_bindgen_func_elem_755(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
261
261
  }
262
262
 
263
263
  const ClashRunResultFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -914,6 +914,37 @@ export class IfcAPI {
914
914
  clearPrePassCache() {
915
915
  wasm.ifcapi_clearPrePassCache(this.__wbg_ptr);
916
916
  }
917
+ /**
918
+ * Select the tessellation detail level applied by every subsequent
919
+ * `processGeometryBatch` call (issue #976, step 4).
920
+ *
921
+ * `level` is one of `"lowest" | "low" | "medium" | "high" | "highest"`
922
+ * (case-insensitive). `"medium"` is the default and reproduces the
923
+ * engine's historical hardcoded densities byte-for-byte; lower levels
924
+ * trade curved-surface smoothness for throughput, higher levels reduce
925
+ * faceting on pipes / cylinders / NURBS at a triangle-count cost.
926
+ * Pass `null`/`undefined` to reset to the default.
927
+ *
928
+ * Set BEFORE processing — meshes already emitted are not regenerated.
929
+ * Throws on an unrecognized level so typos fail loudly instead of
930
+ * silently rendering at the wrong density.
931
+ * @param {string | null} [level]
932
+ */
933
+ setTessellationQuality(level) {
934
+ try {
935
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
936
+ var ptr0 = isLikeNone(level) ? 0 : passStringToWasm0(level, wasm.__wbindgen_export, wasm.__wbindgen_export2);
937
+ var len0 = WASM_VECTOR_LEN;
938
+ wasm.ifcapi_setTessellationQuality(retptr, this.__wbg_ptr, ptr0, len0);
939
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
940
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
941
+ if (r1) {
942
+ throw takeObject(r0);
943
+ }
944
+ } finally {
945
+ wasm.__wbindgen_add_to_stack_pointer(16);
946
+ }
947
+ }
917
948
  /**
918
949
  * Enable or disable per-entity geometry fingerprinting in
919
950
  * `processGeometryBatch`, used by the viewer's revision-diff feature.
@@ -2845,7 +2876,7 @@ function __wbg_get_imports() {
2845
2876
  const a = state0.a;
2846
2877
  state0.a = 0;
2847
2878
  try {
2848
- return __wasm_bindgen_func_elem_752(a, state0.b, arg0, arg1);
2879
+ return __wasm_bindgen_func_elem_755(a, state0.b, arg0, arg1);
2849
2880
  } finally {
2850
2881
  state0.a = a;
2851
2882
  }
@@ -2965,7 +2996,7 @@ function __wbg_get_imports() {
2965
2996
  };
2966
2997
  imports.wbg.__wbindgen_cast_efaa74e24e38a7b5 = function(arg0, arg1) {
2967
2998
  // Cast intrinsic for `Closure(Closure { dtor_idx: 65, function: Function { arguments: [Externref], shim_idx: 66, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2968
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_717, __wasm_bindgen_func_elem_718);
2999
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_720, __wasm_bindgen_func_elem_721);
2969
3000
  return addHeapObject(ret);
2970
3001
  };
2971
3002
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
Binary file