@ifc-lite/wasm 1.19.2 → 2.1.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/pkg/ifc-lite.d.ts CHANGED
@@ -1,259 +1,9 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
 
4
- export class GeoReferenceJs {
5
- private constructor();
6
- free(): void;
7
- [Symbol.dispose](): void;
8
- /**
9
- * Transform local coordinates to map coordinates
10
- */
11
- localToMap(x: number, y: number, z: number): Float64Array;
12
- /**
13
- * Transform map coordinates to local coordinates
14
- */
15
- mapToLocal(e: number, n: number, h: number): Float64Array;
16
- /**
17
- * Get 4x4 transformation matrix (column-major for WebGL)
18
- */
19
- toMatrix(): Float64Array;
20
- /**
21
- * Get CRS name
22
- */
23
- readonly crsName: string | undefined;
24
- /**
25
- * Get rotation angle in radians
26
- */
27
- readonly rotation: number;
28
- /**
29
- * Eastings (X offset)
30
- */
31
- eastings: number;
32
- /**
33
- * Northings (Y offset)
34
- */
35
- northings: number;
36
- /**
37
- * Orthogonal height (Z offset)
38
- */
39
- orthogonal_height: number;
40
- /**
41
- * X-axis abscissa (cos of rotation)
42
- */
43
- x_axis_abscissa: number;
44
- /**
45
- * X-axis ordinate (sin of rotation)
46
- */
47
- x_axis_ordinate: number;
48
- /**
49
- * Scale factor
50
- */
51
- scale: number;
52
- }
53
-
54
- export class GpuGeometry {
55
- free(): void;
56
- [Symbol.dispose](): void;
57
- /**
58
- * Set the RTC (Relative To Center) offset applied to coordinates
59
- */
60
- set_rtc_offset(x: number, y: number, z: number): void;
61
- /**
62
- * Get IFC type name by index
63
- */
64
- getIfcTypeName(index: number): string | undefined;
65
- /**
66
- * Get metadata for a specific mesh
67
- */
68
- getMeshMetadata(index: number): GpuMeshMetadata | undefined;
69
- /**
70
- * Create a new empty GPU geometry container
71
- */
72
- constructor();
73
- /**
74
- * Get number of meshes in this geometry batch
75
- */
76
- readonly meshCount: number;
77
- /**
78
- * Get length of indices array (in u32 elements)
79
- */
80
- readonly indicesLen: number;
81
- /**
82
- * Get pointer to indices array for zero-copy view
83
- */
84
- readonly indicesPtr: number;
85
- /**
86
- * Get X component of RTC offset
87
- */
88
- readonly rtcOffsetX: number;
89
- /**
90
- * Get Y component of RTC offset
91
- */
92
- readonly rtcOffsetY: number;
93
- /**
94
- * Get Z component of RTC offset
95
- */
96
- readonly rtcOffsetZ: number;
97
- /**
98
- * Check if RTC offset is active (non-zero)
99
- */
100
- readonly hasRtcOffset: boolean;
101
- /**
102
- * Get length of vertex data array (in f32 elements, not bytes)
103
- */
104
- readonly vertexDataLen: number;
105
- /**
106
- * Get pointer to vertex data for zero-copy view
107
- *
108
- * SAFETY: View is only valid until next WASM allocation!
109
- * Create view, upload to GPU, then discard view immediately.
110
- */
111
- readonly vertexDataPtr: number;
112
- /**
113
- * Get total vertex count
114
- */
115
- readonly totalVertexCount: number;
116
- /**
117
- * Get byte length of indices (for GPU buffer creation)
118
- */
119
- readonly indicesByteLength: number;
120
- /**
121
- * Get total triangle count
122
- */
123
- readonly totalTriangleCount: number;
124
- /**
125
- * Get byte length of vertex data (for GPU buffer creation)
126
- */
127
- readonly vertexDataByteLength: number;
128
- /**
129
- * Check if geometry is empty
130
- */
131
- readonly isEmpty: boolean;
132
- }
133
-
134
- export class GpuInstancedGeometry {
135
- free(): void;
136
- [Symbol.dispose](): void;
137
- /**
138
- * Create new instanced geometry
139
- */
140
- constructor(geometry_id: bigint);
141
- readonly geometryId: bigint;
142
- readonly indicesLen: number;
143
- readonly indicesPtr: number;
144
- readonly vertexCount: number;
145
- readonly instanceCount: number;
146
- readonly triangleCount: number;
147
- readonly vertexDataLen: number;
148
- readonly vertexDataPtr: number;
149
- readonly instanceDataLen: number;
150
- readonly instanceDataPtr: number;
151
- readonly indicesByteLength: number;
152
- readonly vertexDataByteLength: number;
153
- readonly instanceExpressIdsPtr: number;
154
- readonly instanceDataByteLength: number;
155
- }
156
-
157
- export class GpuInstancedGeometryCollection {
158
- free(): void;
159
- [Symbol.dispose](): void;
160
- get(index: number): GpuInstancedGeometry | undefined;
161
- constructor();
162
- /**
163
- * Get geometry by index with pointer access over owned buffers.
164
- * This avoids exposing references tied to collection lifetime.
165
- */
166
- getRef(index: number): GpuInstancedGeometryRef | undefined;
167
- readonly length: number;
168
- }
169
-
170
- export class GpuInstancedGeometryRef {
171
- private constructor();
172
- free(): void;
173
- [Symbol.dispose](): void;
174
- readonly geometryId: bigint;
175
- readonly indicesLen: number;
176
- readonly indicesPtr: number;
177
- readonly instanceCount: number;
178
- readonly vertexDataLen: number;
179
- readonly vertexDataPtr: number;
180
- readonly instanceDataLen: number;
181
- readonly instanceDataPtr: number;
182
- readonly indicesByteLength: number;
183
- readonly vertexDataByteLength: number;
184
- readonly instanceExpressIdsPtr: number;
185
- readonly instanceDataByteLength: number;
186
- }
187
-
188
- export class GpuMeshMetadata {
189
- private constructor();
190
- free(): void;
191
- [Symbol.dispose](): void;
192
- readonly expressId: number;
193
- readonly indexCount: number;
194
- readonly ifcTypeIdx: number;
195
- readonly indexOffset: number;
196
- readonly vertexCount: number;
197
- readonly vertexOffset: number;
198
- readonly color: Float32Array;
199
- }
200
-
201
4
  export class IfcAPI {
202
5
  free(): void;
203
6
  [Symbol.dispose](): void;
204
- /**
205
- * Parse IFC file and return individual meshes with express IDs and colors
206
- * This matches the MeshData[] format expected by the viewer
207
- *
208
- * Example:
209
- * ```javascript
210
- * const api = new IfcAPI();
211
- * const collection = api.parseMeshes(ifcData);
212
- * for (let i = 0; i < collection.length; i++) {
213
- * const mesh = collection.get(i);
214
- * console.log('Express ID:', mesh.expressId);
215
- * console.log('Positions:', mesh.positions);
216
- * console.log('Color:', mesh.color);
217
- * }
218
- * ```
219
- */
220
- parseMeshes(content: string): MeshCollection;
221
- /**
222
- * Parse IFC file with streaming mesh batches for progressive rendering
223
- * Calls the callback with batches of meshes, yielding to browser between batches
224
- *
225
- * Options:
226
- * - `batchSize`: Number of meshes per batch (default: 25)
227
- * - `onBatch(meshes, progress)`: Called for each batch of meshes
228
- * - `onRtcOffset({x, y, z, hasRtc})`: Called early with RTC offset for camera/world setup
229
- * - `onColorUpdate(Map<id, color>)`: Called with style updates after initial render
230
- * - `onComplete(stats)`: Called when parsing completes with stats including rtcOffset
231
- *
232
- * Example:
233
- * ```javascript
234
- * const api = new IfcAPI();
235
- * await api.parseMeshesAsync(ifcData, {
236
- * batchSize: 100,
237
- * onRtcOffset: (rtc) => {
238
- * if (rtc.hasRtc) {
239
- * // Model uses large coordinates - adjust camera/world origin
240
- * viewer.setWorldOffset(rtc.x, rtc.y, rtc.z);
241
- * }
242
- * },
243
- * onBatch: (meshes, progress) => {
244
- * for (const mesh of meshes) {
245
- * scene.add(createThreeMesh(mesh));
246
- * }
247
- * console.log(`Progress: ${progress.percent}%`);
248
- * },
249
- * onComplete: (stats) => {
250
- * console.log(`Done! ${stats.totalMeshes} meshes`);
251
- * // stats.rtcOffset also available here: {x, y, z, hasRtc}
252
- * }
253
- * });
254
- * ```
255
- */
256
- parseMeshesAsync(content: string, options: any): Promise<any>;
257
7
  /**
258
8
  * Fast pre-pass: scans for geometry entities ONLY (skips style/void/material resolution).
259
9
  * Returns job list + unit scale + RTC offset in ~1-2s instead of ~6s.
@@ -266,118 +16,11 @@ export class IfcAPI {
266
16
  * Takes raw bytes (&[u8]) to avoid TextDecoder overhead.
267
17
  */
268
18
  buildPrePassOnce(data: Uint8Array): any;
269
- /**
270
- * Parse a subset of IFC geometry entities by index range.
271
- *
272
- * Performs the full pre-pass (entity index, combined style/void/brep scan)
273
- * but only processes geometry entities whose index (in the combined
274
- * simple + complex job list) falls within `[start_idx, end_idx)`.
275
- *
276
- * This enables Web Worker parallelization: each worker processes a
277
- * disjoint slice of the entity list while sharing the same pre-pass data.
278
- *
279
- * Example:
280
- * ```javascript
281
- * const api = new IfcAPI();
282
- * // Worker 1: entities 0..500
283
- * const batch1 = api.parseMeshesSubset(content, 0, 500);
284
- * // Worker 2: entities 500..1000
285
- * const batch2 = api.parseMeshesSubset(content, 500, 1000);
286
- * ```
287
- */
288
- parseMeshesSubset(content: string, start_idx: number, end_idx: number, skip_expensive: boolean): MeshCollection;
289
- /**
290
- * Parse IFC file and return GPU-ready geometry for zero-copy upload
291
- *
292
- * This method generates geometry that is:
293
- * - Pre-interleaved (position + normal per vertex)
294
- * - Coordinate-converted (Z-up to Y-up)
295
- * - Ready for direct GPU upload via pointer access
296
- *
297
- * Example:
298
- * ```javascript
299
- * const api = new IfcAPI();
300
- * const gpuGeom = api.parseToGpuGeometry(ifcData);
301
- *
302
- * // Get WASM memory for zero-copy views
303
- * const memory = api.getMemory();
304
- *
305
- * // Create views directly into WASM memory (NO COPY!)
306
- * const vertexView = new Float32Array(
307
- * memory.buffer,
308
- * gpuGeom.vertexDataPtr,
309
- * gpuGeom.vertexDataLen
310
- * );
311
- * const indexView = new Uint32Array(
312
- * memory.buffer,
313
- * gpuGeom.indicesPtr,
314
- * gpuGeom.indicesLen
315
- * );
316
- *
317
- * // Upload directly to GPU (single copy: WASM → GPU)
318
- * device.queue.writeBuffer(vertexBuffer, 0, vertexView);
319
- * device.queue.writeBuffer(indexBuffer, 0, indexView);
320
- *
321
- * // Free when done
322
- * gpuGeom.free();
323
- * ```
324
- */
325
- parseToGpuGeometry(content: string): GpuGeometry;
326
- /**
327
- * Parse IFC file and return instanced geometry grouped by geometry hash
328
- * This reduces draw calls by grouping identical geometries with different transforms
329
- *
330
- * Example:
331
- * ```javascript
332
- * const api = new IfcAPI();
333
- * const collection = api.parseMeshesInstanced(ifcData);
334
- * for (let i = 0; i < collection.length; i++) {
335
- * const geometry = collection.get(i);
336
- * console.log('Geometry ID:', geometry.geometryId);
337
- * console.log('Instances:', geometry.instanceCount);
338
- * for (let j = 0; j < geometry.instanceCount; j++) {
339
- * const inst = geometry.getInstance(j);
340
- * console.log(' Express ID:', inst.expressId);
341
- * console.log(' Transform:', inst.transform);
342
- * }
343
- * }
344
- * ```
345
- */
346
- parseMeshesInstanced(content: string): InstancedMeshCollection;
347
19
  /**
348
20
  * Process geometry for a subset of pre-scanned entities.
349
21
  * Takes raw bytes and pre-pass data from buildPrePassOnce.
350
22
  */
351
23
  processGeometryBatch(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array): MeshCollection;
352
- /**
353
- * Phase 1 of Path C — sharded entity-index scan.
354
- *
355
- * Walks the bytes in `[range_start, range_end)` once and emits
356
- * `(express_id, byte_offset, byte_length)` triples for every entity
357
- * whose `#N=` opener falls in that range. Byte offsets are GLOBAL
358
- * (relative to file start), so multiple shards' outputs concatenate
359
- * without rewriting.
360
- *
361
- * Cross-boundary handling: the scanner rewinds `range_start` to the
362
- * byte after the previous `\n` so we don't mis-parse a half entity.
363
- * The previous shard owns any entity whose opener is BEFORE its own
364
- * range_end (its terminator may extend past it; that's fine — the
365
- * scanner walks STEP entities to their terminating `;`, even if that
366
- * terminator is past the shard's nominal range_end).
367
- *
368
- * Returns nothing through the JS callback for performance signals;
369
- * emits exactly one `index-shard` event with three Uint32Arrays:
370
- * `{ type: "index-shard", ids: Uint32Array, starts: Uint32Array,
371
- * lengths: Uint32Array, shardStart: u32, shardEnd: u32 }`
372
- *
373
- * Used by the JS-side shard coordinator to merge N shards' indices
374
- * into a single entity-index without paying the 3 s single-threaded
375
- * scan cost. Style and job emission are NOT done here — they remain
376
- * the job of the existing `build_pre_pass_streaming` (which can be
377
- * called on shard 0 in parallel with the other shards' index-only
378
- * scans).
379
- */
380
- scanEntityIndexShard(data: Uint8Array, on_event: Function, range_start: number, range_end: number): any;
381
24
  /**
382
25
  * Streaming pre-pass: emits geometry jobs in chunks via a JS callback
383
26
  * instead of waiting for the full file scan to complete.
@@ -406,95 +49,16 @@ export class IfcAPI {
406
49
  */
407
50
  buildPrePassStreaming(data: Uint8Array, on_event: Function, chunk_size: number): any;
408
51
  /**
409
- * Parse IFC file with streaming GPU-ready geometry batches
410
- *
411
- * Yields batches of GPU-ready geometry for progressive rendering with zero-copy upload.
412
- * Uses fast-first-frame streaming: simple geometry (walls, slabs) first.
413
- *
414
- * Example:
415
- * ```javascript
416
- * const api = new IfcAPI();
417
- * const memory = api.getMemory();
418
- *
419
- * await api.parseToGpuGeometryAsync(ifcData, {
420
- * batchSize: 25,
421
- * onBatch: (gpuGeom, progress) => {
422
- * // Create zero-copy views
423
- * const vertexView = new Float32Array(
424
- * memory.buffer,
425
- * gpuGeom.vertexDataPtr,
426
- * gpuGeom.vertexDataLen
427
- * );
428
- *
429
- * // Upload to GPU
430
- * device.queue.writeBuffer(vertexBuffer, 0, vertexView);
431
- *
432
- * // IMPORTANT: Free immediately after upload!
433
- * gpuGeom.free();
434
- * },
435
- * onComplete: (stats) => {
436
- * console.log(`Done! ${stats.totalMeshes} meshes`);
437
- * }
438
- * });
439
- * ```
440
- */
441
- parseToGpuGeometryAsync(content: string, options: any): Promise<any>;
442
- /**
443
- * Parse IFC file with streaming instanced geometry batches for progressive rendering
444
- * Groups identical geometries and yields batches of InstancedGeometry
445
- * Uses fast-first-frame streaming: simple geometry (walls, slabs) first
446
- *
447
- * Example:
448
- * ```javascript
449
- * const api = new IfcAPI();
450
- * await api.parseMeshesInstancedAsync(ifcData, {
451
- * batchSize: 25, // Number of unique geometries per batch
452
- * onBatch: (geometries, progress) => {
453
- * for (const geom of geometries) {
454
- * renderer.addInstancedGeometry(geom);
455
- * }
456
- * },
457
- * onComplete: (stats) => {
458
- * console.log(`Done! ${stats.totalGeometries} unique geometries, ${stats.totalInstances} instances`);
459
- * }
460
- * });
461
- * ```
462
- */
463
- parseMeshesInstancedAsync(content: string, options: any): Promise<any>;
464
- /**
465
- * Parse IFC file to GPU-ready instanced geometry for zero-copy upload
52
+ * Parse the file and return every `IfcAlignment` directrix as a flat
53
+ * `Float32Array` of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` in
54
+ * the renderer's Y-up world space (RTC-subtracted, metres). Consecutive
55
+ * samples form line segments. Feed straight to
56
+ * `renderer.uploadAnnotationLines3D(...)`.
466
57
  *
467
- * Groups identical geometries by hash for efficient GPU instancing.
468
- * Returns a collection of instanced geometries with pointer access.
58
+ * Returns an empty array when the file has no alignments (or none with a
59
+ * resolvable Axis curve), so the caller can clear the overlay cheaply.
469
60
  */
470
- parseToGpuInstancedGeometry(content: string): GpuInstancedGeometryCollection;
471
- /**
472
- * Process instanced geometry for a subset of pre-scanned entities.
473
- * Takes raw bytes and pre-pass data from buildPrePassOnce.
474
- */
475
- processInstancedGeometryBatch(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, style_ids: Uint32Array, style_colors: Uint8Array): InstancedMeshCollection;
476
- /**
477
- * Parse IFC file with zero-copy mesh data
478
- * Maximum performance - returns mesh with direct memory access
479
- *
480
- * Example:
481
- * ```javascript
482
- * const api = new IfcAPI();
483
- * const mesh = await api.parseZeroCopy(ifcData);
484
- *
485
- * // Create TypedArray views (NO COPYING!)
486
- * const memory = await api.getMemory();
487
- * const positions = new Float32Array(
488
- * memory.buffer,
489
- * mesh.positions_ptr,
490
- * mesh.positions_len
491
- * );
492
- *
493
- * // Upload directly to GPU
494
- * gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);
495
- * ```
496
- */
497
- parseZeroCopy(content: string): ZeroCopyMesh;
61
+ parseAlignmentLines(content: string): Float32Array;
498
62
  /**
499
63
  * Extract raw profile polygons from all building elements with `IfcExtrudedAreaSolid`
500
64
  * representations.
@@ -518,14 +82,6 @@ export class IfcAPI {
518
82
  * ```
519
83
  */
520
84
  extractProfiles(content: string, model_index: number): ProfileCollection;
521
- /**
522
- * Debug: Test processing entity #953 (FacetedBrep wall)
523
- */
524
- debugProcessEntity953(content: string): string;
525
- /**
526
- * Debug: Test processing a single wall
527
- */
528
- debugProcessFirstWall(content: string): string;
529
85
  /**
530
86
  * Get WASM memory for zero-copy access
531
87
  */
@@ -556,17 +112,15 @@ export class IfcAPI {
556
112
  /**
557
113
  * Toggle the "render multilayer walls as a single solid" mode (issue #540).
558
114
  *
559
- * When `enabled` is `true`, every subsequent `parseMeshes*` call will
560
- * suppress geometry emission for `IfcBuildingElementPart` entities whose
561
- * `IfcRelAggregates` parent wall is sliceable (has an
115
+ * When `enabled` is `true`, every subsequent `processGeometryBatch` call
116
+ * will suppress geometry emission for `IfcBuildingElementPart` entities
117
+ * whose `IfcRelAggregates` parent wall is sliceable (has an
562
118
  * `IfcMaterialLayerSetUsage`) AND has its own `Representation`. The
563
119
  * parent wall keeps its per-layer sub-mesh colouring, so the visual
564
120
  * result is the same as the layered render but with one mesh per wall
565
121
  * instead of one per layer part — much cheaper for both CPU and GPU.
566
122
  *
567
- * Default is `false`. Pass `true` before calling `parseMeshes`,
568
- * `parseMeshesSubset`, `parseMeshesAsync`, `parseMeshesInstanced`, or
569
- * `parseMeshesInstancedAsync`.
123
+ * Default is `false`. Pass `true` before calling `processGeometryBatch`.
570
124
  */
571
125
  setMergeLayers(enabled: boolean): void;
572
126
  /**
@@ -584,39 +138,6 @@ export class IfcAPI {
584
138
  * Create and initialize the IFC API
585
139
  */
586
140
  constructor();
587
- /**
588
- * Extract georeferencing information from IFC content
589
- * Returns null if no georeferencing is present
590
- *
591
- * Example:
592
- * ```javascript
593
- * const api = new IfcAPI();
594
- * const georef = api.getGeoReference(ifcData);
595
- * if (georef) {
596
- * console.log('CRS:', georef.crsName);
597
- * const [e, n, h] = georef.localToMap(10, 20, 5);
598
- * }
599
- * ```
600
- */
601
- getGeoReference(content: string): GeoReferenceJs | undefined;
602
- /**
603
- * Parse IFC file and return mesh with RTC offset for large coordinates
604
- * This handles georeferenced models by shifting to centroid
605
- *
606
- * Example:
607
- * ```javascript
608
- * const api = new IfcAPI();
609
- * const result = api.parseMeshesWithRtc(ifcData);
610
- * const rtcOffset = result.rtcOffset;
611
- * const meshes = result.meshes;
612
- *
613
- * // Convert local coords back to world:
614
- * if (rtcOffset.isSignificant()) {
615
- * const [wx, wy, wz] = rtcOffset.toWorld(localX, localY, localZ);
616
- * }
617
- * ```
618
- */
619
- parseMeshesWithRtc(content: string): MeshCollectionWithRtc;
620
141
  /**
621
142
  * Parse IFC file with streaming events
622
143
  * Calls the callback function for each parse event
@@ -666,8 +187,9 @@ export class IfcAPI {
666
187
  */
667
188
  parse(content: string): Promise<any>;
668
189
  /**
669
- * Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
670
- * These are 2D curves used for architectural drawings instead of sectioning 3D geometry
190
+ * Parse IFC file and extract symbolic representations (Plan,
191
+ * Annotation, FootPrint, Axis). These are 2D curves used for
192
+ * architectural drawings instead of sectioning 3D geometry.
671
193
  *
672
194
  * Example:
673
195
  * ```javascript
@@ -691,37 +213,6 @@ export class IfcAPI {
691
213
  readonly is_ready: boolean;
692
214
  }
693
215
 
694
- export class InstanceData {
695
- private constructor();
696
- free(): void;
697
- [Symbol.dispose](): void;
698
- readonly expressId: number;
699
- readonly color: Float32Array;
700
- readonly transform: Float32Array;
701
- }
702
-
703
- export class InstancedGeometry {
704
- private constructor();
705
- free(): void;
706
- [Symbol.dispose](): void;
707
- get_instance(index: number): InstanceData | undefined;
708
- readonly geometryId: bigint;
709
- readonly instance_count: number;
710
- readonly indices: Uint32Array;
711
- readonly normals: Float32Array;
712
- readonly positions: Float32Array;
713
- }
714
-
715
- export class InstancedMeshCollection {
716
- private constructor();
717
- free(): void;
718
- [Symbol.dispose](): void;
719
- get(index: number): InstancedGeometry | undefined;
720
- readonly totalInstances: number;
721
- readonly totalGeometries: number;
722
- readonly length: number;
723
- }
724
-
725
216
  export class MeshCollection {
726
217
  private constructor();
727
218
  free(): void;
@@ -771,28 +262,6 @@ export class MeshCollection {
771
262
  readonly length: number;
772
263
  }
773
264
 
774
- export class MeshCollectionWithRtc {
775
- private constructor();
776
- free(): void;
777
- [Symbol.dispose](): void;
778
- /**
779
- * Get mesh at index
780
- */
781
- get(index: number): MeshDataJs | undefined;
782
- /**
783
- * Get the RTC offset
784
- */
785
- readonly rtcOffset: RtcOffsetJs;
786
- /**
787
- * Get number of meshes
788
- */
789
- readonly length: number;
790
- /**
791
- * Get the mesh collection
792
- */
793
- readonly meshes: MeshCollection;
794
- }
795
-
796
265
  export class MeshDataJs {
797
266
  private constructor();
798
267
  free(): void;
@@ -894,32 +363,6 @@ export class ProfileEntryJs {
894
363
  readonly transform: Float32Array;
895
364
  }
896
365
 
897
- export class RtcOffsetJs {
898
- private constructor();
899
- free(): void;
900
- [Symbol.dispose](): void;
901
- /**
902
- * Check if offset is significant (>10km)
903
- */
904
- isSignificant(): boolean;
905
- /**
906
- * Convert local coordinates to world coordinates
907
- */
908
- toWorld(x: number, y: number, z: number): Float64Array;
909
- /**
910
- * X offset (subtracted from positions)
911
- */
912
- x: number;
913
- /**
914
- * Y offset
915
- */
916
- y: number;
917
- /**
918
- * Z offset
919
- */
920
- z: number;
921
- }
922
-
923
366
  export class SymbolicCircle {
924
367
  private constructor();
925
368
  free(): void;
@@ -1078,60 +521,6 @@ export class SymbolicText {
1078
521
  readonly targetPx: number;
1079
522
  }
1080
523
 
1081
- export class ZeroCopyMesh {
1082
- free(): void;
1083
- [Symbol.dispose](): void;
1084
- /**
1085
- * Get bounding box maximum point
1086
- */
1087
- bounds_max(): Float32Array;
1088
- /**
1089
- * Get bounding box minimum point
1090
- */
1091
- bounds_min(): Float32Array;
1092
- /**
1093
- * Create a new zero-copy mesh from a Mesh
1094
- */
1095
- constructor();
1096
- /**
1097
- * Get length of indices array
1098
- */
1099
- readonly indices_len: number;
1100
- /**
1101
- * Get pointer to indices array
1102
- */
1103
- readonly indices_ptr: number;
1104
- /**
1105
- * Get length of normals array
1106
- */
1107
- readonly normals_len: number;
1108
- /**
1109
- * Get pointer to normals array
1110
- */
1111
- readonly normals_ptr: number;
1112
- /**
1113
- * Get vertex count
1114
- */
1115
- readonly vertex_count: number;
1116
- /**
1117
- * Get length of positions array (in f32 elements, not bytes)
1118
- */
1119
- readonly positions_len: number;
1120
- /**
1121
- * Get pointer to positions array
1122
- * JavaScript can create Float32Array view: new Float32Array(memory.buffer, ptr, length)
1123
- */
1124
- readonly positions_ptr: number;
1125
- /**
1126
- * Get triangle count
1127
- */
1128
- readonly triangle_count: number;
1129
- /**
1130
- * Check if mesh is empty
1131
- */
1132
- readonly is_empty: boolean;
1133
- }
1134
-
1135
524
  /**
1136
525
  * Get WASM memory to allow JavaScript to create TypedArray views
1137
526
  */
@@ -1164,143 +553,46 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
1164
553
 
1165
554
  export interface InitOutput {
1166
555
  readonly memory: WebAssembly.Memory;
1167
- readonly __wbg_georeferencejs_free: (a: number, b: number) => void;
1168
- readonly __wbg_get_georeferencejs_eastings: (a: number) => number;
1169
- readonly __wbg_get_georeferencejs_northings: (a: number) => number;
1170
- readonly __wbg_get_georeferencejs_orthogonal_height: (a: number) => number;
1171
- readonly __wbg_get_georeferencejs_scale: (a: number) => number;
1172
- readonly __wbg_get_georeferencejs_x_axis_abscissa: (a: number) => number;
1173
- readonly __wbg_get_georeferencejs_x_axis_ordinate: (a: number) => number;
1174
- readonly __wbg_gpugeometry_free: (a: number, b: number) => void;
1175
- readonly __wbg_gpuinstancedgeometry_free: (a: number, b: number) => void;
1176
- readonly __wbg_gpuinstancedgeometrycollection_free: (a: number, b: number) => void;
1177
- readonly __wbg_gpumeshmetadata_free: (a: number, b: number) => void;
1178
556
  readonly __wbg_ifcapi_free: (a: number, b: number) => void;
1179
- readonly __wbg_instancedata_free: (a: number, b: number) => void;
1180
- readonly __wbg_instancedgeometry_free: (a: number, b: number) => void;
1181
- readonly __wbg_instancedmeshcollection_free: (a: number, b: number) => void;
1182
557
  readonly __wbg_meshcollection_free: (a: number, b: number) => void;
1183
- readonly __wbg_meshcollectionwithrtc_free: (a: number, b: number) => void;
1184
558
  readonly __wbg_meshdatajs_free: (a: number, b: number) => void;
1185
559
  readonly __wbg_profilecollection_free: (a: number, b: number) => void;
1186
560
  readonly __wbg_profileentryjs_free: (a: number, b: number) => void;
1187
- readonly __wbg_rtcoffsetjs_free: (a: number, b: number) => void;
1188
- readonly __wbg_set_georeferencejs_eastings: (a: number, b: number) => void;
1189
- readonly __wbg_set_georeferencejs_northings: (a: number, b: number) => void;
1190
- readonly __wbg_set_georeferencejs_orthogonal_height: (a: number, b: number) => void;
1191
- readonly __wbg_set_georeferencejs_scale: (a: number, b: number) => void;
1192
- readonly __wbg_set_georeferencejs_x_axis_abscissa: (a: number, b: number) => void;
1193
- readonly __wbg_set_georeferencejs_x_axis_ordinate: (a: number, b: number) => void;
1194
561
  readonly __wbg_symboliccircle_free: (a: number, b: number) => void;
1195
562
  readonly __wbg_symbolicfillarea_free: (a: number, b: number) => void;
1196
563
  readonly __wbg_symbolicpolyline_free: (a: number, b: number) => void;
1197
564
  readonly __wbg_symbolicrepresentationcollection_free: (a: number, b: number) => void;
1198
565
  readonly __wbg_symbolictext_free: (a: number, b: number) => void;
1199
- readonly __wbg_zerocopymesh_free: (a: number, b: number) => void;
1200
- readonly georeferencejs_crsName: (a: number, b: number) => void;
1201
- readonly georeferencejs_localToMap: (a: number, b: number, c: number, d: number, e: number) => void;
1202
- readonly georeferencejs_mapToLocal: (a: number, b: number, c: number, d: number, e: number) => void;
1203
- readonly georeferencejs_rotation: (a: number) => number;
1204
- readonly georeferencejs_toMatrix: (a: number, b: number) => void;
1205
- readonly gpugeometry_getIfcTypeName: (a: number, b: number, c: number) => void;
1206
- readonly gpugeometry_getMeshMetadata: (a: number, b: number) => number;
1207
- readonly gpugeometry_hasRtcOffset: (a: number) => number;
1208
- readonly gpugeometry_indicesByteLength: (a: number) => number;
1209
- readonly gpugeometry_indicesLen: (a: number) => number;
1210
- readonly gpugeometry_indicesPtr: (a: number) => number;
1211
- readonly gpugeometry_isEmpty: (a: number) => number;
1212
- readonly gpugeometry_meshCount: (a: number) => number;
1213
- readonly gpugeometry_new: () => number;
1214
- readonly gpugeometry_rtcOffsetX: (a: number) => number;
1215
- readonly gpugeometry_rtcOffsetY: (a: number) => number;
1216
- readonly gpugeometry_rtcOffsetZ: (a: number) => number;
1217
- readonly gpugeometry_set_rtc_offset: (a: number, b: number, c: number, d: number) => void;
1218
- readonly gpugeometry_totalTriangleCount: (a: number) => number;
1219
- readonly gpugeometry_totalVertexCount: (a: number) => number;
1220
- readonly gpugeometry_vertexDataByteLength: (a: number) => number;
1221
- readonly gpugeometry_vertexDataLen: (a: number) => number;
1222
- readonly gpugeometry_vertexDataPtr: (a: number) => number;
1223
- readonly gpuinstancedgeometry_geometryId: (a: number) => bigint;
1224
- readonly gpuinstancedgeometry_indicesByteLength: (a: number) => number;
1225
- readonly gpuinstancedgeometry_indicesLen: (a: number) => number;
1226
- readonly gpuinstancedgeometry_indicesPtr: (a: number) => number;
1227
- readonly gpuinstancedgeometry_instanceCount: (a: number) => number;
1228
- readonly gpuinstancedgeometry_instanceDataByteLength: (a: number) => number;
1229
- readonly gpuinstancedgeometry_instanceDataLen: (a: number) => number;
1230
- readonly gpuinstancedgeometry_instanceDataPtr: (a: number) => number;
1231
- readonly gpuinstancedgeometry_instanceExpressIdsPtr: (a: number) => number;
1232
- readonly gpuinstancedgeometry_new: (a: bigint) => number;
1233
- readonly gpuinstancedgeometry_triangleCount: (a: number) => number;
1234
- readonly gpuinstancedgeometry_vertexCount: (a: number) => number;
1235
- readonly gpuinstancedgeometry_vertexDataByteLength: (a: number) => number;
1236
- readonly gpuinstancedgeometry_vertexDataLen: (a: number) => number;
1237
- readonly gpuinstancedgeometry_vertexDataPtr: (a: number) => number;
1238
- readonly gpuinstancedgeometrycollection_get: (a: number, b: number) => number;
1239
- readonly gpuinstancedgeometrycollection_length: (a: number) => number;
1240
- readonly gpuinstancedgeometrycollection_new: () => number;
1241
- readonly gpumeshmetadata_color: (a: number, b: number) => void;
1242
- readonly gpumeshmetadata_expressId: (a: number) => number;
1243
- readonly gpumeshmetadata_ifcTypeIdx: (a: number) => number;
1244
- readonly gpumeshmetadata_indexCount: (a: number) => number;
1245
- readonly gpumeshmetadata_indexOffset: (a: number) => number;
1246
- readonly gpumeshmetadata_vertexCount: (a: number) => number;
1247
- readonly gpumeshmetadata_vertexOffset: (a: number) => number;
1248
566
  readonly ifcapi_buildPrePassFast: (a: number, b: number, c: number) => number;
1249
567
  readonly ifcapi_buildPrePassOnce: (a: number, b: number, c: number) => number;
1250
568
  readonly ifcapi_buildPrePassStreaming: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1251
569
  readonly ifcapi_clearPrePassCache: (a: number) => void;
1252
- readonly ifcapi_debugProcessEntity953: (a: number, b: number, c: number, d: number) => void;
1253
- readonly ifcapi_debugProcessFirstWall: (a: number, b: number, c: number, d: number) => void;
1254
570
  readonly ifcapi_extractProfiles: (a: number, b: number, c: number, d: number) => number;
1255
- readonly ifcapi_getGeoReference: (a: number, b: number, c: number) => number;
1256
571
  readonly ifcapi_getMemory: (a: number) => number;
1257
572
  readonly ifcapi_is_ready: (a: number) => number;
1258
573
  readonly ifcapi_new: () => number;
1259
574
  readonly ifcapi_parse: (a: number, b: number, c: number) => number;
1260
- readonly ifcapi_parseMeshes: (a: number, b: number, c: number) => number;
1261
- readonly ifcapi_parseMeshesAsync: (a: number, b: number, c: number, d: number) => number;
1262
- readonly ifcapi_parseMeshesInstanced: (a: number, b: number, c: number) => number;
1263
- readonly ifcapi_parseMeshesInstancedAsync: (a: number, b: number, c: number, d: number) => number;
1264
- readonly ifcapi_parseMeshesSubset: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
1265
- readonly ifcapi_parseMeshesWithRtc: (a: number, b: number, c: number) => number;
575
+ readonly ifcapi_parseAlignmentLines: (a: number, b: number, c: number) => number;
1266
576
  readonly ifcapi_parseStreaming: (a: number, b: number, c: number, d: number) => number;
1267
577
  readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
1268
- readonly ifcapi_parseToGpuGeometry: (a: number, b: number, c: number) => number;
1269
- readonly ifcapi_parseToGpuGeometryAsync: (a: number, b: number, c: number, d: number) => number;
1270
- readonly ifcapi_parseToGpuInstancedGeometry: (a: number, b: number, c: number) => number;
1271
- readonly ifcapi_parseZeroCopy: (a: number, b: number, c: number) => number;
1272
578
  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;
1273
- readonly ifcapi_processInstancedGeometryBatch: (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) => number;
1274
579
  readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
1275
580
  readonly ifcapi_scanEntitiesFastBytes: (a: number, b: number, c: number) => number;
1276
- readonly ifcapi_scanEntityIndexShard: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1277
581
  readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
1278
582
  readonly ifcapi_scanRelevantEntitiesFastBytes: (a: number, b: number, c: number) => number;
1279
583
  readonly ifcapi_setEntityIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1280
584
  readonly ifcapi_setMergeLayers: (a: number, b: number) => void;
1281
585
  readonly ifcapi_version: (a: number, b: number) => void;
1282
- readonly instancedata_color: (a: number, b: number) => void;
1283
- readonly instancedata_expressId: (a: number) => number;
1284
- readonly instancedata_transform: (a: number) => number;
1285
- readonly instancedgeometry_get_instance: (a: number, b: number) => number;
1286
- readonly instancedgeometry_indices: (a: number) => number;
1287
- readonly instancedgeometry_instance_count: (a: number) => number;
1288
- readonly instancedgeometry_normals: (a: number) => number;
1289
- readonly instancedgeometry_positions: (a: number) => number;
1290
- readonly instancedmeshcollection_get: (a: number, b: number) => number;
1291
- readonly instancedmeshcollection_totalInstances: (a: number) => number;
1292
586
  readonly meshcollection_buildingRotation: (a: number, b: number) => void;
1293
587
  readonly meshcollection_get: (a: number, b: number) => number;
1294
588
  readonly meshcollection_hasRtcOffset: (a: number) => number;
1295
589
  readonly meshcollection_length: (a: number) => number;
1296
590
  readonly meshcollection_localToWorld: (a: number, b: number, c: number, d: number, e: number) => void;
591
+ readonly meshcollection_rtcOffsetX: (a: number) => number;
1297
592
  readonly meshcollection_rtcOffsetY: (a: number) => number;
1298
593
  readonly meshcollection_rtcOffsetZ: (a: number) => number;
1299
594
  readonly meshcollection_totalTriangles: (a: number) => number;
1300
595
  readonly meshcollection_totalVertices: (a: number) => number;
1301
- readonly meshcollectionwithrtc_get: (a: number, b: number) => number;
1302
- readonly meshcollectionwithrtc_meshes: (a: number) => number;
1303
- readonly meshcollectionwithrtc_rtcOffset: (a: number) => number;
1304
596
  readonly meshdatajs_color: (a: number, b: number) => void;
1305
597
  readonly meshdatajs_expressId: (a: number) => number;
1306
598
  readonly meshdatajs_ifcType: (a: number, b: number) => void;
@@ -1321,11 +613,10 @@ export interface InitOutput {
1321
613
  readonly profileentryjs_modelIndex: (a: number) => number;
1322
614
  readonly profileentryjs_outerPoints: (a: number) => number;
1323
615
  readonly profileentryjs_transform: (a: number) => number;
1324
- readonly rtcoffsetjs_isSignificant: (a: number) => number;
1325
- readonly rtcoffsetjs_toWorld: (a: number, b: number, c: number, d: number, e: number) => void;
1326
616
  readonly symboliccircle_centerX: (a: number) => number;
1327
617
  readonly symboliccircle_centerY: (a: number) => number;
1328
618
  readonly symboliccircle_endAngle: (a: number) => number;
619
+ readonly symboliccircle_expressId: (a: number) => number;
1329
620
  readonly symboliccircle_ifcType: (a: number, b: number) => void;
1330
621
  readonly symboliccircle_isFullCircle: (a: number) => number;
1331
622
  readonly symboliccircle_radius: (a: number) => number;
@@ -1341,6 +632,7 @@ export interface InitOutput {
1341
632
  readonly symbolicfillarea_hatchAngleSecondary: (a: number) => number;
1342
633
  readonly symbolicfillarea_hatchLineWidth: (a: number) => number;
1343
634
  readonly symbolicfillarea_hatchSpacing: (a: number) => number;
635
+ readonly symbolicfillarea_holeCount: (a: number) => number;
1344
636
  readonly symbolicfillarea_holesOffsets: (a: number) => number;
1345
637
  readonly symbolicfillarea_ifcType: (a: number, b: number) => void;
1346
638
  readonly symbolicfillarea_pointCount: (a: number) => number;
@@ -1370,47 +662,9 @@ export interface InitOutput {
1370
662
  readonly symbolictext_repIdentifier: (a: number, b: number) => void;
1371
663
  readonly symbolictext_targetPx: (a: number) => number;
1372
664
  readonly version: (a: number) => void;
1373
- readonly zerocopymesh_bounds_max: (a: number, b: number) => void;
1374
- readonly zerocopymesh_bounds_min: (a: number, b: number) => void;
1375
- readonly zerocopymesh_is_empty: (a: number) => number;
1376
- readonly zerocopymesh_new: () => number;
1377
- readonly zerocopymesh_normals_len: (a: number) => number;
1378
- readonly zerocopymesh_positions_len: (a: number) => number;
1379
- readonly zerocopymesh_positions_ptr: (a: number) => number;
1380
- readonly zerocopymesh_vertex_count: (a: number) => number;
1381
665
  readonly init: () => void;
1382
- readonly gpuinstancedgeometryref_indicesLen: (a: number) => number;
1383
- readonly gpuinstancedgeometryref_instanceCount: (a: number) => number;
1384
- readonly gpuinstancedgeometryref_instanceDataLen: (a: number) => number;
1385
- readonly gpuinstancedgeometryref_vertexDataLen: (a: number) => number;
1386
- readonly instancedmeshcollection_length: (a: number) => number;
1387
- readonly instancedmeshcollection_totalGeometries: (a: number) => number;
1388
- readonly meshcollectionwithrtc_length: (a: number) => number;
1389
- readonly symbolicfillarea_holeCount: (a: number) => number;
1390
- readonly zerocopymesh_indices_len: (a: number) => number;
1391
666
  readonly symbolicpolyline_pointCount: (a: number) => number;
1392
- readonly __wbg_set_rtcoffsetjs_x: (a: number, b: number) => void;
1393
- readonly __wbg_set_rtcoffsetjs_y: (a: number, b: number) => void;
1394
- readonly __wbg_set_rtcoffsetjs_z: (a: number, b: number) => void;
1395
- readonly zerocopymesh_triangle_count: (a: number) => number;
1396
667
  readonly get_memory: () => number;
1397
- readonly gpuinstancedgeometryref_indicesPtr: (a: number) => number;
1398
- readonly gpuinstancedgeometryref_instanceDataPtr: (a: number) => number;
1399
- readonly gpuinstancedgeometryref_instanceExpressIdsPtr: (a: number) => number;
1400
- readonly gpuinstancedgeometryref_vertexDataPtr: (a: number) => number;
1401
- readonly zerocopymesh_indices_ptr: (a: number) => number;
1402
- readonly zerocopymesh_normals_ptr: (a: number) => number;
1403
- readonly gpuinstancedgeometrycollection_getRef: (a: number, b: number) => number;
1404
- readonly __wbg_get_rtcoffsetjs_x: (a: number) => number;
1405
- readonly __wbg_get_rtcoffsetjs_y: (a: number) => number;
1406
- readonly __wbg_get_rtcoffsetjs_z: (a: number) => number;
1407
- readonly gpuinstancedgeometryref_indicesByteLength: (a: number) => number;
1408
- readonly gpuinstancedgeometryref_instanceDataByteLength: (a: number) => number;
1409
- readonly gpuinstancedgeometryref_vertexDataByteLength: (a: number) => number;
1410
- readonly gpuinstancedgeometryref_geometryId: (a: number) => bigint;
1411
- readonly instancedgeometry_geometryId: (a: number) => bigint;
1412
- readonly meshcollection_rtcOffsetX: (a: number) => number;
1413
- readonly symboliccircle_expressId: (a: number) => number;
1414
668
  readonly symbolicfillarea_expressId: (a: number) => number;
1415
669
  readonly symbolicpolyline_worldY: (a: number) => number;
1416
670
  readonly symbolictext_colorB: (a: number) => number;
@@ -1423,10 +677,9 @@ export interface InitOutput {
1423
677
  readonly symbolictext_worldY: (a: number) => number;
1424
678
  readonly symbolictext_x: (a: number) => number;
1425
679
  readonly symbolictext_y: (a: number) => number;
1426
- readonly __wbg_gpuinstancedgeometryref_free: (a: number, b: number) => void;
1427
- readonly __wasm_bindgen_func_elem_1568: (a: number, b: number, c: number) => void;
1428
- readonly __wasm_bindgen_func_elem_1567: (a: number, b: number) => void;
1429
- readonly __wasm_bindgen_func_elem_1608: (a: number, b: number, c: number, d: number) => void;
680
+ readonly __wasm_bindgen_func_elem_569: (a: number, b: number, c: number) => void;
681
+ readonly __wasm_bindgen_func_elem_568: (a: number, b: number) => void;
682
+ readonly __wasm_bindgen_func_elem_603: (a: number, b: number, c: number, d: number) => void;
1430
683
  readonly __wbindgen_export: (a: number) => void;
1431
684
  readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
1432
685
  readonly __wbindgen_export3: (a: number, b: number) => number;