Skip to content

Commit bd4888e

Browse files
migrated angular laptop holder example to new angular, removed simple threejs example as it was based on old angular and did not provide value anymore.
1 parent 0751785 commit bd4888e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+7520
-43854
lines changed
Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
1-
.angular
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db
43+
44+
# Lock files
45+
package-lock.json
Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1-
# LaptopHolder
1+
# Laptop Holder Configurator - Angular + BabylonJS + Vite
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.5.
3+
This is a modern Angular 20+ project using the new Vite-based build system with BabylonJS and BitByBit.
44

5-
## Development server
5+
## Features
66

7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
7+
- **Angular 20+** with standalone components
8+
- **Vite-based build** (via @angular/build)
9+
- **BabylonJS** for 3D rendering
10+
- **BitByBit OCCT** for CAD geometry (loaded from CDN - no worker files needed!)
11+
- Parametric laptop holder configurator
12+
- Export to STEP and STL formats
813

9-
## Code scaffolding
14+
## Getting Started
1015

11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
16+
1. Install dependencies:
17+
```bash
18+
npm install
19+
```
1220

13-
## Build
21+
2. Start the development server:
22+
```bash
23+
npm start
24+
```
1425

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
26+
3. Open http://localhost:4200 in your browser
1627

17-
## Running unit tests
28+
## Key Differences from Old Webpack Setup
1829

19-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20-
21-
## Running end-to-end tests
22-
23-
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24-
25-
## Further help
26-
27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
30+
- No need for custom webpack configuration
31+
- No local worker files (`occ.worker.ts`, `jscad.worker.ts`) - workers are loaded from CDN
32+
- Uses `initBitByBit()` for simple kernel initialization
33+
- Modern ESM-only setup
34+
- Standalone Angular components

examples/angular/babylonjs/laptop-holder/angular.json

Lines changed: 33 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -3,130 +3,61 @@
33
"cli": {
44
"analytics": false
55
},
6-
"version": 1,
76
"newProjectRoot": "projects",
87
"projects": {
98
"laptop-holder": {
10-
"projectType": "application",
11-
"schematics": {
12-
"@schematics/angular:application": {
13-
"strict": true
14-
}
15-
},
16-
"root": "",
17-
"sourceRoot": "src",
18-
"prefix": "app",
199
"architect": {
2010
"build": {
21-
"builder": "@angular-builders/custom-webpack:browser",
22-
"options": {
23-
"customWebpackConfig": {
24-
"path": "custom-webpack.config.js",
25-
"replaceDuplicatePlugins": true
26-
},
27-
"outputPath": "dist/laptop-holder",
28-
"index": "src/index.html",
29-
"main": "src/main.ts",
30-
"polyfills": "src/polyfills.ts",
31-
"tsConfig": "tsconfig.app.json",
32-
"assets": [
33-
"src/favicon.ico",
34-
"src/assets"
35-
],
36-
"styles": [
37-
"src/styles.css"
38-
],
39-
"scripts": [
40-
],
41-
"webWorkerTsConfig": "tsconfig.worker.json"
42-
},
11+
"builder": "@angular/build:application",
4312
"configurations": {
44-
"production": {
45-
"budgets": [
46-
{
47-
"type": "initial",
48-
"maximumWarning": "10mb",
49-
"maximumError": "10mb"
50-
},
51-
{
52-
"type": "anyComponentStyle",
53-
"maximumWarning": "2kb",
54-
"maximumError": "4kb"
55-
}
56-
],
57-
"fileReplacements": [
58-
{
59-
"replace": "src/environments/environment.ts",
60-
"with": "src/environments/environment.prod.ts"
61-
}
62-
],
63-
"outputHashing": "all"
64-
},
6513
"development": {
66-
"buildOptimizer": false,
6714
"optimization": false,
68-
"vendorChunk": true,
6915
"extractLicenses": false,
70-
"sourceMap": true,
71-
"namedChunks": true
72-
}
73-
},
74-
"defaultConfiguration": "production"
75-
},
76-
"serve": {
77-
"builder": "@angular-builders/custom-webpack:dev-server",
78-
"options": {
79-
"browserTarget": "laptop-holder:build"
80-
},
81-
"configurations": {
82-
"production": {
83-
"browserTarget": "laptop-holder:build:production"
16+
"sourceMap": true
8417
},
85-
"development": {
86-
"browserTarget": "laptop-holder:build:development"
18+
"production": {
19+
"optimization": true,
20+
"extractLicenses": true,
21+
"sourceMap": false,
22+
"outputHashing": "all"
8723
}
8824
},
89-
"defaultConfiguration": "development"
90-
},
91-
"extract-i18n": {
92-
"builder": "@angular-devkit/build-angular:extract-i18n",
93-
"options": {
94-
"browserTarget": "laptop-holder:build"
95-
}
96-
},
97-
"lint": {
98-
"builder": "@angular-devkit/build-angular:tslint",
25+
"defaultConfiguration": "production",
9926
"options": {
100-
"tsConfig": [
101-
"tsconfig.app.json",
102-
"tsconfig.spec.json",
103-
"e2e/tsconfig.json",
104-
"tsconfig.worker.json"
27+
"outputPath": "dist/laptop-holder",
28+
"index": "src/index.html",
29+
"browser": "src/main.ts",
30+
"polyfills": [
31+
"zone.js"
10532
],
106-
"exclude": [
107-
"**/node_modules/**"
108-
]
109-
}
110-
},
111-
"test": {
112-
"builder": "@angular-devkit/build-angular:karma",
113-
"options": {
114-
"main": "src/test.ts",
115-
"polyfills": "src/polyfills.ts",
116-
"tsConfig": "tsconfig.spec.json",
117-
"karmaConfig": "karma.conf.js",
33+
"tsConfig": "tsconfig.app.json",
11834
"assets": [
119-
"src/favicon.ico",
12035
"src/assets"
12136
],
12237
"styles": [
12338
"src/styles.css"
12439
],
12540
"scripts": []
12641
}
42+
},
43+
"serve": {
44+
"builder": "@angular/build:dev-server",
45+
"configurations": {
46+
"development": {
47+
"buildTarget": "laptop-holder:build:development"
48+
},
49+
"production": {
50+
"buildTarget": "laptop-holder:build:production"
51+
}
52+
},
53+
"defaultConfiguration": "development"
12754
}
128-
}
55+
},
56+
"prefix": "app",
57+
"projectType": "application",
58+
"root": "",
59+
"sourceRoot": "src"
12960
}
13061
},
131-
"defaultProject": "laptop-holder"
132-
}
62+
"version": 1
63+
}

examples/angular/babylonjs/laptop-holder/custom-webpack.config.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

examples/angular/babylonjs/laptop-holder/karma.conf.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)