@ifc-lite/wasm 1.16.10 → 1.18.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/README.md +2 -2
- package/package.json +5 -3
- package/pkg/ifc-lite.d.ts +11 -4
- package/pkg/ifc-lite.js +31 -9
- package/pkg/ifc-lite_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -131,11 +131,11 @@ All classes implement `free()` and `[Symbol.dispose]()` — call `free()` (or us
|
|
|
131
131
|
|
|
132
132
|
## Rust source
|
|
133
133
|
|
|
134
|
-
This package ships the bindings only. The Rust source lives in [`rust/wasm-bindings/`](https://github.com/
|
|
134
|
+
This package ships the bindings only. The Rust source lives in [`rust/wasm-bindings/`](https://github.com/LTplus-AG/ifc-lite/tree/main/rust/wasm-bindings) and the core in [`rust/core/`](https://github.com/LTplus-AG/ifc-lite/tree/main/rust/core). Available on crates.io as `ifc-lite-core`.
|
|
135
135
|
|
|
136
136
|
## API
|
|
137
137
|
|
|
138
|
-
See the [WASM API Reference](https://
|
|
138
|
+
See the [WASM API Reference](https://ltplus-ag.github.io/ifc-lite/api/wasm/).
|
|
139
139
|
|
|
140
140
|
## License
|
|
141
141
|
|
package/package.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"IFC-Lite Contributors"
|
|
6
6
|
],
|
|
7
7
|
"description": "WebAssembly bindings for IFC-Lite",
|
|
8
|
-
"version": "1.
|
|
8
|
+
"version": "1.18.0",
|
|
9
9
|
"license": "MPL-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/LTplus-AG/ifc-lite"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"pkg/ifc-lite_bg.wasm",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
".": {
|
|
24
24
|
"import": "./pkg/ifc-lite.js",
|
|
25
25
|
"types": "./pkg/ifc-lite.d.ts"
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
"./ifc-lite_bg.wasm": "./pkg/ifc-lite_bg.wasm"
|
|
27
28
|
},
|
|
28
29
|
"sideEffects": false,
|
|
29
30
|
"keywords": [
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
"aec"
|
|
35
36
|
],
|
|
36
37
|
"scripts": {
|
|
38
|
+
"build": "bash ../../scripts/build-wasm.sh",
|
|
37
39
|
"test": "node --test test/*.test.mjs"
|
|
38
40
|
}
|
|
39
41
|
}
|
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -805,6 +805,12 @@ export class MeshDataJs {
|
|
|
805
805
|
* Get vertex count
|
|
806
806
|
*/
|
|
807
807
|
readonly vertexCount: number;
|
|
808
|
+
/**
|
|
809
|
+
* Optional SurfaceColour for the "Shading" GLB-export choice — only
|
|
810
|
+
* present when the file authored a distinct DiffuseColour. JS sees
|
|
811
|
+
* `undefined` when absent (most files).
|
|
812
|
+
*/
|
|
813
|
+
readonly shadingColor: Float32Array | undefined;
|
|
808
814
|
/**
|
|
809
815
|
* Get triangle count
|
|
810
816
|
*/
|
|
@@ -1223,10 +1229,12 @@ export interface InitOutput {
|
|
|
1223
1229
|
readonly meshdatajs_indices: (a: number) => number;
|
|
1224
1230
|
readonly meshdatajs_normals: (a: number) => number;
|
|
1225
1231
|
readonly meshdatajs_positions: (a: number) => number;
|
|
1232
|
+
readonly meshdatajs_shadingColor: (a: number, b: number) => void;
|
|
1226
1233
|
readonly meshdatajs_triangleCount: (a: number) => number;
|
|
1227
1234
|
readonly meshdatajs_vertexCount: (a: number) => number;
|
|
1228
1235
|
readonly profilecollection_get: (a: number, b: number) => number;
|
|
1229
1236
|
readonly profilecollection_length: (a: number) => number;
|
|
1237
|
+
readonly profileentryjs_expressId: (a: number) => number;
|
|
1230
1238
|
readonly profileentryjs_extrusionDepth: (a: number) => number;
|
|
1231
1239
|
readonly profileentryjs_extrusionDir: (a: number) => number;
|
|
1232
1240
|
readonly profileentryjs_holeCounts: (a: number) => number;
|
|
@@ -1297,12 +1305,11 @@ export interface InitOutput {
|
|
|
1297
1305
|
readonly gpuinstancedgeometryref_geometryId: (a: number) => bigint;
|
|
1298
1306
|
readonly instancedgeometry_geometryId: (a: number) => bigint;
|
|
1299
1307
|
readonly meshcollection_rtcOffsetX: (a: number) => number;
|
|
1300
|
-
readonly profileentryjs_expressId: (a: number) => number;
|
|
1301
1308
|
readonly symboliccircle_expressId: (a: number) => number;
|
|
1302
1309
|
readonly __wbg_gpuinstancedgeometryref_free: (a: number, b: number) => void;
|
|
1303
|
-
readonly
|
|
1304
|
-
readonly
|
|
1305
|
-
readonly
|
|
1310
|
+
readonly __wasm_bindgen_func_elem_1484: (a: number, b: number, c: number) => void;
|
|
1311
|
+
readonly __wasm_bindgen_func_elem_1483: (a: number, b: number) => void;
|
|
1312
|
+
readonly __wasm_bindgen_func_elem_1524: (a: number, b: number, c: number, d: number) => void;
|
|
1306
1313
|
readonly __wbindgen_export: (a: number) => void;
|
|
1307
1314
|
readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
|
|
1308
1315
|
readonly __wbindgen_export3: (a: number, b: number) => number;
|
package/pkg/ifc-lite.js
CHANGED
|
@@ -220,12 +220,12 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
220
220
|
|
|
221
221
|
let WASM_VECTOR_LEN = 0;
|
|
222
222
|
|
|
223
|
-
function
|
|
224
|
-
wasm.
|
|
223
|
+
function __wasm_bindgen_func_elem_1484(arg0, arg1, arg2) {
|
|
224
|
+
wasm.__wasm_bindgen_func_elem_1484(arg0, arg1, addHeapObject(arg2));
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
function
|
|
228
|
-
wasm.
|
|
227
|
+
function __wasm_bindgen_func_elem_1524(arg0, arg1, arg2, arg3) {
|
|
228
|
+
wasm.__wasm_bindgen_func_elem_1524(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
const GeoReferenceJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -2316,6 +2316,28 @@ export class MeshDataJs {
|
|
|
2316
2316
|
const ret = wasm.meshdatajs_vertexCount(this.__wbg_ptr);
|
|
2317
2317
|
return ret >>> 0;
|
|
2318
2318
|
}
|
|
2319
|
+
/**
|
|
2320
|
+
* Optional SurfaceColour for the "Shading" GLB-export choice — only
|
|
2321
|
+
* present when the file authored a distinct DiffuseColour. JS sees
|
|
2322
|
+
* `undefined` when absent (most files).
|
|
2323
|
+
* @returns {Float32Array | undefined}
|
|
2324
|
+
*/
|
|
2325
|
+
get shadingColor() {
|
|
2326
|
+
try {
|
|
2327
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2328
|
+
wasm.meshdatajs_shadingColor(retptr, this.__wbg_ptr);
|
|
2329
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2330
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2331
|
+
let v1;
|
|
2332
|
+
if (r0 !== 0) {
|
|
2333
|
+
v1 = getArrayF32FromWasm0(r0, r1).slice();
|
|
2334
|
+
wasm.__wbindgen_export2(r0, r1 * 4, 4);
|
|
2335
|
+
}
|
|
2336
|
+
return v1;
|
|
2337
|
+
} finally {
|
|
2338
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2319
2341
|
/**
|
|
2320
2342
|
* Get triangle count
|
|
2321
2343
|
* @returns {number}
|
|
@@ -2458,7 +2480,7 @@ export class ProfileEntryJs {
|
|
|
2458
2480
|
* @returns {number}
|
|
2459
2481
|
*/
|
|
2460
2482
|
get expressId() {
|
|
2461
|
-
const ret = wasm.
|
|
2483
|
+
const ret = wasm.profileentryjs_expressId(this.__wbg_ptr);
|
|
2462
2484
|
return ret >>> 0;
|
|
2463
2485
|
}
|
|
2464
2486
|
/**
|
|
@@ -3263,7 +3285,7 @@ function __wbg_get_imports() {
|
|
|
3263
3285
|
const a = state0.a;
|
|
3264
3286
|
state0.a = 0;
|
|
3265
3287
|
try {
|
|
3266
|
-
return
|
|
3288
|
+
return __wasm_bindgen_func_elem_1524(a, state0.b, arg0, arg1);
|
|
3267
3289
|
} finally {
|
|
3268
3290
|
state0.a = a;
|
|
3269
3291
|
}
|
|
@@ -3375,9 +3397,9 @@ function __wbg_get_imports() {
|
|
|
3375
3397
|
const ret = BigInt.asUintN(64, arg0);
|
|
3376
3398
|
return addHeapObject(ret);
|
|
3377
3399
|
};
|
|
3378
|
-
imports.wbg.
|
|
3379
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3380
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3400
|
+
imports.wbg.__wbindgen_cast_73cbb7b49382c492 = function(arg0, arg1) {
|
|
3401
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 179, function: Function { arguments: [Externref], shim_idx: 180, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3402
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1483, __wasm_bindgen_func_elem_1484);
|
|
3381
3403
|
return addHeapObject(ret);
|
|
3382
3404
|
};
|
|
3383
3405
|
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
package/pkg/ifc-lite_bg.wasm
CHANGED
|
Binary file
|