@ifc-lite/wasm 6.5.0 → 7.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 +1 -1
- package/pkg/ifc-lite.d.ts +23 -7
- package/pkg/ifc-lite.js +27 -11
- package/pkg/ifc-lite_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -365,8 +365,17 @@ export class IfcAPI {
|
|
|
365
365
|
*
|
|
366
366
|
* `hidden` / `isolated` are express-id visibility filters; `hidden_types_csv` is a
|
|
367
367
|
* comma-separated list of IFC type names whose class toggle is off (e.g.
|
|
368
|
-
* `"IfcOpeningElement,IfcSpace"`). `
|
|
369
|
-
*
|
|
368
|
+
* `"IfcOpeningElement,IfcSpace"`). `isolated` carries the isolation allowlist's
|
|
369
|
+
* null-vs-empty distinction across the wasm boundary: omit it (`undefined`) for
|
|
370
|
+
* "no isolation filter" (every mesh is a candidate); pass an empty `Uint32Array`
|
|
371
|
+
* for "isolation is ACTIVE and currently matches nothing" (every mesh is
|
|
372
|
+
* excluded). Collapsing the two — as a bare `Uint32Array` parameter would force a
|
|
373
|
+
* caller to do — silently exports the whole model when a filter matches nothing
|
|
374
|
+
* (#4328 follow-up: reachable by filtering the Class tab to a type present only
|
|
375
|
+
* in a federated model's secondary member, then exporting "Visible Only"). A
|
|
376
|
+
* non-empty `Uint32Array` is the ordinary allowlist. `include_metadata` attaches
|
|
377
|
+
* counts + per-node `expressId`. Per-mesh RTC origin rides the node translation
|
|
378
|
+
* (precision-safe).
|
|
370
379
|
* `lit` emits standard PBR materials that shade from normals; omitted or
|
|
371
380
|
* `true` ⇒ lit (the default), `false` ⇒ flat `KHR_materials_unlit` (the
|
|
372
381
|
* historical look — #1321). Optional at the boundary so older 5-arg callers
|
|
@@ -381,7 +390,7 @@ export class IfcAPI {
|
|
|
381
390
|
* CLI/MCP wrappers; making the boundary itself refuse means SDK/viewer/
|
|
382
391
|
* direct callers inherit it too (the TS guards stay as defense-in-depth).
|
|
383
392
|
*/
|
|
384
|
-
exportGlb(content: Uint8Array, include_metadata: boolean, hidden: Uint32Array, isolated: Uint32Array, hidden_types_csv: string, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
|
|
393
|
+
exportGlb(content: Uint8Array, include_metadata: boolean, hidden: Uint32Array, isolated: Uint32Array | null | undefined, hidden_types_csv: string, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
|
|
385
394
|
/**
|
|
386
395
|
* Assemble a **GLB** from already-produced meshes (the viewer's `MeshData`, flattened)
|
|
387
396
|
* — no re-meshing. Per mesh `i`: `vertex_counts[i]` verts + `index_counts[i]` indices
|
|
@@ -489,14 +498,21 @@ export class IfcAPI {
|
|
|
489
498
|
* V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
|
|
490
499
|
* is genuinely needed.
|
|
491
500
|
*
|
|
492
|
-
* `hidden`
|
|
493
|
-
*
|
|
501
|
+
* `hidden` is an express-id filter mirroring the viewer's visibility state.
|
|
502
|
+
* `isolated` carries the isolation allowlist's null-vs-empty distinction across
|
|
503
|
+
* the wasm boundary: omit it (`undefined`) for "no isolation filter" (every mesh
|
|
504
|
+
* is a candidate); pass an empty `Uint32Array` for "isolation is ACTIVE and
|
|
505
|
+
* currently matches nothing" (every mesh is excluded). Collapsing the two — as a
|
|
506
|
+
* bare `Uint32Array` parameter would force a caller to do — silently exports the
|
|
507
|
+
* whole model when a filter matches nothing (the OBJ twin of #4328/#4364, fixed
|
|
508
|
+
* for GLB in `export_glb`). A non-empty `Uint32Array` is the ordinary allowlist.
|
|
509
|
+
* Instanced type-library shapes are skipped regardless of the filter.
|
|
494
510
|
*
|
|
495
511
|
* ```javascript
|
|
496
|
-
* const obj = api.exportObj(ifcContent, true, new Uint32Array(),
|
|
512
|
+
* const obj = api.exportObj(ifcContent, true, new Uint32Array(), undefined);
|
|
497
513
|
* ```
|
|
498
514
|
*/
|
|
499
|
-
exportObj(content: Uint8Array, include_normals: boolean, hidden: Uint32Array, isolated
|
|
515
|
+
exportObj(content: Uint8Array, include_normals: boolean, hidden: Uint32Array, isolated?: Uint32Array | null): Uint8Array;
|
|
500
516
|
/**
|
|
501
517
|
* Re-serialize the model in `content` to STEP/IFC UTF-8 bytes.
|
|
502
518
|
*
|
package/pkg/ifc-lite.js
CHANGED
|
@@ -991,8 +991,17 @@ export class IfcAPI {
|
|
|
991
991
|
*
|
|
992
992
|
* `hidden` / `isolated` are express-id visibility filters; `hidden_types_csv` is a
|
|
993
993
|
* comma-separated list of IFC type names whose class toggle is off (e.g.
|
|
994
|
-
* `"IfcOpeningElement,IfcSpace"`). `
|
|
995
|
-
*
|
|
994
|
+
* `"IfcOpeningElement,IfcSpace"`). `isolated` carries the isolation allowlist's
|
|
995
|
+
* null-vs-empty distinction across the wasm boundary: omit it (`undefined`) for
|
|
996
|
+
* "no isolation filter" (every mesh is a candidate); pass an empty `Uint32Array`
|
|
997
|
+
* for "isolation is ACTIVE and currently matches nothing" (every mesh is
|
|
998
|
+
* excluded). Collapsing the two — as a bare `Uint32Array` parameter would force a
|
|
999
|
+
* caller to do — silently exports the whole model when a filter matches nothing
|
|
1000
|
+
* (#4328 follow-up: reachable by filtering the Class tab to a type present only
|
|
1001
|
+
* in a federated model's secondary member, then exporting "Visible Only"). A
|
|
1002
|
+
* non-empty `Uint32Array` is the ordinary allowlist. `include_metadata` attaches
|
|
1003
|
+
* counts + per-node `expressId`. Per-mesh RTC origin rides the node translation
|
|
1004
|
+
* (precision-safe).
|
|
996
1005
|
* `lit` emits standard PBR materials that shade from normals; omitted or
|
|
997
1006
|
* `true` ⇒ lit (the default), `false` ⇒ flat `KHR_materials_unlit` (the
|
|
998
1007
|
* historical look — #1321). Optional at the boundary so older 5-arg callers
|
|
@@ -1009,7 +1018,7 @@ export class IfcAPI {
|
|
|
1009
1018
|
* @param {Uint8Array} content
|
|
1010
1019
|
* @param {boolean} include_metadata
|
|
1011
1020
|
* @param {Uint32Array} hidden
|
|
1012
|
-
* @param {Uint32Array} isolated
|
|
1021
|
+
* @param {Uint32Array | null | undefined} isolated
|
|
1013
1022
|
* @param {string} hidden_types_csv
|
|
1014
1023
|
* @param {boolean | null} [lit]
|
|
1015
1024
|
* @param {boolean | null} [emissive]
|
|
@@ -1022,8 +1031,8 @@ export class IfcAPI {
|
|
|
1022
1031
|
const len0 = WASM_VECTOR_LEN;
|
|
1023
1032
|
const ptr1 = passArray32ToWasm0(hidden, wasm.__wbindgen_export);
|
|
1024
1033
|
const len1 = WASM_VECTOR_LEN;
|
|
1025
|
-
|
|
1026
|
-
|
|
1034
|
+
var ptr2 = isLikeNone(isolated) ? 0 : passArray32ToWasm0(isolated, wasm.__wbindgen_export);
|
|
1035
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1027
1036
|
const ptr3 = passStringToWasm0(hidden_types_csv, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1028
1037
|
const len3 = WASM_VECTOR_LEN;
|
|
1029
1038
|
wasm.ifcapi_exportGlb(retptr, this.__wbg_ptr, ptr0, len0, include_metadata, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(lit) ? 0xFFFFFF : lit ? 1 : 0, isLikeNone(emissive) ? 0xFFFFFF : emissive ? 1 : 0);
|
|
@@ -1378,16 +1387,23 @@ export class IfcAPI {
|
|
|
1378
1387
|
* V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
|
|
1379
1388
|
* is genuinely needed.
|
|
1380
1389
|
*
|
|
1381
|
-
* `hidden`
|
|
1382
|
-
*
|
|
1390
|
+
* `hidden` is an express-id filter mirroring the viewer's visibility state.
|
|
1391
|
+
* `isolated` carries the isolation allowlist's null-vs-empty distinction across
|
|
1392
|
+
* the wasm boundary: omit it (`undefined`) for "no isolation filter" (every mesh
|
|
1393
|
+
* is a candidate); pass an empty `Uint32Array` for "isolation is ACTIVE and
|
|
1394
|
+
* currently matches nothing" (every mesh is excluded). Collapsing the two — as a
|
|
1395
|
+
* bare `Uint32Array` parameter would force a caller to do — silently exports the
|
|
1396
|
+
* whole model when a filter matches nothing (the OBJ twin of #4328/#4364, fixed
|
|
1397
|
+
* for GLB in `export_glb`). A non-empty `Uint32Array` is the ordinary allowlist.
|
|
1398
|
+
* Instanced type-library shapes are skipped regardless of the filter.
|
|
1383
1399
|
*
|
|
1384
1400
|
* ```javascript
|
|
1385
|
-
* const obj = api.exportObj(ifcContent, true, new Uint32Array(),
|
|
1401
|
+
* const obj = api.exportObj(ifcContent, true, new Uint32Array(), undefined);
|
|
1386
1402
|
* ```
|
|
1387
1403
|
* @param {Uint8Array} content
|
|
1388
1404
|
* @param {boolean} include_normals
|
|
1389
1405
|
* @param {Uint32Array} hidden
|
|
1390
|
-
* @param {Uint32Array} isolated
|
|
1406
|
+
* @param {Uint32Array | null} [isolated]
|
|
1391
1407
|
* @returns {Uint8Array}
|
|
1392
1408
|
*/
|
|
1393
1409
|
exportObj(content, include_normals, hidden, isolated) {
|
|
@@ -1397,8 +1413,8 @@ export class IfcAPI {
|
|
|
1397
1413
|
const len0 = WASM_VECTOR_LEN;
|
|
1398
1414
|
const ptr1 = passArray32ToWasm0(hidden, wasm.__wbindgen_export);
|
|
1399
1415
|
const len1 = WASM_VECTOR_LEN;
|
|
1400
|
-
|
|
1401
|
-
|
|
1416
|
+
var ptr2 = isLikeNone(isolated) ? 0 : passArray32ToWasm0(isolated, wasm.__wbindgen_export);
|
|
1417
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1402
1418
|
wasm.ifcapi_exportObj(retptr, this.__wbg_ptr, ptr0, len0, include_normals, ptr1, len1, ptr2, len2);
|
|
1403
1419
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1404
1420
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
package/pkg/ifc-lite_bg.wasm
CHANGED
|
Binary file
|