@ifc-lite/wasm 1.14.0 → 1.14.2

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,814 +1,888 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
 
4
+ /**
5
+ * Georeferencing information exposed to JavaScript
6
+ */
4
7
  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
- * Eastings (X offset)
22
- */
23
- eastings: number;
24
- /**
25
- * Northings (Y offset)
26
- */
27
- northings: number;
28
- /**
29
- * Orthogonal height (Z offset)
30
- */
31
- orthogonal_height: number;
32
- /**
33
- * X-axis abscissa (cos of rotation)
34
- */
35
- x_axis_abscissa: number;
36
- /**
37
- * X-axis ordinate (sin of rotation)
38
- */
39
- x_axis_ordinate: number;
40
- /**
41
- * Scale factor
42
- */
43
- scale: number;
44
- /**
45
- * Get CRS name
46
- */
47
- readonly crsName: string | undefined;
48
- /**
49
- * Get rotation angle in radians
50
- */
51
- readonly rotation: number;
8
+ private constructor();
9
+ free(): void;
10
+ [Symbol.dispose](): void;
11
+ /**
12
+ * Transform local coordinates to map coordinates
13
+ */
14
+ localToMap(x: number, y: number, z: number): Float64Array;
15
+ /**
16
+ * Transform map coordinates to local coordinates
17
+ */
18
+ mapToLocal(e: number, n: number, h: number): Float64Array;
19
+ /**
20
+ * Get 4x4 transformation matrix (column-major for WebGL)
21
+ */
22
+ toMatrix(): Float64Array;
23
+ /**
24
+ * Get CRS name
25
+ */
26
+ readonly crsName: string | undefined;
27
+ /**
28
+ * Get rotation angle in radians
29
+ */
30
+ readonly rotation: number;
31
+ /**
32
+ * Eastings (X offset)
33
+ */
34
+ eastings: number;
35
+ /**
36
+ * Northings (Y offset)
37
+ */
38
+ northings: number;
39
+ /**
40
+ * Orthogonal height (Z offset)
41
+ */
42
+ orthogonal_height: number;
43
+ /**
44
+ * Scale factor
45
+ */
46
+ scale: number;
47
+ /**
48
+ * X-axis abscissa (cos of rotation)
49
+ */
50
+ x_axis_abscissa: number;
51
+ /**
52
+ * X-axis ordinate (sin of rotation)
53
+ */
54
+ x_axis_ordinate: number;
52
55
  }
53
56
 
57
+ /**
58
+ * GPU-ready geometry stored in WASM linear memory
59
+ *
60
+ * Data layout:
61
+ * - vertex_data: Interleaved [px, py, pz, nx, ny, nz, ...] (6 floats per vertex)
62
+ * - indices: Triangle indices [i0, i1, i2, ...]
63
+ * - mesh_metadata: Per-mesh metadata for draw calls
64
+ *
65
+ * All coordinates are pre-converted from IFC Z-up to WebGL Y-up
66
+ */
54
67
  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;
68
+ free(): void;
69
+ [Symbol.dispose](): void;
70
+ /**
71
+ * Get IFC type name by index
72
+ */
73
+ getIfcTypeName(index: number): string | undefined;
74
+ /**
75
+ * Get metadata for a specific mesh
76
+ */
77
+ getMeshMetadata(index: number): GpuMeshMetadata | undefined;
78
+ /**
79
+ * Create a new empty GPU geometry container
80
+ */
81
+ constructor();
82
+ /**
83
+ * Set the RTC (Relative To Center) offset applied to coordinates
84
+ */
85
+ set_rtc_offset(x: number, y: number, z: number): void;
86
+ /**
87
+ * Check if RTC offset is active (non-zero)
88
+ */
89
+ readonly hasRtcOffset: boolean;
90
+ /**
91
+ * Get byte length of indices (for GPU buffer creation)
92
+ */
93
+ readonly indicesByteLength: number;
94
+ /**
95
+ * Get length of indices array (in u32 elements)
96
+ */
97
+ readonly indicesLen: number;
98
+ /**
99
+ * Get pointer to indices array for zero-copy view
100
+ */
101
+ readonly indicesPtr: number;
102
+ /**
103
+ * Check if geometry is empty
104
+ */
105
+ readonly isEmpty: boolean;
106
+ /**
107
+ * Get number of meshes in this geometry batch
108
+ */
109
+ readonly meshCount: number;
110
+ /**
111
+ * Get X component of RTC offset
112
+ */
113
+ readonly rtcOffsetX: number;
114
+ /**
115
+ * Get Y component of RTC offset
116
+ */
117
+ readonly rtcOffsetY: number;
118
+ /**
119
+ * Get Z component of RTC offset
120
+ */
121
+ readonly rtcOffsetZ: number;
122
+ /**
123
+ * Get total triangle count
124
+ */
125
+ readonly totalTriangleCount: number;
126
+ /**
127
+ * Get total vertex count
128
+ */
129
+ readonly totalVertexCount: number;
130
+ /**
131
+ * Get byte length of vertex data (for GPU buffer creation)
132
+ */
133
+ readonly vertexDataByteLength: number;
134
+ /**
135
+ * Get length of vertex data array (in f32 elements, not bytes)
136
+ */
137
+ readonly vertexDataLen: number;
138
+ /**
139
+ * Get pointer to vertex data for zero-copy view
140
+ *
141
+ * SAFETY: View is only valid until next WASM allocation!
142
+ * Create view, upload to GPU, then discard view immediately.
143
+ */
144
+ readonly vertexDataPtr: number;
132
145
  }
133
146
 
147
+ /**
148
+ * GPU-ready instanced geometry for efficient rendering of repeated shapes
149
+ *
150
+ * Data layout:
151
+ * - vertex_data: Interleaved [px, py, pz, nx, ny, nz, ...] (shared geometry)
152
+ * - indices: Triangle indices (shared geometry)
153
+ * - instance_data: [transform (16 floats) + color (4 floats)] per instance = 20 floats
154
+ */
134
155
  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;
156
+ free(): void;
157
+ [Symbol.dispose](): void;
158
+ /**
159
+ * Create new instanced geometry
160
+ */
161
+ constructor(geometry_id: bigint);
162
+ readonly geometryId: bigint;
163
+ readonly indicesByteLength: number;
164
+ readonly indicesLen: number;
165
+ readonly indicesPtr: number;
166
+ readonly instanceCount: number;
167
+ readonly instanceDataByteLength: number;
168
+ readonly instanceDataLen: number;
169
+ readonly instanceDataPtr: number;
170
+ readonly instanceExpressIdsPtr: number;
171
+ readonly triangleCount: number;
172
+ readonly vertexCount: number;
173
+ readonly vertexDataByteLength: number;
174
+ readonly vertexDataLen: number;
175
+ readonly vertexDataPtr: number;
155
176
  }
156
177
 
178
+ /**
179
+ * Collection of GPU-ready instanced geometries
180
+ */
157
181
  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 zero-copy access
164
- * Returns a reference that provides pointer access
165
- */
166
- getRef(index: number): GpuInstancedGeometryRef | undefined;
167
- readonly length: number;
182
+ free(): void;
183
+ [Symbol.dispose](): void;
184
+ get(index: number): GpuInstancedGeometry | undefined;
185
+ /**
186
+ * Get geometry by index with zero-copy access
187
+ * Returns a reference that provides pointer access
188
+ */
189
+ getRef(index: number): GpuInstancedGeometryRef | undefined;
190
+ constructor();
191
+ readonly length: number;
168
192
  }
169
193
 
194
+ /**
195
+ * Reference to geometry in collection for zero-copy access
196
+ * This avoids cloning when accessing geometry data
197
+ */
170
198
  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;
199
+ private constructor();
200
+ free(): void;
201
+ [Symbol.dispose](): void;
202
+ readonly geometryId: bigint;
203
+ readonly indicesByteLength: number;
204
+ readonly indicesLen: number;
205
+ readonly indicesPtr: number;
206
+ readonly instanceCount: number;
207
+ readonly instanceDataByteLength: number;
208
+ readonly instanceDataLen: number;
209
+ readonly instanceDataPtr: number;
210
+ readonly instanceExpressIdsPtr: number;
211
+ readonly vertexDataByteLength: number;
212
+ readonly vertexDataLen: number;
213
+ readonly vertexDataPtr: number;
186
214
  }
187
215
 
216
+ /**
217
+ * Metadata for a single mesh within the GPU geometry buffer
218
+ */
188
219
  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;
220
+ private constructor();
221
+ free(): void;
222
+ [Symbol.dispose](): void;
223
+ readonly color: Float32Array;
224
+ readonly expressId: number;
225
+ readonly ifcTypeIdx: number;
226
+ readonly indexCount: number;
227
+ readonly indexOffset: number;
228
+ readonly vertexCount: number;
229
+ readonly vertexOffset: number;
199
230
  }
200
231
 
