@ifc-lite/wasm 2.1.6 → 2.2.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 +105 -3
- package/pkg/ifc-lite.js +228 -6
- package/pkg/ifc-lite_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -35,6 +35,50 @@ export class ClashSession {
|
|
|
35
35
|
runRule(group_a: Uint32Array, group_b: Uint32Array, mode: number, tolerance: number, clearance: number, report_touch: boolean): ClashRunResult;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export class GridAxisCollection {
|
|
39
|
+
private constructor();
|
|
40
|
+
free(): void;
|
|
41
|
+
[Symbol.dispose](): void;
|
|
42
|
+
/**
|
|
43
|
+
* Get the axis at `index`. Returns `undefined` for out-of-bounds index.
|
|
44
|
+
*/
|
|
45
|
+
getAxis(index: number): GridAxisJs | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Number of grid axes.
|
|
48
|
+
*/
|
|
49
|
+
readonly length: number;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the collection is empty.
|
|
52
|
+
*/
|
|
53
|
+
readonly isEmpty: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export class GridAxisJs {
|
|
57
|
+
private constructor();
|
|
58
|
+
free(): void;
|
|
59
|
+
[Symbol.dispose](): void;
|
|
60
|
+
/**
|
|
61
|
+
* End endpoint `[x, y, z]` in renderer Y-up world space (metres).
|
|
62
|
+
*/
|
|
63
|
+
readonly end: Float32Array;
|
|
64
|
+
/**
|
|
65
|
+
* Axis tag (e.g. `"A"`, `"1"`); empty string when unauthored.
|
|
66
|
+
*/
|
|
67
|
+
readonly tag: string;
|
|
68
|
+
/**
|
|
69
|
+
* Start endpoint `[x, y, z]` in renderer Y-up world space (metres).
|
|
70
|
+
*/
|
|
71
|
+
readonly start: Float32Array;
|
|
72
|
+
/**
|
|
73
|
+
* Express ID of the `IfcGridAxis`.
|
|
74
|
+
*/
|
|
75
|
+
readonly axisId: number;
|
|
76
|
+
/**
|
|
77
|
+
* Express ID of the owning `IfcGrid`.
|
|
78
|
+
*/
|
|
79
|
+
readonly gridId: number;
|
|
80
|
+
}
|
|
81
|
+
|
|
38
82
|
export class IfcAPI {
|
|
39
83
|
free(): void;
|
|
40
84
|
[Symbol.dispose](): void;
|
|
@@ -82,6 +126,22 @@ export class IfcAPI {
|
|
|
82
126
|
* `{ type: "complete", totalJobs }`
|
|
83
127
|
*/
|
|
84
128
|
buildPrePassStreaming(data: Uint8Array, on_event: Function, chunk_size: number): any;
|
|
129
|
+
/**
|
|
130
|
+
* Parse the file and return structured per-axis data (tag + endpoints) in
|
|
131
|
+
* the renderer's Y-up world space (RTC-subtracted, metres). Use this when
|
|
132
|
+
* you also need the axis tags (to render grid bubbles / labels).
|
|
133
|
+
*/
|
|
134
|
+
parseGridAxes(content: string): GridAxisCollection;
|
|
135
|
+
/**
|
|
136
|
+
* Parse the file and return every `IfcGridAxis` as a flat `Float32Array`
|
|
137
|
+
* of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` (one segment per
|
|
138
|
+
* axis) in the renderer's Y-up world space (RTC-subtracted, metres). Feed
|
|
139
|
+
* straight to a line pipeline (e.g. `uploadAnnotationLines3D`).
|
|
140
|
+
*
|
|
141
|
+
* Returns an empty array when the file has no grids, so the caller can
|
|
142
|
+
* clear the overlay cheaply.
|
|
143
|
+
*/
|
|
144
|
+
parseGridLines(content: string): Float32Array;
|
|
85
145
|
/**
|
|
86
146
|
* Parse the file and return every `IfcAlignment` directrix as a flat
|
|
87
147
|
* `Float32Array` of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` in
|
|
@@ -304,6 +364,14 @@ export class MeshDataJs {
|
|
|
304
364
|
* Get express ID
|
|
305
365
|
*/
|
|
306
366
|
readonly expressId: number;
|
|
367
|
+
/**
|
|
368
|
+
* True when this mesh carries a surface texture (#961).
|
|
369
|
+
*/
|
|
370
|
+
readonly hasTexture: boolean;
|
|
371
|
+
/**
|
|
372
|
+
* Decoded RGBA8 texture bytes (`width*height*4`). Empty when untextured.
|
|
373
|
+
*/
|
|
374
|
+
readonly textureRgba: Uint8Array;
|
|
307
375
|
/**
|
|
308
376
|
* Get vertex count
|
|
309
377
|
*/
|
|
@@ -314,10 +382,25 @@ export class MeshDataJs {
|
|
|
314
382
|
* `undefined` when absent (most files).
|
|
315
383
|
*/
|
|
316
384
|
readonly shadingColor: Float32Array | undefined;
|
|
385
|
+
readonly textureWidth: number;
|
|
386
|
+
readonly textureHeight: number;
|
|
317
387
|
/**
|
|
318
388
|
* Get triangle count
|
|
319
389
|
*/
|
|
320
390
|
readonly triangleCount: number;
|
|
391
|
+
/**
|
|
392
|
+
* Sampler wrap for the S axis (`IfcSurfaceTexture.RepeatS`): true = repeat.
|
|
393
|
+
*/
|
|
394
|
+
readonly textureRepeatS: boolean;
|
|
395
|
+
/**
|
|
396
|
+
* Sampler wrap for the T axis (`IfcSurfaceTexture.RepeatT`): true = repeat.
|
|
397
|
+
*/
|
|
398
|
+
readonly textureRepeatT: boolean;
|
|
399
|
+
/**
|
|
400
|
+
* Per-vertex texture coordinates as Float32Array (u, v pairs). Empty when
|
|
401
|
+
* the mesh is untextured.
|
|
402
|
+
*/
|
|
403
|
+
readonly uvs: Float32Array;
|
|
321
404
|
/**
|
|
322
405
|
* Get color as [r, g, b, a] array
|
|
323
406
|
*/
|
|
@@ -589,6 +672,8 @@ export interface InitOutput {
|
|
|
589
672
|
readonly memory: WebAssembly.Memory;
|
|
590
673
|
readonly __wbg_clashrunresult_free: (a: number, b: number) => void;
|
|
591
674
|
readonly __wbg_clashsession_free: (a: number, b: number) => void;
|
|
675
|
+
readonly __wbg_gridaxiscollection_free: (a: number, b: number) => void;
|
|
676
|
+
readonly __wbg_gridaxisjs_free: (a: number, b: number) => void;
|
|
592
677
|
readonly __wbg_ifcapi_free: (a: number, b: number) => void;
|
|
593
678
|
readonly __wbg_meshcollection_free: (a: number, b: number) => void;
|
|
594
679
|
readonly __wbg_meshdatajs_free: (a: number, b: number) => void;
|
|
@@ -608,6 +693,14 @@ export interface InitOutput {
|
|
|
608
693
|
readonly clashsession_ingest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
609
694
|
readonly clashsession_new: () => number;
|
|
610
695
|
readonly clashsession_runRule: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
696
|
+
readonly gridaxiscollection_getAxis: (a: number, b: number) => number;
|
|
697
|
+
readonly gridaxiscollection_isEmpty: (a: number) => number;
|
|
698
|
+
readonly gridaxiscollection_length: (a: number) => number;
|
|
699
|
+
readonly gridaxisjs_axisId: (a: number) => number;
|
|
700
|
+
readonly gridaxisjs_end: (a: number) => number;
|
|
701
|
+
readonly gridaxisjs_gridId: (a: number) => number;
|
|
702
|
+
readonly gridaxisjs_start: (a: number) => number;
|
|
703
|
+
readonly gridaxisjs_tag: (a: number, b: number) => void;
|
|
611
704
|
readonly ifcapi_buildPrePassFast: (a: number, b: number, c: number) => number;
|
|
612
705
|
readonly ifcapi_buildPrePassOnce: (a: number, b: number, c: number) => number;
|
|
613
706
|
readonly ifcapi_buildPrePassStreaming: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -618,6 +711,8 @@ export interface InitOutput {
|
|
|
618
711
|
readonly ifcapi_new: () => number;
|
|
619
712
|
readonly ifcapi_parse: (a: number, b: number, c: number) => number;
|
|
620
713
|
readonly ifcapi_parseAlignmentLines: (a: number, b: number, c: number) => number;
|
|
714
|
+
readonly ifcapi_parseGridAxes: (a: number, b: number, c: number) => number;
|
|
715
|
+
readonly ifcapi_parseGridLines: (a: number, b: number, c: number) => number;
|
|
621
716
|
readonly ifcapi_parseStreaming: (a: number, b: number, c: number, d: number) => number;
|
|
622
717
|
readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
|
|
623
718
|
readonly ifcapi_processGeometryBatch: (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) => number;
|
|
@@ -640,12 +735,19 @@ export interface InitOutput {
|
|
|
640
735
|
readonly meshcollection_totalVertices: (a: number) => number;
|
|
641
736
|
readonly meshdatajs_color: (a: number, b: number) => void;
|
|
642
737
|
readonly meshdatajs_expressId: (a: number) => number;
|
|
738
|
+
readonly meshdatajs_hasTexture: (a: number) => number;
|
|
643
739
|
readonly meshdatajs_ifcType: (a: number, b: number) => void;
|
|
644
740
|
readonly meshdatajs_indices: (a: number) => number;
|
|
645
741
|
readonly meshdatajs_normals: (a: number) => number;
|
|
646
742
|
readonly meshdatajs_positions: (a: number) => number;
|
|
647
743
|
readonly meshdatajs_shadingColor: (a: number, b: number) => void;
|
|
744
|
+
readonly meshdatajs_textureHeight: (a: number) => number;
|
|
745
|
+
readonly meshdatajs_textureRepeatS: (a: number) => number;
|
|
746
|
+
readonly meshdatajs_textureRepeatT: (a: number) => number;
|
|
747
|
+
readonly meshdatajs_textureRgba: (a: number) => number;
|
|
748
|
+
readonly meshdatajs_textureWidth: (a: number) => number;
|
|
648
749
|
readonly meshdatajs_triangleCount: (a: number) => number;
|
|
750
|
+
readonly meshdatajs_uvs: (a: number) => number;
|
|
649
751
|
readonly meshdatajs_vertexCount: (a: number) => number;
|
|
650
752
|
readonly profilecollection_get: (a: number, b: number) => number;
|
|
651
753
|
readonly profilecollection_length: (a: number) => number;
|
|
@@ -722,9 +824,9 @@ export interface InitOutput {
|
|
|
722
824
|
readonly symbolictext_worldY: (a: number) => number;
|
|
723
825
|
readonly symbolictext_x: (a: number) => number;
|
|
724
826
|
readonly symbolictext_y: (a: number) => number;
|
|
725
|
-
readonly
|
|
726
|
-
readonly
|
|
727
|
-
readonly
|
|
827
|
+
readonly __wasm_bindgen_func_elem_654: (a: number, b: number, c: number) => void;
|
|
828
|
+
readonly __wasm_bindgen_func_elem_653: (a: number, b: number) => void;
|
|
829
|
+
readonly __wasm_bindgen_func_elem_688: (a: number, b: number, c: number, d: number) => void;
|
|
728
830
|
readonly __wbindgen_export: (a: number) => void;
|
|
729
831
|
readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
|
|
730
832
|
readonly __wbindgen_export3: (a: number, b: number) => number;
|
package/pkg/ifc-lite.js
CHANGED
|
@@ -232,12 +232,12 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
232
232
|
|
|
233
233
|
let WASM_VECTOR_LEN = 0;
|
|
234
234
|
|
|
235
|
-
function
|
|
236
|
-
wasm.
|
|
235
|
+
function __wasm_bindgen_func_elem_654(arg0, arg1, arg2) {
|
|
236
|
+
wasm.__wasm_bindgen_func_elem_654(arg0, arg1, addHeapObject(arg2));
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
function
|
|
240
|
-
wasm.
|
|
239
|
+
function __wasm_bindgen_func_elem_688(arg0, arg1, arg2, arg3) {
|
|
240
|
+
wasm.__wasm_bindgen_func_elem_688(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
const ClashRunResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -248,6 +248,14 @@ const ClashSessionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
248
248
|
? { register: () => {}, unregister: () => {} }
|
|
249
249
|
: new FinalizationRegistry(ptr => wasm.__wbg_clashsession_free(ptr >>> 0, 1));
|
|
250
250
|
|
|
251
|
+
const GridAxisCollectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
252
|
+
? { register: () => {}, unregister: () => {} }
|
|
253
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_gridaxiscollection_free(ptr >>> 0, 1));
|
|
254
|
+
|
|
255
|
+
const GridAxisJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
256
|
+
? { register: () => {}, unregister: () => {} }
|
|
257
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_gridaxisjs_free(ptr >>> 0, 1));
|
|
258
|
+
|
|
251
259
|
const IfcAPIFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
252
260
|
? { register: () => {}, unregister: () => {} }
|
|
253
261
|
: new FinalizationRegistry(ptr => wasm.__wbg_ifcapi_free(ptr >>> 0, 1));
|
|
@@ -479,6 +487,131 @@ export class ClashSession {
|
|
|
479
487
|
}
|
|
480
488
|
if (Symbol.dispose) ClashSession.prototype[Symbol.dispose] = ClashSession.prototype.free;
|
|
481
489
|
|
|
490
|
+
/**
|
|
491
|
+
* A collection of resolved grid axes.
|
|
492
|
+
*/
|
|
493
|
+
export class GridAxisCollection {
|
|
494
|
+
static __wrap(ptr) {
|
|
495
|
+
ptr = ptr >>> 0;
|
|
496
|
+
const obj = Object.create(GridAxisCollection.prototype);
|
|
497
|
+
obj.__wbg_ptr = ptr;
|
|
498
|
+
GridAxisCollectionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
499
|
+
return obj;
|
|
500
|
+
}
|
|
501
|
+
__destroy_into_raw() {
|
|
502
|
+
const ptr = this.__wbg_ptr;
|
|
503
|
+
this.__wbg_ptr = 0;
|
|
504
|
+
GridAxisCollectionFinalization.unregister(this);
|
|
505
|
+
return ptr;
|
|
506
|
+
}
|
|
507
|
+
free() {
|
|
508
|
+
const ptr = this.__destroy_into_raw();
|
|
509
|
+
wasm.__wbg_gridaxiscollection_free(ptr, 0);
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Number of grid axes.
|
|
513
|
+
* @returns {number}
|
|
514
|
+
*/
|
|
515
|
+
get length() {
|
|
516
|
+
const ret = wasm.gridaxiscollection_length(this.__wbg_ptr);
|
|
517
|
+
return ret >>> 0;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Get the axis at `index`. Returns `undefined` for out-of-bounds index.
|
|
521
|
+
* @param {number} index
|
|
522
|
+
* @returns {GridAxisJs | undefined}
|
|
523
|
+
*/
|
|
524
|
+
getAxis(index) {
|
|
525
|
+
const ret = wasm.gridaxiscollection_getAxis(this.__wbg_ptr, index);
|
|
526
|
+
return ret === 0 ? undefined : GridAxisJs.__wrap(ret);
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Whether the collection is empty.
|
|
530
|
+
* @returns {boolean}
|
|
531
|
+
*/
|
|
532
|
+
get isEmpty() {
|
|
533
|
+
const ret = wasm.gridaxiscollection_isEmpty(this.__wbg_ptr);
|
|
534
|
+
return ret !== 0;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
if (Symbol.dispose) GridAxisCollection.prototype[Symbol.dispose] = GridAxisCollection.prototype.free;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* One grid axis: tag + endpoints in renderer Y-up world space (metres).
|
|
541
|
+
*/
|
|
542
|
+
export class GridAxisJs {
|
|
543
|
+
static __wrap(ptr) {
|
|
544
|
+
ptr = ptr >>> 0;
|
|
545
|
+
const obj = Object.create(GridAxisJs.prototype);
|
|
546
|
+
obj.__wbg_ptr = ptr;
|
|
547
|
+
GridAxisJsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
548
|
+
return obj;
|
|
549
|
+
}
|
|
550
|
+
__destroy_into_raw() {
|
|
551
|
+
const ptr = this.__wbg_ptr;
|
|
552
|
+
this.__wbg_ptr = 0;
|
|
553
|
+
GridAxisJsFinalization.unregister(this);
|
|
554
|
+
return ptr;
|
|
555
|
+
}
|
|
556
|
+
free() {
|
|
557
|
+
const ptr = this.__destroy_into_raw();
|
|
558
|
+
wasm.__wbg_gridaxisjs_free(ptr, 0);
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* End endpoint `[x, y, z]` in renderer Y-up world space (metres).
|
|
562
|
+
* @returns {Float32Array}
|
|
563
|
+
*/
|
|
564
|
+
get end() {
|
|
565
|
+
const ret = wasm.gridaxisjs_end(this.__wbg_ptr);
|
|
566
|
+
return takeObject(ret);
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Axis tag (e.g. `"A"`, `"1"`); empty string when unauthored.
|
|
570
|
+
* @returns {string}
|
|
571
|
+
*/
|
|
572
|
+
get tag() {
|
|
573
|
+
let deferred1_0;
|
|
574
|
+
let deferred1_1;
|
|
575
|
+
try {
|
|
576
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
577
|
+
wasm.gridaxisjs_tag(retptr, this.__wbg_ptr);
|
|
578
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
579
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
580
|
+
deferred1_0 = r0;
|
|
581
|
+
deferred1_1 = r1;
|
|
582
|
+
return getStringFromWasm0(r0, r1);
|
|
583
|
+
} finally {
|
|
584
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
585
|
+
wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Start endpoint `[x, y, z]` in renderer Y-up world space (metres).
|
|
590
|
+
* @returns {Float32Array}
|
|
591
|
+
*/
|
|
592
|
+
get start() {
|
|
593
|
+
const ret = wasm.gridaxisjs_start(this.__wbg_ptr);
|
|
594
|
+
return takeObject(ret);
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Express ID of the `IfcGridAxis`.
|
|
598
|
+
* @returns {number}
|
|
599
|
+
*/
|
|
600
|
+
get axisId() {
|
|
601
|
+
const ret = wasm.gridaxisjs_axisId(this.__wbg_ptr);
|
|
602
|
+
return ret >>> 0;
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Express ID of the owning `IfcGrid`.
|
|
606
|
+
* @returns {number}
|
|
607
|
+
*/
|
|
608
|
+
get gridId() {
|
|
609
|
+
const ret = wasm.gridaxisjs_gridId(this.__wbg_ptr);
|
|
610
|
+
return ret >>> 0;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
if (Symbol.dispose) GridAxisJs.prototype[Symbol.dispose] = GridAxisJs.prototype.free;
|
|
614
|
+
|
|
482
615
|
/**
|
|
483
616
|
* Main IFC-Lite API
|
|
484
617
|
*/
|
|
@@ -602,6 +735,36 @@ export class IfcAPI {
|
|
|
602
735
|
heap[stack_pointer++] = undefined;
|
|
603
736
|
}
|
|
604
737
|
}
|
|
738
|
+
/**
|
|
739
|
+
* Parse the file and return structured per-axis data (tag + endpoints) in
|
|
740
|
+
* the renderer's Y-up world space (RTC-subtracted, metres). Use this when
|
|
741
|
+
* you also need the axis tags (to render grid bubbles / labels).
|
|
742
|
+
* @param {string} content
|
|
743
|
+
* @returns {GridAxisCollection}
|
|
744
|
+
*/
|
|
745
|
+
parseGridAxes(content) {
|
|
746
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
747
|
+
const len0 = WASM_VECTOR_LEN;
|
|
748
|
+
const ret = wasm.ifcapi_parseGridAxes(this.__wbg_ptr, ptr0, len0);
|
|
749
|
+
return GridAxisCollection.__wrap(ret);
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* Parse the file and return every `IfcGridAxis` as a flat `Float32Array`
|
|
753
|
+
* of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` (one segment per
|
|
754
|
+
* axis) in the renderer's Y-up world space (RTC-subtracted, metres). Feed
|
|
755
|
+
* straight to a line pipeline (e.g. `uploadAnnotationLines3D`).
|
|
756
|
+
*
|
|
757
|
+
* Returns an empty array when the file has no grids, so the caller can
|
|
758
|
+
* clear the overlay cheaply.
|
|
759
|
+
* @param {string} content
|
|
760
|
+
* @returns {Float32Array}
|
|
761
|
+
*/
|
|
762
|
+
parseGridLines(content) {
|
|
763
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
|
|
764
|
+
const len0 = WASM_VECTOR_LEN;
|
|
765
|
+
const ret = wasm.ifcapi_parseGridLines(this.__wbg_ptr, ptr0, len0);
|
|
766
|
+
return takeObject(ret);
|
|
767
|
+
}
|
|
605
768
|
/**
|
|
606
769
|
* Parse the file and return every `IfcAlignment` directrix as a flat
|
|
607
770
|
* `Float32Array` of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` in
|
|
@@ -1034,6 +1197,22 @@ export class MeshDataJs {
|
|
|
1034
1197
|
const ret = wasm.meshdatajs_expressId(this.__wbg_ptr);
|
|
1035
1198
|
return ret >>> 0;
|
|
1036
1199
|
}
|
|
1200
|
+
/**
|
|
1201
|
+
* True when this mesh carries a surface texture (#961).
|
|
1202
|
+
* @returns {boolean}
|
|
1203
|
+
*/
|
|
1204
|
+
get hasTexture() {
|
|
1205
|
+
const ret = wasm.meshdatajs_hasTexture(this.__wbg_ptr);
|
|
1206
|
+
return ret !== 0;
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* Decoded RGBA8 texture bytes (`width*height*4`). Empty when untextured.
|
|
1210
|
+
* @returns {Uint8Array}
|
|
1211
|
+
*/
|
|
1212
|
+
get textureRgba() {
|
|
1213
|
+
const ret = wasm.meshdatajs_textureRgba(this.__wbg_ptr);
|
|
1214
|
+
return takeObject(ret);
|
|
1215
|
+
}
|
|
1037
1216
|
/**
|
|
1038
1217
|
* Get vertex count
|
|
1039
1218
|
* @returns {number}
|
|
@@ -1064,6 +1243,20 @@ export class MeshDataJs {
|
|
|
1064
1243
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1065
1244
|
}
|
|
1066
1245
|
}
|
|
1246
|
+
/**
|
|
1247
|
+
* @returns {number}
|
|
1248
|
+
*/
|
|
1249
|
+
get textureWidth() {
|
|
1250
|
+
const ret = wasm.meshdatajs_textureWidth(this.__wbg_ptr);
|
|
1251
|
+
return ret >>> 0;
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* @returns {number}
|
|
1255
|
+
*/
|
|
1256
|
+
get textureHeight() {
|
|
1257
|
+
const ret = wasm.meshdatajs_textureHeight(this.__wbg_ptr);
|
|
1258
|
+
return ret >>> 0;
|
|
1259
|
+
}
|
|
1067
1260
|
/**
|
|
1068
1261
|
* Get triangle count
|
|
1069
1262
|
* @returns {number}
|
|
@@ -1072,6 +1265,31 @@ export class MeshDataJs {
|
|
|
1072
1265
|
const ret = wasm.meshdatajs_triangleCount(this.__wbg_ptr);
|
|
1073
1266
|
return ret >>> 0;
|
|
1074
1267
|
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Sampler wrap for the S axis (`IfcSurfaceTexture.RepeatS`): true = repeat.
|
|
1270
|
+
* @returns {boolean}
|
|
1271
|
+
*/
|
|
1272
|
+
get textureRepeatS() {
|
|
1273
|
+
const ret = wasm.meshdatajs_textureRepeatS(this.__wbg_ptr);
|
|
1274
|
+
return ret !== 0;
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Sampler wrap for the T axis (`IfcSurfaceTexture.RepeatT`): true = repeat.
|
|
1278
|
+
* @returns {boolean}
|
|
1279
|
+
*/
|
|
1280
|
+
get textureRepeatT() {
|
|
1281
|
+
const ret = wasm.meshdatajs_textureRepeatT(this.__wbg_ptr);
|
|
1282
|
+
return ret !== 0;
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* Per-vertex texture coordinates as Float32Array (u, v pairs). Empty when
|
|
1286
|
+
* the mesh is untextured.
|
|
1287
|
+
* @returns {Float32Array}
|
|
1288
|
+
*/
|
|
1289
|
+
get uvs() {
|
|
1290
|
+
const ret = wasm.meshdatajs_uvs(this.__wbg_ptr);
|
|
1291
|
+
return takeObject(ret);
|
|
1292
|
+
}
|
|
1075
1293
|
/**
|
|
1076
1294
|
* Get color as [r, g, b, a] array
|
|
1077
1295
|
* @returns {Float32Array}
|
|
@@ -2161,7 +2379,7 @@ function __wbg_get_imports() {
|
|
|
2161
2379
|
const a = state0.a;
|
|
2162
2380
|
state0.a = 0;
|
|
2163
2381
|
try {
|
|
2164
|
-
return
|
|
2382
|
+
return __wasm_bindgen_func_elem_688(a, state0.b, arg0, arg1);
|
|
2165
2383
|
} finally {
|
|
2166
2384
|
state0.a = a;
|
|
2167
2385
|
}
|
|
@@ -2180,6 +2398,10 @@ function __wbg_get_imports() {
|
|
|
2180
2398
|
const ret = new Uint32Array(getArrayU32FromWasm0(arg0, arg1));
|
|
2181
2399
|
return addHeapObject(ret);
|
|
2182
2400
|
};
|
|
2401
|
+
imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
|
|
2402
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
2403
|
+
return addHeapObject(ret);
|
|
2404
|
+
};
|
|
2183
2405
|
imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
|
|
2184
2406
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2185
2407
|
return addHeapObject(ret);
|
|
@@ -2263,7 +2485,7 @@ function __wbg_get_imports() {
|
|
|
2263
2485
|
};
|
|
2264
2486
|
imports.wbg.__wbindgen_cast_257c51b8abf9285e = function(arg0, arg1) {
|
|
2265
2487
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 57, function: Function { arguments: [Externref], shim_idx: 58, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2266
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
2488
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_653, __wasm_bindgen_func_elem_654);
|
|
2267
2489
|
return addHeapObject(ret);
|
|
2268
2490
|
};
|
|
2269
2491
|
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
package/pkg/ifc-lite_bg.wasm
CHANGED
|
Binary file
|