@ifc-lite/wasm 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,9 +12,10 @@ npm install @ifc-lite/wasm
12
12
 
13
13
  ## Direct WASM use
14
14
 
15
- The text-based parse methods (`parse`, `parseStreaming`) take the raw IFC text
16
- (a `string`) — decode the buffer first. The geometry methods (`buildPrePassOnce`,
17
- `processGeometryBatch`, see below) instead take the raw `Uint8Array` bytes.
15
+ The text-based entity scanner (`scanEntitiesFast`) takes the raw IFC text
16
+ (a `string`) — decode the buffer first; `scanEntitiesFastBytes` takes the raw
17
+ `Uint8Array` bytes directly. The geometry methods (`buildPrePassOnce`,
18
+ `processGeometryBatch`, see below) also take the raw `Uint8Array` bytes.
18
19
 
19
20
  ```typescript
20
21
  import init, { IfcAPI } from '@ifc-lite/wasm';
@@ -25,9 +26,9 @@ const api = new IfcAPI();
25
26
  const buffer = await fetch('model.ifc').then(r => r.arrayBuffer());
26
27
  const content = new TextDecoder().decode(buffer);
27
28
 
28
- // Lightweight parse — returns { entityCount, ... }
29
- const result = await api.parse(content);
30
- console.log(`Entities: ${result.entityCount}`);
29
+ // Fast entity scan — returns an array of entity references
30
+ const refs = api.scanEntitiesFast(content);
31
+ console.log(`Entities: ${refs.length}`);
31
32
 
32
33
  api.free(); // free the API instance
33
34
  ```
@@ -78,7 +79,7 @@ api.free(); // release the API instance when done
78
79
 
79
80
  | Class | Purpose |
80
81
  |---|---|
81
- | `IfcAPI` | Top-level entry point — `parse`, `parseStreaming`, `buildPrePassOnce` / `buildPrePassFast` / `buildPrePassStreaming`, `processGeometryBatch`, `scanEntitiesFast` / `scanEntitiesFastBytes` / `scanGeometryEntitiesFast`, `extractProfiles`, `parseSymbolicRepresentations` |
82
+ | `IfcAPI` | Top-level entry point — `scanEntitiesFast` / `scanEntitiesFastBytes` / `scanGeometryEntitiesFast`, `buildPrePassOnce` / `buildPrePassStreaming`, `processGeometryBatch`, `extractProfiles`, `parseSymbolicRepresentations` |
82
83
  | `MeshCollection`, `MeshDataJs` | Tessellated geometry output |
83
84
  | `ProfileCollection`, `ProfileEntryJs` | Cross-section profile data (extruded-area solids) |
84
85
  | `SymbolicRepresentationCollection`, `SymbolicCircle`, `SymbolicPolyline` | 2D symbolic representations (for plan / annotation views) |
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "IFC-Lite Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings for IFC-Lite",
8
- "version": "3.0.1",
8
+ "version": "3.0.3",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
Binary file