@ifc-lite/wasm 2.11.1 → 2.13.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 +8 -4
- package/pkg/ifc-lite.js +10 -4
- package/pkg/ifc-lite_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -89,8 +89,12 @@ export class IfcAPI {
|
|
|
89
89
|
* comma-separated list of IFC type names whose class toggle is off (e.g.
|
|
90
90
|
* `"IfcOpeningElement,IfcSpace"`). `include_metadata` attaches counts + per-node
|
|
91
91
|
* `expressId`. Per-mesh RTC origin rides the node translation (precision-safe).
|
|
92
|
+
* `lit` emits standard PBR materials that shade from normals; omitted or
|
|
93
|
+
* `true` ⇒ lit (the default), `false` ⇒ flat `KHR_materials_unlit` (the
|
|
94
|
+
* historical look — #1321). Optional at the boundary so older 5-arg callers
|
|
95
|
+
* keep lit-by-default behaviour.
|
|
92
96
|
*/
|
|
93
|
-
exportGlb(content: string, include_metadata: boolean, hidden: Uint32Array, isolated: Uint32Array, hidden_types_csv: string): Uint8Array;
|
|
97
|
+
exportGlb(content: string, include_metadata: boolean, hidden: Uint32Array, isolated: Uint32Array, hidden_types_csv: string, lit?: boolean | null): Uint8Array;
|
|
94
98
|
/**
|
|
95
99
|
* Package an already-produced **GLB** + georeference into a **KMZ** (`Uint8Array`)
|
|
96
100
|
* for Google Earth: a ZIP of `doc.kml` (a `<Model>` placed at `latitude`/`longitude`/
|
|
@@ -105,7 +109,7 @@ export class IfcAPI {
|
|
|
105
109
|
* RGBA per mesh, `origins` xyz per mesh, `express_ids` labels each mesh (indices are
|
|
106
110
|
* per-mesh local). The caller passes exactly the meshes it wants emitted.
|
|
107
111
|
*/
|
|
108
|
-
exportGlbFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, express_ids: Uint32Array, include_metadata: boolean): Uint8Array;
|
|
112
|
+
exportGlbFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, express_ids: Uint32Array, include_metadata: boolean, lit?: boolean | null): Uint8Array;
|
|
109
113
|
/**
|
|
110
114
|
* Export the render geometry in `content` as a Wavefront **OBJ** string.
|
|
111
115
|
*
|
|
@@ -1067,8 +1071,8 @@ export interface InitOutput {
|
|
|
1067
1071
|
readonly ifcapi_buildPrePassStreaming: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
1068
1072
|
readonly ifcapi_clearPrePassCache: (a: number) => void;
|
|
1069
1073
|
readonly ifcapi_exportCsv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
1070
|
-
readonly ifcapi_exportGlb: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
1071
|
-
readonly ifcapi_exportGlbFromMeshes: (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, p: number, q: number, r: number, s: number) => void;
|
|
1074
|
+
readonly ifcapi_exportGlb: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
1075
|
+
readonly ifcapi_exportGlbFromMeshes: (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, p: number, q: number, r: number, s: number, t: number) => void;
|
|
1072
1076
|
readonly ifcapi_exportHbjson: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
1073
1077
|
readonly ifcapi_exportIfcx: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
1074
1078
|
readonly ifcapi_exportJson: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
package/pkg/ifc-lite.js
CHANGED
|
@@ -635,14 +635,19 @@ export class IfcAPI {
|
|
|
635
635
|
* comma-separated list of IFC type names whose class toggle is off (e.g.
|
|
636
636
|
* `"IfcOpeningElement,IfcSpace"`). `include_metadata` attaches counts + per-node
|
|
637
637
|
* `expressId`. Per-mesh RTC origin rides the node translation (precision-safe).
|
|
638
|
+
* `lit` emits standard PBR materials that shade from normals; omitted or
|
|
639
|
+
* `true` ⇒ lit (the default), `false` ⇒ flat `KHR_materials_unlit` (the
|
|
640
|
+
* historical look — #1321). Optional at the boundary so older 5-arg callers
|
|
641
|
+
* keep lit-by-default behaviour.
|
|
638
642
|
* @param {string} content
|
|
639
643
|
* @param {boolean} include_metadata
|
|
640
644
|
* @param {Uint32Array} hidden
|
|
641
645
|
* @param {Uint32Array} isolated
|
|
642
646
|
* @param {string} hidden_types_csv
|
|
647
|
+
* @param {boolean | null} [lit]
|
|
643
648
|
* @returns {Uint8Array}
|
|
644
649
|
*/
|
|
645
|
-
exportGlb(content, include_metadata, hidden, isolated, hidden_types_csv) {
|
|
650
|
+
exportGlb(content, include_metadata, hidden, isolated, hidden_types_csv, lit) {
|
|
646
651
|
try {
|
|
647
652
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
648
653
|
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -653,7 +658,7 @@ export class IfcAPI {
|
|
|
653
658
|
const len2 = WASM_VECTOR_LEN;
|
|
654
659
|
const ptr3 = passStringToWasm0(hidden_types_csv, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
655
660
|
const len3 = WASM_VECTOR_LEN;
|
|
656
|
-
wasm.ifcapi_exportGlb(retptr, this.__wbg_ptr, ptr0, len0, include_metadata, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
661
|
+
wasm.ifcapi_exportGlb(retptr, this.__wbg_ptr, ptr0, len0, include_metadata, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(lit) ? 0xFFFFFF : lit ? 1 : 0);
|
|
657
662
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
658
663
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
659
664
|
var v5 = getArrayU8FromWasm0(r0, r1).slice();
|
|
@@ -709,9 +714,10 @@ export class IfcAPI {
|
|
|
709
714
|
* @param {Float64Array} origins
|
|
710
715
|
* @param {Uint32Array} express_ids
|
|
711
716
|
* @param {boolean} include_metadata
|
|
717
|
+
* @param {boolean | null} [lit]
|
|
712
718
|
* @returns {Uint8Array}
|
|
713
719
|
*/
|
|
714
|
-
exportGlbFromMeshes(positions, normals, indices, vertex_counts, index_counts, colors, origins, express_ids, include_metadata) {
|
|
720
|
+
exportGlbFromMeshes(positions, normals, indices, vertex_counts, index_counts, colors, origins, express_ids, include_metadata, lit) {
|
|
715
721
|
try {
|
|
716
722
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
717
723
|
const ptr0 = passArrayF32ToWasm0(positions, wasm.__wbindgen_export);
|
|
@@ -730,7 +736,7 @@ export class IfcAPI {
|
|
|
730
736
|
const len6 = WASM_VECTOR_LEN;
|
|
731
737
|
const ptr7 = passArray32ToWasm0(express_ids, wasm.__wbindgen_export);
|
|
732
738
|
const len7 = WASM_VECTOR_LEN;
|
|
733
|
-
wasm.ifcapi_exportGlbFromMeshes(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, include_metadata);
|
|
739
|
+
wasm.ifcapi_exportGlbFromMeshes(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, include_metadata, isLikeNone(lit) ? 0xFFFFFF : lit ? 1 : 0);
|
|
734
740
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
735
741
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
736
742
|
var v9 = getArrayU8FromWasm0(r0, r1).slice();
|
package/pkg/ifc-lite_bg.wasm
CHANGED
|
Binary file
|