create-ifc-lite 1.14.6 → 1.14.8
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 +3 -3
- package/dist/templates/babylonjs.js +2 -2
- package/dist/templates/basic.js +11 -11
- package/dist/templates/react.js +4 -4
- package/dist/templates/server-native.js +2 -2
- package/dist/templates/server.js +8 -8
- package/dist/templates/threejs.js +16 -5
- package/dist/utils/download.js +1 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -54,6 +54,6 @@ Each template ships with a `README.md` documenting what it does and how to exten
|
|
|
54
54
|
|
|
55
55
|
## Learn more
|
|
56
56
|
|
|
57
|
-
- [IFClite docs](https://
|
|
58
|
-
- [GitHub repo](https://github.com/
|
|
59
|
-
- [Quick Start guide](https://github.com/
|
|
57
|
+
- [IFClite docs](https://ltplus-ag.github.io/ifc-lite/)
|
|
58
|
+
- [GitHub repo](https://github.com/LTplus-AG/ifc-lite)
|
|
59
|
+
- [Quick Start guide](https://github.com/LTplus-AG/ifc-lite/blob/main/https://ltplus-ag.github.io/ifc-lite/guide/quickstart/)
|
|
@@ -250,7 +250,7 @@ fileInput.addEventListener('change', async () => {
|
|
|
250
250
|
// README
|
|
251
251
|
writeFileSync(join(targetDir, 'README.md'), `# ${projectName}
|
|
252
252
|
|
|
253
|
-
Babylon.js IFC viewer using [IFC-Lite](https://github.com/
|
|
253
|
+
Babylon.js IFC viewer using [IFC-Lite](https://github.com/LTplus-AG/ifc-lite).
|
|
254
254
|
|
|
255
255
|
## Quick Start
|
|
256
256
|
|
|
@@ -263,6 +263,6 @@ Open http://localhost:5173 and drop an IFC file.
|
|
|
263
263
|
|
|
264
264
|
## Learn More
|
|
265
265
|
|
|
266
|
-
- [IFC-Lite Documentation](https://
|
|
266
|
+
- [IFC-Lite Documentation](https://ltplus-ag.github.io/ifc-lite/)
|
|
267
267
|
`);
|
|
268
268
|
}
|
package/dist/templates/basic.js
CHANGED
|
@@ -67,19 +67,19 @@ const buffer = nodeBuffer.buffer.slice(
|
|
|
67
67
|
const parser = new IfcParser();
|
|
68
68
|
|
|
69
69
|
console.log('Parsing IFC file...');
|
|
70
|
-
parser.
|
|
70
|
+
parser.parseColumnar(buffer).then(store => {
|
|
71
71
|
console.log('\\nFile parsed successfully!');
|
|
72
|
-
console.log(\` Entities: \${
|
|
72
|
+
console.log(\` Entities: \${store.entityCount}\`);
|
|
73
|
+
console.log(\` Schema: \${store.schemaVersion}\`);
|
|
73
74
|
|
|
74
75
|
// Count by type
|
|
75
|
-
const typeCounts =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
const typeCounts = [...store.entityIndex.byType.entries()]
|
|
77
|
+
.map(([type, ids]) => [type, ids.length] as const)
|
|
78
|
+
.sort((a, b) => b[1] - a[1])
|
|
79
|
+
.slice(0, 10);
|
|
79
80
|
|
|
80
81
|
console.log('\\nTop entity types:');
|
|
81
|
-
const
|
|
82
|
-
for (const [type, count] of sorted) {
|
|
82
|
+
for (const [type, count] of typeCounts) {
|
|
83
83
|
console.log(\` \${type}: \${count}\`);
|
|
84
84
|
}
|
|
85
85
|
});
|
|
@@ -87,7 +87,7 @@ parser.parse(buffer).then(result => {
|
|
|
87
87
|
// README
|
|
88
88
|
writeFileSync(join(targetDir, 'README.md'), `# ${projectName}
|
|
89
89
|
|
|
90
|
-
IFC parser project using [IFC-Lite](https://github.com/
|
|
90
|
+
IFC parser project using [IFC-Lite](https://github.com/LTplus-AG/ifc-lite).
|
|
91
91
|
|
|
92
92
|
## Quick Start
|
|
93
93
|
|
|
@@ -98,7 +98,7 @@ npm run parse ./your-model.ifc
|
|
|
98
98
|
|
|
99
99
|
## Learn More
|
|
100
100
|
|
|
101
|
-
- [IFC-Lite Documentation](https://
|
|
102
|
-
- [API Reference](https://
|
|
101
|
+
- [IFC-Lite Documentation](https://ltplus-ag.github.io/ifc-lite/)
|
|
102
|
+
- [API Reference](https://ltplus-ag.github.io/ifc-lite/api/)
|
|
103
103
|
`);
|
|
104
104
|
}
|
package/dist/templates/react.js
CHANGED
|
@@ -552,7 +552,7 @@ body {
|
|
|
552
552
|
`);
|
|
553
553
|
writeFileSync(join(targetDir, 'README.md'), `# ${projectName}
|
|
554
554
|
|
|
555
|
-
React + Vite IFC viewer using [IFC-Lite](https://github.com/
|
|
555
|
+
React + Vite IFC viewer using [IFC-Lite](https://github.com/LTplus-AG/ifc-lite).
|
|
556
556
|
|
|
557
557
|
## Quick Start
|
|
558
558
|
|
|
@@ -573,8 +573,8 @@ Open the app in your browser and drop an IFC file onto the viewport.
|
|
|
573
573
|
|
|
574
574
|
## Learn More
|
|
575
575
|
|
|
576
|
-
- [IFC-Lite Documentation](https://
|
|
577
|
-
- [Rendering Guide](https://
|
|
578
|
-
- [Geometry Guide](https://
|
|
576
|
+
- [IFC-Lite Documentation](https://ltplus-ag.github.io/ifc-lite/)
|
|
577
|
+
- [Rendering Guide](https://ltplus-ag.github.io/ifc-lite/guide/rendering/)
|
|
578
|
+
- [Geometry Guide](https://ltplus-ag.github.io/ifc-lite/guide/geometry/)
|
|
579
579
|
`);
|
|
580
580
|
}
|
|
@@ -401,8 +401,8 @@ npx create-ifc-lite my-app --template server
|
|
|
401
401
|
|
|
402
402
|
## Learn More
|
|
403
403
|
|
|
404
|
-
- [IFC-Lite Documentation](https://
|
|
405
|
-
- [GitHub Repository](https://github.com/
|
|
404
|
+
- [IFC-Lite Documentation](https://ltplus-ag.github.io/ifc-lite/)
|
|
405
|
+
- [GitHub Repository](https://github.com/LTplus-AG/ifc-lite)
|
|
406
406
|
`);
|
|
407
407
|
console.log(' Created package.json');
|
|
408
408
|
console.log(' Created tsconfig.json');
|
package/dist/templates/server.js
CHANGED
|
@@ -15,7 +15,7 @@ export function createServerTemplate(targetDir, projectName) {
|
|
|
15
15
|
|
|
16
16
|
services:
|
|
17
17
|
ifc-server:
|
|
18
|
-
image: ghcr.io/
|
|
18
|
+
image: ghcr.io/LTplus-AG/ifc-lite-server:latest
|
|
19
19
|
container_name: ${projectName}-server
|
|
20
20
|
ports:
|
|
21
21
|
- "\${PORT:-3001}:8080"
|
|
@@ -47,7 +47,7 @@ volumes:
|
|
|
47
47
|
|
|
48
48
|
services:
|
|
49
49
|
ifc-server:
|
|
50
|
-
image: ghcr.io/
|
|
50
|
+
image: ghcr.io/LTplus-AG/ifc-lite-server:latest
|
|
51
51
|
container_name: ${projectName}-server-dev
|
|
52
52
|
ports:
|
|
53
53
|
- "\${PORT:-3001}:8080"
|
|
@@ -474,7 +474,7 @@ export function createLocalClient(options?: { timeout?: number }) {
|
|
|
474
474
|
// README.md
|
|
475
475
|
writeFileSync(join(targetDir, 'README.md'), `# ${projectName}
|
|
476
476
|
|
|
477
|
-
IFC processing server using [IFC-Lite](https://github.com/
|
|
477
|
+
IFC processing server using [IFC-Lite](https://github.com/LTplus-AG/ifc-lite).
|
|
478
478
|
|
|
479
479
|
## Quick Start
|
|
480
480
|
|
|
@@ -585,8 +585,8 @@ The Docker image works on any container platform:
|
|
|
585
585
|
|
|
586
586
|
\`\`\`bash
|
|
587
587
|
# Pull and run
|
|
588
|
-
docker pull ghcr.io/
|
|
589
|
-
docker run -p 8080:8080 -v ifc-cache:/app/cache ghcr.io/
|
|
588
|
+
docker pull ghcr.io/LTplus-AG/ifc-lite-server:latest
|
|
589
|
+
docker run -p 8080:8080 -v ifc-cache:/app/cache ghcr.io/LTplus-AG/ifc-lite-server
|
|
590
590
|
\`\`\`
|
|
591
591
|
|
|
592
592
|
### Environment Variables
|
|
@@ -603,9 +603,9 @@ RUST_LOG=info
|
|
|
603
603
|
|
|
604
604
|
## Learn More
|
|
605
605
|
|
|
606
|
-
- [IFC-Lite Documentation](https://
|
|
607
|
-
- [Server API Reference](https://
|
|
608
|
-
- [GitHub Repository](https://github.com/
|
|
606
|
+
- [IFC-Lite Documentation](https://ltplus-ag.github.io/ifc-lite/)
|
|
607
|
+
- [Server API Reference](https://ltplus-ag.github.io/ifc-lite/api/server/)
|
|
608
|
+
- [GitHub Repository](https://github.com/LTplus-AG/ifc-lite)
|
|
609
609
|
`);
|
|
610
610
|
console.log(' Created docker-compose.yml');
|
|
611
611
|
console.log(' Created docker-compose.dev.yml');
|
|
@@ -49,6 +49,11 @@ export function createThreejsTemplate(targetDir, projectName) {
|
|
|
49
49
|
writeFileSync(join(targetDir, 'vite.config.ts'), `import { defineConfig } from 'vite';
|
|
50
50
|
|
|
51
51
|
export default defineConfig({
|
|
52
|
+
// @ifc-lite ships ES-module geometry workers; emit them as ESM so a
|
|
53
|
+
// production build never trips over Rollup's IIFE worker default.
|
|
54
|
+
worker: {
|
|
55
|
+
format: 'es',
|
|
56
|
+
},
|
|
52
57
|
optimizeDeps: {
|
|
53
58
|
exclude: ['@ifc-lite/wasm'],
|
|
54
59
|
},
|
|
@@ -132,7 +137,10 @@ export function meshDataToThree(mesh: MeshData): THREE.Mesh {
|
|
|
132
137
|
color: new THREE.Color(r, g, b),
|
|
133
138
|
transparent: a < 1,
|
|
134
139
|
opacity: a,
|
|
135
|
-
|
|
140
|
+
// DoubleSide even for opaque: IFC triangle winding isn't reliably outward,
|
|
141
|
+
// and culling one side of two coincident coplanar walls (a facing wall flush
|
|
142
|
+
// on a thicker one) leaves the survivors z-fighting into a comb along the seam.
|
|
143
|
+
side: THREE.DoubleSide,
|
|
136
144
|
depthWrite: a >= 1,
|
|
137
145
|
});
|
|
138
146
|
|
|
@@ -155,7 +163,10 @@ if (!canvas || !fileInput || !status) {
|
|
|
155
163
|
}
|
|
156
164
|
|
|
157
165
|
// Three.js setup
|
|
158
|
-
|
|
166
|
+
// logarithmicDepthBuffer spreads depth precision across the scene so the
|
|
167
|
+
// near-coplanar surfaces common in IFC (a roof slab on a gable wall, stacked
|
|
168
|
+
// wall layers) far from the origin don't z-fight into stair-stepped seams.
|
|
169
|
+
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, logarithmicDepthBuffer: true });
|
|
159
170
|
renderer.setPixelRatio(window.devicePixelRatio);
|
|
160
171
|
renderer.toneMapping = THREE.ACESFilmicToneMapping;
|
|
161
172
|
|
|
@@ -258,7 +269,7 @@ fileInput.addEventListener('change', async () => {
|
|
|
258
269
|
// README
|
|
259
270
|
writeFileSync(join(targetDir, 'README.md'), `# ${projectName}
|
|
260
271
|
|
|
261
|
-
Three.js IFC viewer using [IFC-Lite](https://github.com/
|
|
272
|
+
Three.js IFC viewer using [IFC-Lite](https://github.com/LTplus-AG/ifc-lite).
|
|
262
273
|
|
|
263
274
|
## Quick Start
|
|
264
275
|
|
|
@@ -271,7 +282,7 @@ Open http://localhost:5173 and drop an IFC file.
|
|
|
271
282
|
|
|
272
283
|
## Learn More
|
|
273
284
|
|
|
274
|
-
- [Three.js Integration Guide](https://
|
|
275
|
-
- [IFC-Lite Documentation](https://
|
|
285
|
+
- [Three.js Integration Guide](https://ltplus-ag.github.io/ifc-lite/tutorials/threejs-integration/)
|
|
286
|
+
- [IFC-Lite Documentation](https://ltplus-ag.github.io/ifc-lite/)
|
|
276
287
|
`);
|
|
277
288
|
}
|
package/dist/utils/download.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { rmSync } from 'fs';
|
|
5
5
|
import { join, dirname } from 'path';
|
|
6
6
|
import { execSync } from 'child_process';
|
|
7
|
-
const REPO_URL = 'https://github.com/
|
|
7
|
+
const REPO_URL = 'https://github.com/LTplus-AG/ifc-lite';
|
|
8
8
|
const VIEWER_PATH = 'apps/viewer';
|
|
9
9
|
/**
|
|
10
10
|
* Run a shell command silently. Returns true on success, false on failure.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ifc-lite",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.8",
|
|
4
4
|
"description": "Create IFC-Lite projects with one command",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MPL-2.0",
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "https://github.com/LTplus-AG/ifc-lite.git",
|
|
25
25
|
"directory": "packages/create-ifc-lite"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=18.0.0"
|
|
32
32
|
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^25.9.1",
|
|
35
|
+
"typescript": "^5.3.0"
|
|
36
|
+
},
|
|
33
37
|
"scripts": {
|
|
34
38
|
"build": "pnpm exec tsc",
|
|
35
39
|
"dev": "pnpm exec tsc --watch"
|