232
+ /**
233
+ * Main IFC-Lite API
234
+ */
201
235
  export class IfcAPI {
202
- free(): void;
203
- [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
- /**
258
- * Parse IFC file and return GPU-ready geometry for zero-copy upload
259
- *
260
- * This method generates geometry that is:
261
- * - Pre-interleaved (position + normal per vertex)
262
- * - Coordinate-converted (Z-up to Y-up)
263
- * - Ready for direct GPU upload via pointer access
264
- *
265
- * Example:
266
- * ```javascript
267
- * const api = new IfcAPI();
268
- * const gpuGeom = api.parseToGpuGeometry(ifcData);
269
- *
270
- * // Get WASM memory for zero-copy views
271
- * const memory = api.getMemory();
272
- *
273
- * // Create views directly into WASM memory (NO COPY!)
274
- * const vertexView = new Float32Array(
275
- * memory.buffer,
276
- * gpuGeom.vertexDataPtr,
277
- * gpuGeom.vertexDataLen
278
- * );
279
- * const indexView = new Uint32Array(
280
- * memory.buffer,
281
- * gpuGeom.indicesPtr,
282
- * gpuGeom.indicesLen
283
- * );
284
- *
285
- * // Upload directly to GPU (single copy: WASM → GPU)
286
- * device.queue.writeBuffer(vertexBuffer, 0, vertexView);
287
- * device.queue.writeBuffer(indexBuffer, 0, indexView);
288
- *
289
- * // Free when done
290
- * gpuGeom.free();
291
- * ```
292
- */
293
- parseToGpuGeometry(content: string): GpuGeometry;
294
- /**
295
- * Parse IFC file and return instanced geometry grouped by geometry hash
296
- * This reduces draw calls by grouping identical geometries with different transforms
297
- *
298
- * Example:
299
- * ```javascript
300
- * const api = new IfcAPI();
301
- * const collection = api.parseMeshesInstanced(ifcData);
302
- * for (let i = 0; i < collection.length; i++) {
303
- * const geometry = collection.get(i);
304
- * console.log('Geometry ID:', geometry.geometryId);
305
- * console.log('Instances:', geometry.instanceCount);
306
- * for (let j = 0; j < geometry.instanceCount; j++) {
307
- * const inst = geometry.getInstance(j);
308
- * console.log(' Express ID:', inst.expressId);
309
- * console.log(' Transform:', inst.transform);
310
- * }
311
- * }
312
- * ```
313
- */
314
- parseMeshesInstanced(content: string): InstancedMeshCollection;
315
- /**
316
- * Parse IFC file with streaming GPU-ready geometry batches
317
- *
318
- * Yields batches of GPU-ready geometry for progressive rendering with zero-copy upload.
319
- * Uses fast-first-frame streaming: simple geometry (walls, slabs) first.
320
- *
321
- * Example:
322
- * ```javascript
323
- * const api = new IfcAPI();
324
- * const memory = api.getMemory();
325
- *
326
- * await api.parseToGpuGeometryAsync(ifcData, {
327
- * batchSize: 25,
328
- * onBatch: (gpuGeom, progress) => {
329
- * // Create zero-copy views
330
- * const vertexView = new Float32Array(
331
- * memory.buffer,
332
- * gpuGeom.vertexDataPtr,
333
- * gpuGeom.vertexDataLen
334
- * );
335
- *
336
- * // Upload to GPU
337
- * device.queue.writeBuffer(vertexBuffer, 0, vertexView);
338
- *
339
- * // IMPORTANT: Free immediately after upload!
340
- * gpuGeom.free();
341
- * },
342
- * onComplete: (stats) => {
343
- * console.log(`Done! ${stats.totalMeshes} meshes`);
344
- * }
345
- * });
346
- * ```
347
- */
348
- parseToGpuGeometryAsync(content: string, options: any): Promise<any>;
349
- /**
350
- * Parse IFC file with streaming instanced geometry batches for progressive rendering
351
- * Groups identical geometries and yields batches of InstancedGeometry
352
- * Uses fast-first-frame streaming: simple geometry (walls, slabs) first
353
- *
354
- * Example:
355
- * ```javascript
356
- * const api = new IfcAPI();
357
- * await api.parseMeshesInstancedAsync(ifcData, {
358
- * batchSize: 25, // Number of unique geometries per batch
359
- * onBatch: (geometries, progress) => {
360
- * for (const geom of geometries) {
361
- * renderer.addInstancedGeometry(geom);
362
- * }
363
- * },
364
- * onComplete: (stats) => {
365
- * console.log(`Done! ${stats.totalGeometries} unique geometries, ${stats.totalInstances} instances`);
366
- * }
367
- * });
368
- * ```
369
- */
370
- parseMeshesInstancedAsync(content: string, options: any): Promise<any>;
371
- /**
372
- * Parse IFC file to GPU-ready instanced geometry for zero-copy upload
373
- *
374
- * Groups identical geometries by hash for efficient GPU instancing.
375
- * Returns a collection of instanced geometries with pointer access.
376
- */
377
- parseToGpuInstancedGeometry(content: string): GpuInstancedGeometryCollection;
378
- /**
379
- * Parse IFC file with zero-copy mesh data
380
- * Maximum performance - returns mesh with direct memory access
381
- *
382
- * Example:
383
- * ```javascript
384
- * const api = new IfcAPI();
385
- * const mesh = await api.parseZeroCopy(ifcData);
386
- *
387
- * // Create TypedArray views (NO COPYING!)
388
- * const memory = await api.getMemory();
389
- * const positions = new Float32Array(
390
- * memory.buffer,
391
- * mesh.positions_ptr,
392
- * mesh.positions_len
393
- * );
394
- *
395
- * // Upload directly to GPU
396
- * gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);
397
- * ```
398
- */
399
- parseZeroCopy(content: string): ZeroCopyMesh;
400
- /**
401
- * Debug: Test processing entity #953 (FacetedBrep wall)
402
- */
403
- debugProcessEntity953(content: string): string;
404
- /**
405
- * Debug: Test processing a single wall
406
- */
407
- debugProcessFirstWall(content: string): string;
408
- /**
409
- * Extract georeferencing information from IFC content
410
- * Returns null if no georeferencing is present
411
- *
412
- * Example:
413
- * ```javascript
414
- * const api = new IfcAPI();
415
- * const georef = api.getGeoReference(ifcData);
416
- * if (georef) {
417
- * console.log('CRS:', georef.crsName);
418
- * const [e, n, h] = georef.localToMap(10, 20, 5);
419
- * }
420
- * ```
421
- */
422
- getGeoReference(content: string): GeoReferenceJs | undefined;
423
- /**
424
- * Parse IFC file and return mesh with RTC offset for large coordinates
425
- * This handles georeferenced models by shifting to centroid
426
- *
427
- * Example:
428
- * ```javascript
429
- * const api = new IfcAPI();
430
- * const result = api.parseMeshesWithRtc(ifcData);
431
- * const rtcOffset = result.rtcOffset;
432
- * const meshes = result.meshes;
433
- *
434
- * // Convert local coords back to world:
435
- * if (rtcOffset.isSignificant()) {
436
- * const [wx, wy, wz] = rtcOffset.toWorld(localX, localY, localZ);
437
- * }
438
- * ```
439
- */
440
- parseMeshesWithRtc(content: string): MeshCollectionWithRtc;
441
- /**
442
- * Parse IFC file with streaming events
443
- * Calls the callback function for each parse event
444
- *
445
- * Example:
446
- * ```javascript
447
- * const api = new IfcAPI();
448
- * await api.parseStreaming(ifcData, (event) => {
449
- * console.log('Event:', event);
450
- * });
451
- * ```
452
- */
453
- parseStreaming(content: string, callback: Function): Promise<any>;
454
- /**
455
- * Fast entity scanning using SIMD-accelerated Rust scanner
456
- * Returns array of entity references for data model parsing
457
- * Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
458
- */
459
- scanEntitiesFast(content: string): any;
460
- /**
461
- * Fast geometry-only entity scanning
462
- * Scans only entities that have geometry, skipping 99% of non-geometry entities
463
- * Returns array of geometry entity references for parallel processing
464
- * Much faster than scanning all entities (3x speedup for large files)
465
- */
466
- scanGeometryEntitiesFast(content: string): any;
467
- /**
468
- * Parse IFC file (traditional - waits for completion)
469
- *
470
- * Example:
471
- * ```javascript
472
- * const api = new IfcAPI();
473
- * const result = await api.parse(ifcData);
474
- * console.log('Entities:', result.entityCount);
475
- * ```
476
- */
477
- parse(content: string): Promise<any>;
478
- /**
479
- * Get WASM memory for zero-copy access
480
- */
481
- getMemory(): any;
482
- /**
483
- * Create and initialize the IFC API
484
- */
485
- constructor();
486
- /**
487
- * Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
488
- * These are 2D curves used for architectural drawings instead of sectioning 3D geometry
489
- *
490
- * Example:
491
- * ```javascript
492
- * const api = new IfcAPI();
493
- * const symbols = api.parseSymbolicRepresentations(ifcData);
494
- * console.log('Found', symbols.totalCount, 'symbolic items');
495
- * for (let i = 0; i < symbols.polylineCount; i++) {
496
- * const polyline = symbols.getPolyline(i);
497
- * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
498
- * }
499
- * ```
500
- */
501
- parseSymbolicRepresentations(content: string): SymbolicRepresentationCollection;
502
- /**
503
- * Get version string
504
- */
505
- readonly version: string;
506
- /**
507
- * Check if API is initialized
508
- */
509
- readonly is_ready: boolean;
236
+ free(): void;
237
+ [Symbol.dispose](): void;
238
+ /**
239
+ * Debug: Test processing entity #953 (FacetedBrep wall)
240
+ */
241
+ debugProcessEntity953(content: string): string;
242
+ /**
243
+ * Debug: Test processing a single wall
244
+ */
245
+ debugProcessFirstWall(content: string): string;
246
+ /**
247
+ * Extract georeferencing information from IFC content
248
+ * Returns null if no georeferencing is present
249
+ *
250
+ * Example:
251
+ * ```javascript
252
+ * const api = new IfcAPI();
253
+ * const georef = api.getGeoReference(ifcData);
254
+ * if (georef) {
255
+ * console.log('CRS:', georef.crsName);
256
+ * const [e, n, h] = georef.localToMap(10, 20, 5);
257
+ * }
258
+ * ```
259
+ */
260
+ getGeoReference(content: string): GeoReferenceJs | undefined;
261
+ /**
262
+ * Get WASM memory for zero-copy access
263
+ */
264
+ getMemory(): any;
265
+ /**
266
+ * Create and initialize the IFC API
267
+ */
268
+ constructor();
269
+ /**
270
+ * Parse IFC file (traditional - waits for completion)
271
+ *
272
+ * Example:
273
+ * ```javascript
274
+ * const api = new IfcAPI();
275
+ * const result = await api.parse(ifcData);
276
+ * console.log('Entities:', result.entityCount);
277
+ * ```
278
+ */
279
+ parse(content: string): Promise<any>;
280
+ /**
281
+ * Parse IFC file and return individual meshes with express IDs and colors
282
+ * This matches the MeshData[] format expected by the viewer
283
+ *
284
+ * Example:
285
+ * ```javascript
286
+ * const api = new IfcAPI();
287
+ * const collection = api.parseMeshes(ifcData);
288
+ * for (let i = 0; i < collection.length; i++) {
289
+ * const mesh = collection.get(i);
290
+ * console.log('Express ID:', mesh.expressId);
291
+ * console.log('Positions:', mesh.positions);
292
+ * console.log('Color:', mesh.color);
293
+ * }
294
+ * ```
295
+ */
296
+ parseMeshes(content: string): MeshCollection;
297
+ /**
298
+ * Parse IFC file with streaming mesh batches for progressive rendering
299
+ * Calls the callback with batches of meshes, yielding to browser between batches
300
+ *
301
+ * Options:
302
+ * - `batchSize`: Number of meshes per batch (default: 25)
303
+ * - `onBatch(meshes, progress)`: Called for each batch of meshes
304
+ * - `onRtcOffset({x, y, z, hasRtc})`: Called early with RTC offset for camera/world setup
305
+ * - `onColorUpdate(Map<id, color>)`: Called with style updates after initial render
306
+ * - `onComplete(stats)`: Called when parsing completes with stats including rtcOffset
307
+ *
308
+ * Example:
309
+ * ```javascript
310
+ * const api = new IfcAPI();
311
+ * await api.parseMeshesAsync(ifcData, {
312
+ * batchSize: 100,
313
+ * onRtcOffset: (rtc) => {
314
+ * if (rtc.hasRtc) {
315
+ * // Model uses large coordinates - adjust camera/world origin
316
+ * viewer.setWorldOffset(rtc.x, rtc.y, rtc.z);
317
+ * }
318
+ * },
319
+ * onBatch: (meshes, progress) => {
320
+ * for (const mesh of meshes) {
321
+ * scene.add(createThreeMesh(mesh));
322
+ * }
323
+ * console.log(`Progress: ${progress.percent}%`);
324
+ * },
325
+ * onComplete: (stats) => {
326
+ * console.log(`Done! ${stats.totalMeshes} meshes`);
327
+ * // stats.rtcOffset also available here: {x, y, z, hasRtc}
328
+ * }
329
+ * });
330
+ * ```
331
+ */
332
+ parseMeshesAsync(content: string, options: any): Promise<any>;
333
+ /**
334
+ * Parse IFC file and return instanced geometry grouped by geometry hash
335
+ * This reduces draw calls by grouping identical geometries with different transforms
336
+ *
337
+ * Example:
338
+ * ```javascript
339
+ * const api = new IfcAPI();
340
+ * const collection = api.parseMeshesInstanced(ifcData);
341
+ * for (let i = 0; i < collection.length; i++) {
342
+ * const geometry = collection.get(i);
343
+ * console.log('Geometry ID:', geometry.geometryId);
344
+ * console.log('Instances:', geometry.instanceCount);
345
+ * for (let j = 0; j < geometry.instanceCount; j++) {
346
+ * const inst = geometry.getInstance(j);
347
+ * console.log(' Express ID:', inst.expressId);
348
+ * console.log(' Transform:', inst.transform);
349
+ * }
350
+ * }
351
+ * ```
352
+ */
353
+ parseMeshesInstanced(content: string): InstancedMeshCollection;
354
+ /**
355
+ * Parse IFC file with streaming instanced geometry batches for progressive rendering
356
+ * Groups identical geometries and yields batches of InstancedGeometry
357
+ * Uses fast-first-frame streaming: simple geometry (walls, slabs) first
358
+ *
359
+ * Example:
360
+ * ```javascript
361
+ * const api = new IfcAPI();
362
+ * await api.parseMeshesInstancedAsync(ifcData, {
363
+ * batchSize: 25, // Number of unique geometries per batch
364
+ * onBatch: (geometries, progress) => {
365
+ * for (const geom of geometries) {
366
+ * renderer.addInstancedGeometry(geom);
367
+ * }
368
+ * },
369
+ * onComplete: (stats) => {
370
+ * console.log(`Done! ${stats.totalGeometries} unique geometries, ${stats.totalInstances} instances`);
371
+ * }
372
+ * });
373
+ * ```
374
+ */
375
+ parseMeshesInstancedAsync(content: string, options: any): Promise<any>;
376
+ /**
377
+ * Parse IFC file and return mesh with RTC offset for large coordinates
378
+ * This handles georeferenced models by shifting to centroid
379
+ *
380
+ * Example:
381
+ * ```javascript
382
+ * const api = new IfcAPI();
383
+ * const result = api.parseMeshesWithRtc(ifcData);
384
+ * const rtcOffset = result.rtcOffset;
385
+ * const meshes = result.meshes;
386
+ *
387
+ * // Convert local coords back to world:
388
+ * if (rtcOffset.isSignificant()) {
389
+ * const [wx, wy, wz] = rtcOffset.toWorld(localX, localY, localZ);
390
+ * }
391
+ * ```
392
+ */
393
+ parseMeshesWithRtc(content: string): MeshCollectionWithRtc;
394
+ /**
395
+ * Parse IFC file with streaming events
396
+ * Calls the callback function for each parse event
397
+ *
398
+ * Example:
399
+ * ```javascript
400
+ * const api = new IfcAPI();
401
+ * await api.parseStreaming(ifcData, (event) => {
402
+ * console.log('Event:', event);
403
+ * });
404
+ * ```
405
+ */
406
+ parseStreaming(content: string, callback: Function): Promise<any>;
407
+ /**
408
+ * Parse IFC file and extract symbolic representations (Plan, Annotation, FootPrint)
409
+ * These are 2D curves used for architectural drawings instead of sectioning 3D geometry
410
+ *
411
+ * Example:
412
+ * ```javascript
413
+ * const api = new IfcAPI();
414
+ * const symbols = api.parseSymbolicRepresentations(ifcData);
415
+ * console.log('Found', symbols.totalCount, 'symbolic items');
416
+ * for (let i = 0; i < symbols.polylineCount; i++) {
417
+ * const polyline = symbols.getPolyline(i);
418
+ * console.log('Polyline for', polyline.ifcType, ':', polyline.points);
419
+ * }
420
+ * ```
421
+ */
422
+ parseSymbolicRepresentations(content: string): SymbolicRepresentationCollection;
423
+ /**
424
+ * Parse IFC file and return GPU-ready geometry for zero-copy upload
425
+ *
426
+ * This method generates geometry that is:
427
+ * - Pre-interleaved (position + normal per vertex)
428
+ * - Coordinate-converted (Z-up to Y-up)
429
+ * - Ready for direct GPU upload via pointer access
430
+ *
431
+ * Example:
432
+ * ```javascript
433
+ * const api = new IfcAPI();
434
+ * const gpuGeom = api.parseToGpuGeometry(ifcData);
435
+ *
436
+ * // Get WASM memory for zero-copy views
437
+ * const memory = api.getMemory();
438
+ *
439
+ * // Create views directly into WASM memory (NO COPY!)
440
+ * const vertexView = new Float32Array(
441
+ * memory.buffer,
442
+ * gpuGeom.vertexDataPtr,
443
+ * gpuGeom.vertexDataLen
444
+ * );
445
+ * const indexView = new Uint32Array(
446
+ * memory.buffer,
447
+ * gpuGeom.indicesPtr,
448
+ * gpuGeom.indicesLen
449
+ * );
450
+ *
451
+ * // Upload directly to GPU (single copy: WASM → GPU)
452
+ * device.queue.writeBuffer(vertexBuffer, 0, vertexView);
453
+ * device.queue.writeBuffer(indexBuffer, 0, indexView);
454
+ *
455
+ * // Free when done
456
+ * gpuGeom.free();
457
+ * ```
458
+ */
459
+ parseToGpuGeometry(content: string): GpuGeometry;
460
+ /**
461
+ * Parse IFC file with streaming GPU-ready geometry batches
462
+ *
463
+ * Yields batches of GPU-ready geometry for progressive rendering with zero-copy upload.
464
+ * Uses fast-first-frame streaming: simple geometry (walls, slabs) first.
465
+ *
466
+ * Example:
467
+ * ```javascript
468
+ * const api = new IfcAPI();
469
+ * const memory = api.getMemory();
470
+ *
471
+ * await api.parseToGpuGeometryAsync(ifcData, {
472
+ * batchSize: 25,
473
+ * onBatch: (gpuGeom, progress) => {
474
+ * // Create zero-copy views
475
+ * const vertexView = new Float32Array(
476
+ * memory.buffer,
477
+ * gpuGeom.vertexDataPtr,
478
+ * gpuGeom.vertexDataLen
479
+ * );
480
+ *
481
+ * // Upload to GPU
482
+ * device.queue.writeBuffer(vertexBuffer, 0, vertexView);
483
+ *
484
+ * // IMPORTANT: Free immediately after upload!
485
+ * gpuGeom.free();
486
+ * },
487
+ * onComplete: (stats) => {
488
+ * console.log(`Done! ${stats.totalMeshes} meshes`);
489
+ * }
490
+ * });
491
+ * ```
492
+ */
493
+ parseToGpuGeometryAsync(content: string, options: any): Promise<any>;
494
+ /**
495
+ * Parse IFC file to GPU-ready instanced geometry for zero-copy upload
496
+ *
497
+ * Groups identical geometries by hash for efficient GPU instancing.
498
+ * Returns a collection of instanced geometries with pointer access.
499
+ */
500
+ parseToGpuInstancedGeometry(content: string): GpuInstancedGeometryCollection;
501
+ /**
502
+ * Parse IFC file with zero-copy mesh data
503
+ * Maximum performance - returns mesh with direct memory access
504
+ *
505
+ * Example:
506
+ * ```javascript
507
+ * const api = new IfcAPI();
508
+ * const mesh = await api.parseZeroCopy(ifcData);
509
+ *
510
+ * // Create TypedArray views (NO COPYING!)
511
+ * const memory = await api.getMemory();
512
+ * const positions = new Float32Array(
513
+ * memory.buffer,
514
+ * mesh.positions_ptr,
515
+ * mesh.positions_len
516
+ * );
517
+ *
518
+ * // Upload directly to GPU
519
+ * gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);
520
+ * ```
521
+ */
522
+ parseZeroCopy(content: string): ZeroCopyMesh;
523
+ /**
524
+ * Fast entity scanning using SIMD-accelerated Rust scanner
525
+ * Returns array of entity references for data model parsing
526
+ * Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
527
+ */
528
+ scanEntitiesFast(content: string): any;
529
+ /**
530
+ * Fast entity scanning from raw bytes (avoids TextDecoder.decode on JS side).
531
+ * Accepts Uint8Array directly — saves ~2-5s for 487MB files by skipping
532
+ * JS string creation and UTF-16→UTF-8 conversion.
533
+ */
534
+ scanEntitiesFastBytes(data: Uint8Array): any;
535
+ /**
536
+ * Fast geometry-only entity scanning
537
+ * Scans only entities that have geometry, skipping 99% of non-geometry entities
538
+ * Returns array of geometry entity references for parallel processing
539
+ * Much faster than scanning all entities (3x speedup for large files)
540
+ */
541
+ scanGeometryEntitiesFast(content: string): any;
542
+ /**
543
+ * Check if API is initialized
544
+ */
545
+ readonly is_ready: boolean;
546
+ /**
547
+ * Get version string
548
+ */
549
+ readonly version: string;
510
550
  }
511
551
 
552
+ /**
553
+ * Instance data for instanced rendering
554
+ */
512
555
  export class InstanceData {
513
- private constructor();
514
- free(): void;
515
- [Symbol.dispose](): void;
516
- readonly expressId: number;
517
- readonly color: Float32Array;
518
- readonly transform: Float32Array;
556
+ private constructor();
557
+ free(): void;
558
+ [Symbol.dispose](): void;
559
+ readonly color: Float32Array;
560
+ readonly expressId: number;
561
+ readonly transform: Float32Array;
519
562
  }
520
563
 
564
+ /**
565
+ * Instanced geometry - one geometry definition with multiple instances
566
+ */
521
567
  export class InstancedGeometry {
522
- private constructor();
523
- free(): void;
524
- [Symbol.dispose](): void;
525
- get_instance(index: number): InstanceData | undefined;
526
- readonly geometryId: bigint;
527
- readonly instance_count: number;
528
- readonly indices: Uint32Array;
529
- readonly normals: Float32Array;
530
- readonly positions: Float32Array;
568
+ private constructor();
569
+ free(): void;
570
+ [Symbol.dispose](): void;
571
+ get_instance(index: number): InstanceData | undefined;
572
+ readonly geometryId: bigint;
573
+ readonly indices: Uint32Array;
574
+ readonly instance_count: number;
575
+ readonly normals: Float32Array;
576
+ readonly positions: Float32Array;
531
577
  }
532
578
 
579
+ /**
580
+ * Collection of instanced geometries
581
+ */
533
582
  export class InstancedMeshCollection {
534
- private constructor();
535
- free(): void;
536
- [Symbol.dispose](): void;
537
- get(index: number): InstancedGeometry | undefined;
538
- readonly totalInstances: number;
539
- readonly totalGeometries: number;
540
- readonly length: number;
583
+ private constructor();
584
+ free(): void;
585
+ [Symbol.dispose](): void;
586
+ get(index: number): InstancedGeometry | undefined;
587
+ readonly length: number;
588
+ readonly totalGeometries: number;
589
+ readonly totalInstances: number;
541
590
  }
542
591
 
592
+ /**
593
+ * Collection of mesh data for returning multiple meshes
594
+ */
543
595
  export class MeshCollection {
544
- private constructor();
545
- free(): void;
546
- [Symbol.dispose](): void;
547
- /**
548
- * Check if RTC offset is significant (>10km)
549
- */
550
- hasRtcOffset(): boolean;
551
- /**
552
- * Convert local coordinates to world coordinates
553
- * Use this to convert mesh positions back to original IFC coordinates
554
- */
555
- localToWorld(x: number, y: number, z: number): Float64Array;
556
- /**
557
- * Get mesh at index
558
- */
559
- get(index: number): MeshDataJs | undefined;
560
- /**
561
- * Get RTC offset X (for converting local coords back to world coords)
562
- * Add this to local X coordinates to get world X coordinates
563
- */
564
- readonly rtcOffsetX: number;
565
- /**
566
- * Get RTC offset Y
567
- */
568
- readonly rtcOffsetY: number;
569
- /**
570
- * Get RTC offset Z
571
- */
572
- readonly rtcOffsetZ: number;
573
- /**
574
- * Get total vertex count across all meshes
575
- */
576
- readonly totalVertices: number;
577
- /**
578
- * Get total triangle count across all meshes
579
- */
580
- readonly totalTriangles: number;
581
- /**
582
- * Get building rotation angle in radians (from IfcSite placement)
583
- * Returns None if no rotation was detected
584
- */
585
- readonly buildingRotation: number | undefined;
586
- /**
587
- * Get number of meshes
588
- */
589
- readonly length: number;
596
+ private constructor();
597
+ free(): void;
598
+ [Symbol.dispose](): void;
599
+ /**
600
+ * Get mesh at index
601
+ */
602
+ get(index: number): MeshDataJs | undefined;
603
+ /**
604
+ * Check if RTC offset is significant (>10km)
605
+ */
606
+ hasRtcOffset(): boolean;
607
+ /**
608
+ * Convert local coordinates to world coordinates
609
+ * Use this to convert mesh positions back to original IFC coordinates
610
+ */
611
+ localToWorld(x: number, y: number, z: number): Float64Array;
612
+ /**
613
+ * Get building rotation angle in radians (from IfcSite placement)
614
+ * Returns None if no rotation was detected
615
+ */
616
+ readonly buildingRotation: number | undefined;
617
+ /**
618
+ * Get number of meshes
619
+ */
620
+ readonly length: number;
621
+ /**
622
+ * Get RTC offset X (for converting local coords back to world coords)
623
+ * Add this to local X coordinates to get world X coordinates
624
+ */
625
+ readonly rtcOffsetX: number;
626
+ /**
627
+ * Get RTC offset Y
628
+ */
629
+ readonly rtcOffsetY: number;
630
+ /**
631
+ * Get RTC offset Z
632
+ */
633
+ readonly rtcOffsetZ: number;
634
+ /**
635
+ * Get total triangle count across all meshes
636
+ */
637
+ readonly totalTriangles: number;
638
+ /**
639
+ * Get total vertex count across all meshes
640
+ */
641
+ readonly totalVertices: number;
590
642
  }
591
643
 
644
+ /**
645
+ * Mesh collection with RTC offset for large coordinates
646
+ */
592
647
  export class MeshCollectionWithRtc {
593
- private constructor();
594
- free(): void;
595
- [Symbol.dispose](): void;
596
- /**
597
- * Get mesh at index
598
- */
599
- get(index: number): MeshDataJs | undefined;
600
- /**
601
- * Get the RTC offset
602
- */
603
- readonly rtcOffset: RtcOffsetJs;
604
- /**
605
- * Get number of meshes
606
- */
607
- readonly length: number;
608
- /**
609
- * Get the mesh collection
610
- */
611
- readonly meshes: MeshCollection;
648
+ private constructor();
649
+ free(): void;
650
+ [Symbol.dispose](): void;
651
+ /**
652
+ * Get mesh at index
653
+ */
654
+ get(index: number): MeshDataJs | undefined;
655
+ /**
656
+ * Get number of meshes
657
+ */
658
+ readonly length: number;
659
+ /**
660
+ * Get the mesh collection
661
+ */
662
+ readonly meshes: MeshCollection;
663
+ /**
664
+ * Get the RTC offset
665
+ */
666
+ readonly rtcOffset: RtcOffsetJs;
612
667
  }
613
668
 
669
+ /**
670
+ * Individual mesh data with express ID and color (matches MeshData interface)
671
+ */
614
672
  export class MeshDataJs {
615
- private constructor();
616
- free(): void;
617
- [Symbol.dispose](): void;
618
- /**
619
- * Get express ID
620
- */
621
- readonly expressId: number;
622
- /**
623
- * Get vertex count
624
- */
625
- readonly vertexCount: number;
626
- /**
627
- * Get triangle count
628
- */
629
- readonly triangleCount: number;
630
- /**
631
- * Get color as [r, g, b, a] array
632
- */
633
- readonly color: Float32Array;
634
- /**
635
- * Get indices as Uint32Array (copy to JS)
636
- */
637
- readonly indices: Uint32Array;
638
- /**
639
- * Get normals as Float32Array (copy to JS)
640
- */
641
- readonly normals: Float32Array;
642
- /**
643
- * Get IFC type name (e.g., "IfcWall", "IfcSpace")
644
- */
645
- readonly ifcType: string;
646
- /**
647
- * Get positions as Float32Array (copy to JS)
648
- */
649
- readonly positions: Float32Array;
673
+ private constructor();
674
+ free(): void;
675
+ [Symbol.dispose](): void;
676
+ /**
677
+ * Get color as [r, g, b, a] array
678
+ */
679
+ readonly color: Float32Array;
680
+ /**
681
+ * Get express ID
682
+ */
683
+ readonly expressId: number;
684
+ /**
685
+ * Get IFC type name (e.g., "IfcWall", "IfcSpace")
686
+ */
687
+ readonly ifcType: string;
688
+ /**
689
+ * Get indices as Uint32Array (copy to JS)
690
+ */
691
+ readonly indices: Uint32Array;
692
+ /**
693
+ * Get normals as Float32Array (copy to JS)
694
+ */
695
+ readonly normals: Float32Array;
696
+ /**
697
+ * Get positions as Float32Array (copy to JS)
698
+ */
699
+ readonly positions: Float32Array;
700
+ /**
701
+ * Get triangle count
702
+ */
703
+ readonly triangleCount: number;
704
+ /**
705
+ * Get vertex count
706
+ */
707
+ readonly vertexCount: number;
650
708
  }
651
709
 
710
+ /**
711
+ * RTC offset information exposed to JavaScript
712
+ */
652
713
  export class RtcOffsetJs {
653
- private constructor();
654
- free(): void;
655
- [Symbol.dispose](): void;
656
- /**
657
- * Check if offset is significant (>10km)
658
- */
659
- isSignificant(): boolean;
660
- /**
661
- * Convert local coordinates to world coordinates
662
- */
663
- toWorld(x: number, y: number, z: number): Float64Array;
664
- /**
665
- * X offset (subtracted from positions)
666
- */
667
- x: number;
668
- /**
669
- * Y offset
670
- */
671
- y: number;
672
- /**
673
- * Z offset
674
- */
675
- z: number;
714
+ private constructor();
715
+ free(): void;
716
+ [Symbol.dispose](): void;
717
+ /**
718
+ * Check if offset is significant (>10km)
719
+ */
720
+ isSignificant(): boolean;
721
+ /**
722
+ * Convert local coordinates to world coordinates
723
+ */
724
+ toWorld(x: number, y: number, z: number): Float64Array;
725
+ /**
726
+ * X offset (subtracted from positions)
727
+ */
728
+ x: number;
729
+ /**
730
+ * Y offset
731
+ */
732
+ y: number;
733
+ /**
734
+ * Z offset
735
+ */
736
+ z: number;
676
737
  }
677
738
 
739
+ /**
740
+ * A 2D circle/arc for symbolic representations
741
+ */
678
742
  export class SymbolicCircle {
679
- private constructor();
680
- free(): void;
681
- [Symbol.dispose](): void;
682
- readonly expressId: number;
683
- readonly startAngle: number;
684
- /**
685
- * Check if this is a full circle
686
- */
687
- readonly isFullCircle: boolean;
688
- readonly repIdentifier: string;
689
- readonly radius: number;
690
- readonly centerX: number;
691
- readonly centerY: number;
692
- readonly ifcType: string;
693
- readonly endAngle: number;
743
+ private constructor();
744
+ free(): void;
745
+ [Symbol.dispose](): void;
746
+ readonly centerX: number;
747
+ readonly centerY: number;
748
+ readonly endAngle: number;
749
+ readonly expressId: number;
750
+ readonly ifcType: string;
751
+ /**
752
+ * Check if this is a full circle
753
+ */
754
+ readonly isFullCircle: boolean;
755
+ readonly radius: number;
756
+ readonly repIdentifier: string;
757
+ readonly startAngle: number;
694
758
  }
695
759
 
760
+ /**
761
+ * A single 2D polyline for symbolic representations (Plan, Annotation, FootPrint)
762
+ * Points are stored as [x1, y1, x2, y2, ...] in 2D coordinates
763
+ */
696
764
  export class SymbolicPolyline {
697
- private constructor();
698
- free(): void;
699
- [Symbol.dispose](): void;
700
- /**
701
- * Get express ID of the parent element
702
- */
703
- readonly expressId: number;
704
- /**
705
- * Get number of points
706
- */
707
- readonly pointCount: number;
708
- /**
709
- * Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
710
- */
711
- readonly repIdentifier: string;
712
- /**
713
- * Get 2D points as Float32Array [x1, y1, x2, y2, ...]
714
- */
715
- readonly points: Float32Array;
716
- /**
717
- * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
718
- */
719
- readonly ifcType: string;
720
- /**
721
- * Check if this is a closed loop
722
- */
723
- readonly isClosed: boolean;
765
+ private constructor();
766
+ free(): void;
767
+ [Symbol.dispose](): void;
768
+ /**
769
+ * Get express ID of the parent element
770
+ */
771
+ readonly expressId: number;
772
+ /**
773
+ * Get IFC type name (e.g., "IfcDoor", "IfcWindow")
774
+ */
775
+ readonly ifcType: string;
776
+ /**
777
+ * Check if this is a closed loop
778
+ */
779
+ readonly isClosed: boolean;
780
+ /**
781
+ * Get number of points
782
+ */
783
+ readonly pointCount: number;
784
+ /**
785
+ * Get 2D points as Float32Array [x1, y1, x2, y2, ...]
786
+ */
787
+ readonly points: Float32Array;
788
+ /**
789
+ * Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
790
+ */
791
+ readonly repIdentifier: string;
724
792
  }
725
793
 
794
+ /**
795
+ * Collection of symbolic representations for an IFC model
796
+ */
726
797
  export class SymbolicRepresentationCollection {
727
- private constructor();
728
- free(): void;
729
- [Symbol.dispose](): void;
730
- /**
731
- * Get circle at index
732
- */
733
- getCircle(index: number): SymbolicCircle | undefined;
734
- /**
735
- * Get polyline at index
736
- */
737
- getPolyline(index: number): SymbolicPolyline | undefined;
738
- /**
739
- * Get all express IDs that have symbolic representations
740
- */
741
- getExpressIds(): Uint32Array;
742
- /**
743
- * Get total count of all symbolic items
744
- */
745
- readonly totalCount: number;
746
- /**
747
- * Get number of circles/arcs
748
- */
749
- readonly circleCount: number;
750
- /**
751
- * Get number of polylines
752
- */
753
- readonly polylineCount: number;
754
- /**
755
- * Check if collection is empty
756
- */
757
- readonly isEmpty: boolean;
798
+ private constructor();
799
+ free(): void;
800
+ [Symbol.dispose](): void;
801
+ /**
802
+ * Get circle at index
803
+ */
804
+ getCircle(index: number): SymbolicCircle | undefined;
805
+ /**
806
+ * Get all express IDs that have symbolic representations
807
+ */
808
+ getExpressIds(): Uint32Array;
809
+ /**
810
+ * Get polyline at index
811
+ */
812
+ getPolyline(index: number): SymbolicPolyline | undefined;
813
+ /**
814
+ * Get number of circles/arcs
815
+ */
816
+ readonly circleCount: number;
817
+ /**
818
+ * Check if collection is empty
819
+ */
820
+ readonly isEmpty: boolean;
821
+ /**
822
+ * Get number of polylines
823
+ */
824
+ readonly polylineCount: number;
825
+ /**
826
+ * Get total count of all symbolic items
827
+ */
828
+ readonly totalCount: number;
758
829
  }
759
830
 
831
+ /**
832
+ * Zero-copy mesh that exposes pointers to WASM memory
833
+ */
760
834
  export class ZeroCopyMesh {
761
- free(): void;
762
- [Symbol.dispose](): void;
763
- /**
764
- * Get bounding box maximum point
765
- */
766
- bounds_max(): Float32Array;
767
- /**
768
- * Get bounding box minimum point
769
- */
770
- bounds_min(): Float32Array;
771
- /**
772
- * Create a new zero-copy mesh from a Mesh
773
- */
774
- constructor();
775
- /**
776
- * Get length of indices array
777
- */
778
- readonly indices_len: number;
779
- /**
780
- * Get pointer to indices array
781
- */
782
- readonly indices_ptr: number;
783
- /**
784
- * Get length of normals array
785
- */
786
- readonly normals_len: number;
787
- /**
788
- * Get pointer to normals array
789
- */
790
- readonly normals_ptr: number;
791
- /**
792
- * Get vertex count
793
- */
794
- readonly vertex_count: number;
795
- /**
796
- * Get length of positions array (in f32 elements, not bytes)
797
- */
798
- readonly positions_len: number;
799
- /**
800
- * Get pointer to positions array
801
- * JavaScript can create Float32Array view: new Float32Array(memory.buffer, ptr, length)
802
- */
803
- readonly positions_ptr: number;
804
- /**
805
- * Get triangle count
806
- */
807
- readonly triangle_count: number;
808
- /**
809
- * Check if mesh is empty
810
- */
811
- readonly is_empty: boolean;
835
+ free(): void;
836
+ [Symbol.dispose](): void;
837
+ /**
838
+ * Get bounding box maximum point
839
+ */
840
+ bounds_max(): Float32Array;
841
+ /**
842
+ * Get bounding box minimum point
843
+ */
844
+ bounds_min(): Float32Array;
845
+ /**
846
+ * Create a new zero-copy mesh from a Mesh
847
+ */
848
+ constructor();
849
+ /**
850
+ * Get length of indices array
851
+ */
852
+ readonly indices_len: number;
853
+ /**
854
+ * Get pointer to indices array
855
+ */
856
+ readonly indices_ptr: number;
857
+ /**
858
+ * Check if mesh is empty
859
+ */
860
+ readonly is_empty: boolean;
861
+ /**
862
+ * Get length of normals array
863
+ */
864
+ readonly normals_len: number;
865
+ /**
866
+ * Get pointer to normals array
867
+ */
868
+ readonly normals_ptr: number;
869
+ /**
870
+ * Get length of positions array (in f32 elements, not bytes)
871
+ */
872
+ readonly positions_len: number;
873
+ /**
874
+ * Get pointer to positions array
875
+ * JavaScript can create Float32Array view: new Float32Array(memory.buffer, ptr, length)
876
+ */
877
+ readonly positions_ptr: number;
878
+ /**
879
+ * Get triangle count
880
+ */
881
+ readonly triangle_count: number;
882
+ /**
883
+ * Get vertex count
884
+ */
885
+ readonly vertex_count: number;
812
886
  }
813
887
 
814
888
  /**
@@ -842,230 +916,231 @@ export function version(): string;
842
916
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
843
917
 
844
918
  export interface InitOutput {
845
- readonly memory: WebAssembly.Memory;
846
- readonly __wbg_georeferencejs_free: (a: number, b: number) => void;
847
- readonly __wbg_get_georeferencejs_eastings: (a: number) => number;
848
- readonly __wbg_get_georeferencejs_northings: (a: number) => number;
849
- readonly __wbg_get_georeferencejs_orthogonal_height: (a: number) => number;
850
- readonly __wbg_get_georeferencejs_scale: (a: number) => number;
851
- readonly __wbg_get_georeferencejs_x_axis_abscissa: (a: number) => number;
852
- readonly __wbg_get_georeferencejs_x_axis_ordinate: (a: number) => number;
853
- readonly __wbg_gpugeometry_free: (a: number, b: number) => void;
854
- readonly __wbg_gpuinstancedgeometry_free: (a: number, b: number) => void;
855
- readonly __wbg_gpuinstancedgeometrycollection_free: (a: number, b: number) => void;
856
- readonly __wbg_gpuinstancedgeometryref_free: (a: number, b: number) => void;
857
- readonly __wbg_gpumeshmetadata_free: (a: number, b: number) => void;
858
- readonly __wbg_ifcapi_free: (a: number, b: number) => void;
859
- readonly __wbg_instancedata_free: (a: number, b: number) => void;
860
- readonly __wbg_instancedgeometry_free: (a: number, b: number) => void;
861
- readonly __wbg_instancedmeshcollection_free: (a: number, b: number) => void;
862
- readonly __wbg_meshcollection_free: (a: number, b: number) => void;
863
- readonly __wbg_meshcollectionwithrtc_free: (a: number, b: number) => void;
864
- readonly __wbg_meshdatajs_free: (a: number, b: number) => void;
865
- readonly __wbg_rtcoffsetjs_free: (a: number, b: number) => void;
866
- readonly __wbg_set_georeferencejs_eastings: (a: number, b: number) => void;
867
- readonly __wbg_set_georeferencejs_northings: (a: number, b: number) => void;
868
- readonly __wbg_set_georeferencejs_orthogonal_height: (a: number, b: number) => void;
869
- readonly __wbg_set_georeferencejs_scale: (a: number, b: number) => void;
870
- readonly __wbg_set_georeferencejs_x_axis_abscissa: (a: number, b: number) => void;
871
- readonly __wbg_set_georeferencejs_x_axis_ordinate: (a: number, b: number) => void;
872
- readonly __wbg_symboliccircle_free: (a: number, b: number) => void;
873
- readonly __wbg_symbolicpolyline_free: (a: number, b: number) => void;
874
- readonly __wbg_symbolicrepresentationcollection_free: (a: number, b: number) => void;
875
- readonly __wbg_zerocopymesh_free: (a: number, b: number) => void;
876
- readonly georeferencejs_crsName: (a: number, b: number) => void;
877
- readonly georeferencejs_localToMap: (a: number, b: number, c: number, d: number, e: number) => void;
878
- readonly georeferencejs_mapToLocal: (a: number, b: number, c: number, d: number, e: number) => void;
879
- readonly georeferencejs_rotation: (a: number) => number;
880
- readonly georeferencejs_toMatrix: (a: number, b: number) => void;
881
- readonly gpugeometry_getIfcTypeName: (a: number, b: number, c: number) => void;
882
- readonly gpugeometry_getMeshMetadata: (a: number, b: number) => number;
883
- readonly gpugeometry_hasRtcOffset: (a: number) => number;
884
- readonly gpugeometry_indicesByteLength: (a: number) => number;
885
- readonly gpugeometry_indicesLen: (a: number) => number;
886
- readonly gpugeometry_indicesPtr: (a: number) => number;
887
- readonly gpugeometry_isEmpty: (a: number) => number;
888
- readonly gpugeometry_meshCount: (a: number) => number;
889
- readonly gpugeometry_new: () => number;
890
- readonly gpugeometry_rtcOffsetX: (a: number) => number;
891
- readonly gpugeometry_rtcOffsetY: (a: number) => number;
892
- readonly gpugeometry_rtcOffsetZ: (a: number) => number;
893
- readonly gpugeometry_set_rtc_offset: (a: number, b: number, c: number, d: number) => void;
894
- readonly gpugeometry_totalTriangleCount: (a: number) => number;
895
- readonly gpugeometry_totalVertexCount: (a: number) => number;
896
- readonly gpugeometry_vertexDataByteLength: (a: number) => number;
897
- readonly gpugeometry_vertexDataLen: (a: number) => number;
898
- readonly gpugeometry_vertexDataPtr: (a: number) => number;
899
- readonly gpuinstancedgeometry_geometryId: (a: number) => bigint;
900
- readonly gpuinstancedgeometry_indicesByteLength: (a: number) => number;
901
- readonly gpuinstancedgeometry_indicesLen: (a: number) => number;
902
- readonly gpuinstancedgeometry_indicesPtr: (a: number) => number;
903
- readonly gpuinstancedgeometry_instanceCount: (a: number) => number;
904
- readonly gpuinstancedgeometry_instanceDataByteLength: (a: number) => number;
905
- readonly gpuinstancedgeometry_instanceDataLen: (a: number) => number;
906
- readonly gpuinstancedgeometry_instanceDataPtr: (a: number) => number;
907
- readonly gpuinstancedgeometry_instanceExpressIdsPtr: (a: number) => number;
908
- readonly gpuinstancedgeometry_new: (a: bigint) => number;
909
- readonly gpuinstancedgeometry_triangleCount: (a: number) => number;
910
- readonly gpuinstancedgeometry_vertexCount: (a: number) => number;
911
- readonly gpuinstancedgeometry_vertexDataByteLength: (a: number) => number;
912
- readonly gpuinstancedgeometry_vertexDataLen: (a: number) => number;
913
- readonly gpuinstancedgeometry_vertexDataPtr: (a: number) => number;
914
- readonly gpuinstancedgeometrycollection_get: (a: number, b: number) => number;
915
- readonly gpuinstancedgeometrycollection_getRef: (a: number, b: number) => number;
916
- readonly gpuinstancedgeometrycollection_length: (a: number) => number;
917
- readonly gpuinstancedgeometrycollection_new: () => number;
918
- readonly gpuinstancedgeometryref_geometryId: (a: number) => bigint;
919
- readonly gpuinstancedgeometryref_indicesByteLength: (a: number) => number;
920
- readonly gpuinstancedgeometryref_indicesLen: (a: number) => number;
921
- readonly gpuinstancedgeometryref_indicesPtr: (a: number) => number;
922
- readonly gpuinstancedgeometryref_instanceCount: (a: number) => number;
923
- readonly gpuinstancedgeometryref_instanceDataByteLength: (a: number) => number;
924
- readonly gpuinstancedgeometryref_instanceDataLen: (a: number) => number;
925
- readonly gpuinstancedgeometryref_instanceDataPtr: (a: number) => number;
926
- readonly gpuinstancedgeometryref_instanceExpressIdsPtr: (a: number) => number;
927
- readonly gpuinstancedgeometryref_vertexDataByteLength: (a: number) => number;
928
- readonly gpuinstancedgeometryref_vertexDataLen: (a: number) => number;
929
- readonly gpuinstancedgeometryref_vertexDataPtr: (a: number) => number;
930
- readonly gpumeshmetadata_color: (a: number, b: number) => void;
931
- readonly gpumeshmetadata_expressId: (a: number) => number;
932
- readonly gpumeshmetadata_ifcTypeIdx: (a: number) => number;
933
- readonly gpumeshmetadata_indexCount: (a: number) => number;
934
- readonly gpumeshmetadata_indexOffset: (a: number) => number;
935
- readonly gpumeshmetadata_vertexCount: (a: number) => number;
936
- readonly gpumeshmetadata_vertexOffset: (a: number) => number;
937
- readonly ifcapi_debugProcessEntity953: (a: number, b: number, c: number, d: number) => void;
938
- readonly ifcapi_debugProcessFirstWall: (a: number, b: number, c: number, d: number) => void;
939
- readonly ifcapi_getGeoReference: (a: number, b: number, c: number) => number;
940
- readonly ifcapi_getMemory: (a: number) => number;
941
- readonly ifcapi_is_ready: (a: number) => number;
942
- readonly ifcapi_new: () => number;
943
- readonly ifcapi_parse: (a: number, b: number, c: number) => number;
944
- readonly ifcapi_parseMeshes: (a: number, b: number, c: number) => number;
945
- readonly ifcapi_parseMeshesAsync: (a: number, b: number, c: number, d: number) => number;
946
- readonly ifcapi_parseMeshesInstanced: (a: number, b: number, c: number) => number;
947
- readonly ifcapi_parseMeshesInstancedAsync: (a: number, b: number, c: number, d: number) => number;
948
- readonly ifcapi_parseMeshesWithRtc: (a: number, b: number, c: number) => number;
949
- readonly ifcapi_parseStreaming: (a: number, b: number, c: number, d: number) => number;
950
- readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
951
- readonly ifcapi_parseToGpuGeometry: (a: number, b: number, c: number) => number;
952
- readonly ifcapi_parseToGpuGeometryAsync: (a: number, b: number, c: number, d: number) => number;
953
- readonly ifcapi_parseToGpuInstancedGeometry: (a: number, b: number, c: number) => number;
954
- readonly ifcapi_parseZeroCopy: (a: number, b: number, c: number) => number;
955
- readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
956
- readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
957
- readonly ifcapi_version: (a: number, b: number) => void;
958
- readonly instancedata_color: (a: number, b: number) => void;
959
- readonly instancedata_expressId: (a: number) => number;
960
- readonly instancedata_transform: (a: number) => number;
961
- readonly instancedgeometry_get_instance: (a: number, b: number) => number;
962
- readonly instancedgeometry_indices: (a: number) => number;
963
- readonly instancedgeometry_instance_count: (a: number) => number;
964
- readonly instancedgeometry_normals: (a: number) => number;
965
- readonly instancedgeometry_positions: (a: number) => number;
966
- readonly instancedmeshcollection_get: (a: number, b: number) => number;
967
- readonly instancedmeshcollection_totalInstances: (a: number) => number;
968
- readonly meshcollection_buildingRotation: (a: number, b: number) => void;
969
- readonly meshcollection_get: (a: number, b: number) => number;
970
- readonly meshcollection_hasRtcOffset: (a: number) => number;
971
- readonly meshcollection_length: (a: number) => number;
972
- readonly meshcollection_localToWorld: (a: number, b: number, c: number, d: number, e: number) => void;
973
- readonly meshcollection_rtcOffsetY: (a: number) => number;
974
- readonly meshcollection_rtcOffsetZ: (a: number) => number;
975
- readonly meshcollection_totalTriangles: (a: number) => number;
976
- readonly meshcollection_totalVertices: (a: number) => number;
977
- readonly meshcollectionwithrtc_get: (a: number, b: number) => number;
978
- readonly meshcollectionwithrtc_meshes: (a: number) => number;
979
- readonly meshcollectionwithrtc_rtcOffset: (a: number) => number;
980
- readonly meshdatajs_color: (a: number, b: number) => void;
981
- readonly meshdatajs_expressId: (a: number) => number;
982
- readonly meshdatajs_ifcType: (a: number, b: number) => void;
983
- readonly meshdatajs_indices: (a: number) => number;
984
- readonly meshdatajs_normals: (a: number) => number;
985
- readonly meshdatajs_positions: (a: number) => number;
986
- readonly meshdatajs_triangleCount: (a: number) => number;
987
- readonly meshdatajs_vertexCount: (a: number) => number;
988
- readonly rtcoffsetjs_isSignificant: (a: number) => number;
989
- readonly rtcoffsetjs_toWorld: (a: number, b: number, c: number, d: number, e: number) => void;
990
- readonly symboliccircle_centerX: (a: number) => number;
991
- readonly symboliccircle_centerY: (a: number) => number;
992
- readonly symboliccircle_endAngle: (a: number) => number;
993
- readonly symboliccircle_ifcType: (a: number, b: number) => void;
994
- readonly symboliccircle_isFullCircle: (a: number) => number;
995
- readonly symboliccircle_radius: (a: number) => number;
996
- readonly symboliccircle_repIdentifier: (a: number, b: number) => void;
997
- readonly symboliccircle_startAngle: (a: number) => number;
998
- readonly symbolicpolyline_expressId: (a: number) => number;
999
- readonly symbolicpolyline_ifcType: (a: number, b: number) => void;
1000
- readonly symbolicpolyline_isClosed: (a: number) => number;
1001
- readonly symbolicpolyline_pointCount: (a: number) => number;
1002
- readonly symbolicpolyline_points: (a: number) => number;
1003
- readonly symbolicpolyline_repIdentifier: (a: number, b: number) => void;
1004
- readonly symbolicrepresentationcollection_circleCount: (a: number) => number;
1005
- readonly symbolicrepresentationcollection_getCircle: (a: number, b: number) => number;
1006
- readonly symbolicrepresentationcollection_getExpressIds: (a: number, b: number) => void;
1007
- readonly symbolicrepresentationcollection_getPolyline: (a: number, b: number) => number;
1008
- readonly symbolicrepresentationcollection_isEmpty: (a: number) => number;
1009
- readonly symbolicrepresentationcollection_polylineCount: (a: number) => number;
1010
- readonly symbolicrepresentationcollection_totalCount: (a: number) => number;
1011
- readonly version: (a: number) => void;
1012
- readonly zerocopymesh_bounds_max: (a: number, b: number) => void;
1013
- readonly zerocopymesh_bounds_min: (a: number, b: number) => void;
1014
- readonly zerocopymesh_is_empty: (a: number) => number;
1015
- readonly zerocopymesh_new: () => number;
1016
- readonly zerocopymesh_normals_len: (a: number) => number;
1017
- readonly zerocopymesh_positions_len: (a: number) => number;
1018
- readonly zerocopymesh_positions_ptr: (a: number) => number;
1019
- readonly zerocopymesh_vertex_count: (a: number) => number;
1020
- readonly init: () => void;
1021
- readonly instancedmeshcollection_length: (a: number) => number;
1022
- readonly instancedmeshcollection_totalGeometries: (a: number) => number;
1023
- readonly meshcollectionwithrtc_length: (a: number) => number;
1024
- readonly zerocopymesh_indices_len: (a: number) => number;
1025
- readonly __wbg_set_rtcoffsetjs_x: (a: number, b: number) => void;
1026
- readonly __wbg_set_rtcoffsetjs_y: (a: number, b: number) => void;
1027
- readonly __wbg_set_rtcoffsetjs_z: (a: number, b: number) => void;
1028
- readonly zerocopymesh_triangle_count: (a: number) => number;
1029
- readonly get_memory: () => number;
1030
- readonly zerocopymesh_indices_ptr: (a: number) => number;
1031
- readonly zerocopymesh_normals_ptr: (a: number) => number;
1032
- readonly __wbg_get_rtcoffsetjs_x: (a: number) => number;
1033
- readonly __wbg_get_rtcoffsetjs_y: (a: number) => number;
1034
- readonly __wbg_get_rtcoffsetjs_z: (a: number) => number;
1035
- readonly instancedgeometry_geometryId: (a: number) => bigint;
1036
- readonly meshcollection_rtcOffsetX: (a: number) => number;
1037
- readonly symboliccircle_expressId: (a: number) => number;
1038
- readonly __wasm_bindgen_func_elem_1026: (a: number, b: number, c: number) => void;
1039
- readonly __wasm_bindgen_func_elem_1024: (a: number, b: number) => void;
1040
- readonly __wasm_bindgen_func_elem_478: (a: number, b: number) => void;
1041
- readonly __wasm_bindgen_func_elem_476: (a: number, b: number) => void;
1042
- readonly __wasm_bindgen_func_elem_1057: (a: number, b: number, c: number, d: number) => void;
1043
- readonly __wbindgen_export: (a: number) => void;
1044
- readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
1045
- readonly __wbindgen_export3: (a: number, b: number) => number;
1046
- readonly __wbindgen_export4: (a: number, b: number, c: number, d: number) => number;
1047
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
1048
- readonly __wbindgen_start: () => void;
919
+ readonly memory: WebAssembly.Memory;
920
+ readonly __wbg_georeferencejs_free: (a: number, b: number) => void;
921
+ readonly __wbg_get_georeferencejs_eastings: (a: number) => number;
922
+ readonly __wbg_get_georeferencejs_northings: (a: number) => number;
923
+ readonly __wbg_get_georeferencejs_orthogonal_height: (a: number) => number;
924
+ readonly __wbg_get_georeferencejs_scale: (a: number) => number;
925
+ readonly __wbg_get_georeferencejs_x_axis_abscissa: (a: number) => number;
926
+ readonly __wbg_get_georeferencejs_x_axis_ordinate: (a: number) => number;
927
+ readonly __wbg_gpugeometry_free: (a: number, b: number) => void;
928
+ readonly __wbg_gpuinstancedgeometry_free: (a: number, b: number) => void;
929
+ readonly __wbg_gpuinstancedgeometrycollection_free: (a: number, b: number) => void;
930
+ readonly __wbg_gpuinstancedgeometryref_free: (a: number, b: number) => void;
931
+ readonly __wbg_gpumeshmetadata_free: (a: number, b: number) => void;
932
+ readonly __wbg_ifcapi_free: (a: number, b: number) => void;
933
+ readonly __wbg_instancedata_free: (a: number, b: number) => void;
934
+ readonly __wbg_instancedgeometry_free: (a: number, b: number) => void;
935
+ readonly __wbg_instancedmeshcollection_free: (a: number, b: number) => void;
936
+ readonly __wbg_meshcollection_free: (a: number, b: number) => void;
937
+ readonly __wbg_meshcollectionwithrtc_free: (a: number, b: number) => void;
938
+ readonly __wbg_meshdatajs_free: (a: number, b: number) => void;
939
+ readonly __wbg_rtcoffsetjs_free: (a: number, b: number) => void;
940
+ readonly __wbg_set_georeferencejs_eastings: (a: number, b: number) => void;
941
+ readonly __wbg_set_georeferencejs_northings: (a: number, b: number) => void;
942
+ readonly __wbg_set_georeferencejs_orthogonal_height: (a: number, b: number) => void;
943
+ readonly __wbg_set_georeferencejs_scale: (a: number, b: number) => void;
944
+ readonly __wbg_set_georeferencejs_x_axis_abscissa: (a: number, b: number) => void;
945
+ readonly __wbg_set_georeferencejs_x_axis_ordinate: (a: number, b: number) => void;
946
+ readonly __wbg_symboliccircle_free: (a: number, b: number) => void;
947
+ readonly __wbg_symbolicpolyline_free: (a: number, b: number) => void;
948
+ readonly __wbg_symbolicrepresentationcollection_free: (a: number, b: number) => void;
949
+ readonly __wbg_zerocopymesh_free: (a: number, b: number) => void;
950
+ readonly georeferencejs_crsName: (a: number, b: number) => void;
951
+ readonly georeferencejs_localToMap: (a: number, b: number, c: number, d: number, e: number) => void;
952
+ readonly georeferencejs_mapToLocal: (a: number, b: number, c: number, d: number, e: number) => void;
953
+ readonly georeferencejs_rotation: (a: number) => number;
954
+ readonly georeferencejs_toMatrix: (a: number, b: number) => void;
955
+ readonly gpugeometry_getIfcTypeName: (a: number, b: number, c: number) => void;
956
+ readonly gpugeometry_getMeshMetadata: (a: number, b: number) => number;
957
+ readonly gpugeometry_hasRtcOffset: (a: number) => number;
958
+ readonly gpugeometry_indicesByteLength: (a: number) => number;
959
+ readonly gpugeometry_indicesLen: (a: number) => number;
960
+ readonly gpugeometry_indicesPtr: (a: number) => number;
961
+ readonly gpugeometry_isEmpty: (a: number) => number;
962
+ readonly gpugeometry_meshCount: (a: number) => number;
963
+ readonly gpugeometry_new: () => number;
964
+ readonly gpugeometry_rtcOffsetX: (a: number) => number;
965
+ readonly gpugeometry_rtcOffsetY: (a: number) => number;
966
+ readonly gpugeometry_rtcOffsetZ: (a: number) => number;
967
+ readonly gpugeometry_set_rtc_offset: (a: number, b: number, c: number, d: number) => void;
968
+ readonly gpugeometry_totalTriangleCount: (a: number) => number;
969
+ readonly gpugeometry_totalVertexCount: (a: number) => number;
970
+ readonly gpugeometry_vertexDataByteLength: (a: number) => number;
971
+ readonly gpugeometry_vertexDataLen: (a: number) => number;
972
+ readonly gpugeometry_vertexDataPtr: (a: number) => number;
973
+ readonly gpuinstancedgeometry_geometryId: (a: number) => bigint;
974
+ readonly gpuinstancedgeometry_indicesByteLength: (a: number) => number;
975
+ readonly gpuinstancedgeometry_indicesLen: (a: number) => number;
976
+ readonly gpuinstancedgeometry_indicesPtr: (a: number) => number;
977
+ readonly gpuinstancedgeometry_instanceCount: (a: number) => number;
978
+ readonly gpuinstancedgeometry_instanceDataByteLength: (a: number) => number;
979
+ readonly gpuinstancedgeometry_instanceDataLen: (a: number) => number;
980
+ readonly gpuinstancedgeometry_instanceDataPtr: (a: number) => number;
981
+ readonly gpuinstancedgeometry_instanceExpressIdsPtr: (a: number) => number;
982
+ readonly gpuinstancedgeometry_new: (a: bigint) => number;
983
+ readonly gpuinstancedgeometry_triangleCount: (a: number) => number;
984
+ readonly gpuinstancedgeometry_vertexCount: (a: number) => number;
985
+ readonly gpuinstancedgeometry_vertexDataByteLength: (a: number) => number;
986
+ readonly gpuinstancedgeometry_vertexDataLen: (a: number) => number;
987
+ readonly gpuinstancedgeometry_vertexDataPtr: (a: number) => number;
988
+ readonly gpuinstancedgeometrycollection_get: (a: number, b: number) => number;
989
+ readonly gpuinstancedgeometrycollection_getRef: (a: number, b: number) => number;
990
+ readonly gpuinstancedgeometrycollection_length: (a: number) => number;
991
+ readonly gpuinstancedgeometrycollection_new: () => number;
992
+ readonly gpuinstancedgeometryref_geometryId: (a: number) => bigint;
993
+ readonly gpuinstancedgeometryref_indicesByteLength: (a: number) => number;
994
+ readonly gpuinstancedgeometryref_indicesLen: (a: number) => number;
995
+ readonly gpuinstancedgeometryref_indicesPtr: (a: number) => number;
996
+ readonly gpuinstancedgeometryref_instanceCount: (a: number) => number;
997
+ readonly gpuinstancedgeometryref_instanceDataByteLength: (a: number) => number;
998
+ readonly gpuinstancedgeometryref_instanceDataLen: (a: number) => number;
999
+ readonly gpuinstancedgeometryref_instanceDataPtr: (a: number) => number;
1000
+ readonly gpuinstancedgeometryref_instanceExpressIdsPtr: (a: number) => number;
1001
+ readonly gpuinstancedgeometryref_vertexDataByteLength: (a: number) => number;
1002
+ readonly gpuinstancedgeometryref_vertexDataLen: (a: number) => number;
1003
+ readonly gpuinstancedgeometryref_vertexDataPtr: (a: number) => number;
1004
+ readonly gpumeshmetadata_color: (a: number, b: number) => void;
1005
+ readonly gpumeshmetadata_expressId: (a: number) => number;
1006
+ readonly gpumeshmetadata_ifcTypeIdx: (a: number) => number;
1007
+ readonly gpumeshmetadata_indexCount: (a: number) => number;
1008
+ readonly gpumeshmetadata_indexOffset: (a: number) => number;
1009
+ readonly gpumeshmetadata_vertexCount: (a: number) => number;
1010
+ readonly gpumeshmetadata_vertexOffset: (a: number) => number;
1011
+ readonly ifcapi_debugProcessEntity953: (a: number, b: number, c: number, d: number) => void;
1012
+ readonly ifcapi_debugProcessFirstWall: (a: number, b: number, c: number, d: number) => void;
1013
+ readonly ifcapi_getGeoReference: (a: number, b: number, c: number) => number;
1014
+ readonly ifcapi_getMemory: (a: number) => number;
1015
+ readonly ifcapi_is_ready: (a: number) => number;
1016
+ readonly ifcapi_new: () => number;
1017
+ readonly ifcapi_parse: (a: number, b: number, c: number) => number;
1018
+ readonly ifcapi_parseMeshes: (a: number, b: number, c: number) => number;
1019
+ readonly ifcapi_parseMeshesAsync: (a: number, b: number, c: number, d: number) => number;
1020
+ readonly ifcapi_parseMeshesInstanced: (a: number, b: number, c: number) => number;
1021
+ readonly ifcapi_parseMeshesInstancedAsync: (a: number, b: number, c: number, d: number) => number;
1022
+ readonly ifcapi_parseMeshesWithRtc: (a: number, b: number, c: number) => number;
1023
+ readonly ifcapi_parseStreaming: (a: number, b: number, c: number, d: number) => number;
1024
+ readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
1025
+ readonly ifcapi_parseToGpuGeometry: (a: number, b: number, c: number) => number;
1026
+ readonly ifcapi_parseToGpuGeometryAsync: (a: number, b: number, c: number, d: number) => number;
1027
+ readonly ifcapi_parseToGpuInstancedGeometry: (a: number, b: number, c: number) => number;
1028
+ readonly ifcapi_parseZeroCopy: (a: number, b: number, c: number) => number;
1029
+ readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
1030
+ readonly ifcapi_scanEntitiesFastBytes: (a: number, b: number, c: number) => number;
1031
+ readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
1032
+ readonly ifcapi_version: (a: number, b: number) => void;
1033
+ readonly instancedata_color: (a: number, b: number) => void;
1034
+ readonly instancedata_expressId: (a: number) => number;
1035
+ readonly instancedata_transform: (a: number) => number;
1036
+ readonly instancedgeometry_get_instance: (a: number, b: number) => number;
1037
+ readonly instancedgeometry_indices: (a: number) => number;
1038
+ readonly instancedgeometry_instance_count: (a: number) => number;
1039
+ readonly instancedgeometry_normals: (a: number) => number;
1040
+ readonly instancedgeometry_positions: (a: number) => number;
1041
+ readonly instancedmeshcollection_get: (a: number, b: number) => number;
1042
+ readonly instancedmeshcollection_totalInstances: (a: number) => number;
1043
+ readonly meshcollection_buildingRotation: (a: number, b: number) => void;
1044
+ readonly meshcollection_get: (a: number, b: number) => number;
1045
+ readonly meshcollection_hasRtcOffset: (a: number) => number;
1046
+ readonly meshcollection_length: (a: number) => number;
1047
+ readonly meshcollection_localToWorld: (a: number, b: number, c: number, d: number, e: number) => void;
1048
+ readonly meshcollection_rtcOffsetY: (a: number) => number;
1049
+ readonly meshcollection_rtcOffsetZ: (a: number) => number;
1050
+ readonly meshcollection_totalTriangles: (a: number) => number;
1051
+ readonly meshcollection_totalVertices: (a: number) => number;
1052
+ readonly meshcollectionwithrtc_get: (a: number, b: number) => number;
1053
+ readonly meshcollectionwithrtc_meshes: (a: number) => number;
1054
+ readonly meshcollectionwithrtc_rtcOffset: (a: number) => number;
1055
+ readonly meshdatajs_color: (a: number, b: number) => void;
1056
+ readonly meshdatajs_expressId: (a: number) => number;
1057
+ readonly meshdatajs_ifcType: (a: number, b: number) => void;
1058
+ readonly meshdatajs_indices: (a: number) => number;
1059
+ readonly meshdatajs_normals: (a: number) => number;
1060
+ readonly meshdatajs_positions: (a: number) => number;
1061
+ readonly meshdatajs_triangleCount: (a: number) => number;
1062
+ readonly meshdatajs_vertexCount: (a: number) => number;
1063
+ readonly rtcoffsetjs_isSignificant: (a: number) => number;
1064
+ readonly rtcoffsetjs_toWorld: (a: number, b: number, c: number, d: number, e: number) => void;
1065
+ readonly symboliccircle_centerX: (a: number) => number;
1066
+ readonly symboliccircle_centerY: (a: number) => number;
1067
+ readonly symboliccircle_endAngle: (a: number) => number;
1068
+ readonly symboliccircle_ifcType: (a: number, b: number) => void;
1069
+ readonly symboliccircle_isFullCircle: (a: number) => number;
1070
+ readonly symboliccircle_radius: (a: number) => number;
1071
+ readonly symboliccircle_repIdentifier: (a: number, b: number) => void;
1072
+ readonly symboliccircle_startAngle: (a: number) => number;
1073
+ readonly symbolicpolyline_expressId: (a: number) => number;
1074
+ readonly symbolicpolyline_ifcType: (a: number, b: number) => void;
1075
+ readonly symbolicpolyline_isClosed: (a: number) => number;
1076
+ readonly symbolicpolyline_pointCount: (a: number) => number;
1077
+ readonly symbolicpolyline_points: (a: number) => number;
1078
+ readonly symbolicpolyline_repIdentifier: (a: number, b: number) => void;
1079
+ readonly symbolicrepresentationcollection_circleCount: (a: number) => number;
1080
+ readonly symbolicrepresentationcollection_getCircle: (a: number, b: number) => number;
1081
+ readonly symbolicrepresentationcollection_getExpressIds: (a: number, b: number) => void;
1082
+ readonly symbolicrepresentationcollection_getPolyline: (a: number, b: number) => number;
1083
+ readonly symbolicrepresentationcollection_isEmpty: (a: number) => number;
1084
+ readonly symbolicrepresentationcollection_polylineCount: (a: number) => number;
1085
+ readonly symbolicrepresentationcollection_totalCount: (a: number) => number;
1086
+ readonly version: (a: number) => void;
1087
+ readonly zerocopymesh_bounds_max: (a: number, b: number) => void;
1088
+ readonly zerocopymesh_bounds_min: (a: number, b: number) => void;
1089
+ readonly zerocopymesh_is_empty: (a: number) => number;
1090
+ readonly zerocopymesh_new: () => number;
1091
+ readonly zerocopymesh_normals_len: (a: number) => number;
1092
+ readonly zerocopymesh_positions_len: (a: number) => number;
1093
+ readonly zerocopymesh_positions_ptr: (a: number) => number;
1094
+ readonly zerocopymesh_vertex_count: (a: number) => number;
1095
+ readonly init: () => void;
1096
+ readonly instancedmeshcollection_length: (a: number) => number;
1097
+ readonly instancedmeshcollection_totalGeometries: (a: number) => number;
1098
+ readonly meshcollectionwithrtc_length: (a: number) => number;
1099
+ readonly zerocopymesh_indices_len: (a: number) => number;
1100
+ readonly __wbg_get_rtcoffsetjs_x: (a: number) => number;
1101
+ readonly __wbg_get_rtcoffsetjs_y: (a: number) => number;
1102
+ readonly __wbg_get_rtcoffsetjs_z: (a: number) => number;
1103
+ readonly __wbg_set_rtcoffsetjs_x: (a: number, b: number) => void;
1104
+ readonly __wbg_set_rtcoffsetjs_y: (a: number, b: number) => void;
1105
+ readonly __wbg_set_rtcoffsetjs_z: (a: number, b: number) => void;
1106
+ readonly instancedgeometry_geometryId: (a: number) => bigint;
1107
+ readonly meshcollection_rtcOffsetX: (a: number) => number;
1108
+ readonly symboliccircle_expressId: (a: number) => number;
1109
+ readonly zerocopymesh_triangle_count: (a: number) => number;
1110
+ readonly zerocopymesh_indices_ptr: (a: number) => number;
1111
+ readonly zerocopymesh_normals_ptr: (a: number) => number;
1112
+ readonly get_memory: () => number;
1113
+ readonly __wasm_bindgen_func_elem_1032: (a: number, b: number) => void;
1114
+ readonly __wasm_bindgen_func_elem_480: (a: number, b: number) => void;
1115
+ readonly __wasm_bindgen_func_elem_1037: (a: number, b: number, c: number, d: number) => void;
1116
+ readonly __wasm_bindgen_func_elem_1070: (a: number, b: number, c: number, d: number) => void;
1117
+ readonly __wasm_bindgen_func_elem_484: (a: number, b: number) => void;
1118
+ readonly __wbindgen_export: (a: number) => void;
1119
+ readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
1120
+ readonly __wbindgen_export3: (a: number, b: number) => number;
1121
+ readonly __wbindgen_export4: (a: number, b: number, c: number, d: number) => number;
1122
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
1123
+ readonly __wbindgen_start: () => void;
1049
1124
  }
1050
1125
 
1051
1126
  export type SyncInitInput = BufferSource | WebAssembly.Module;
1052
1127
 
1053
1128
  /**
1054
- * Instantiates the given `module`, which can either be bytes or
1055
- * a precompiled `WebAssembly.Module`.
1056
- *
1057
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
1058
- *
1059
- * @returns {InitOutput}
1060
- */
1129
+ * Instantiates the given `module`, which can either be bytes or
1130
+ * a precompiled `WebAssembly.Module`.
1131
+ *
1132
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
1133
+ *
1134
+ * @returns {InitOutput}
1135
+ */
1061
1136
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
1062
1137
 
1063
1138
  /**
1064
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1065
- * for everything else, calls `WebAssembly.instantiate` directly.
1066
- *
1067
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1068
- *
1069
- * @returns {Promise<InitOutput>}
1070
- */
1139
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1140
+ * for everything else, calls `WebAssembly.instantiate` directly.
1141
+ *
1142
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1143
+ *
1144
+ * @returns {Promise<InitOutput>}
1145
+ */
1071
1146
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;