Skip to content

Commit 4bd56fd

Browse files
app examples migrated to monorepo from other github repo, from now on the old repo is deprecated and developments will happen in this repository.
1 parent 6496f37 commit 4bd56fd

File tree

271 files changed

+179185
-0
lines changed

Some content is hidden

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

271 files changed

+179185
-0
lines changed

examples/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist
2+
node_modules
3+
.angular
4+
.nuxt
5+
.output

examples/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Bit By Bit Developers
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

examples/README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Bit By Bit Developers App Examples
2+
3+
<img src="https://app.bitbybit.dev/assets/git-cover.png" alt="Picture showing bitbybit.dev platform">
4+
5+
These app examples are meant to show how bitbybit npm packages can be used to create 3D models on the browser and on the server.
6+
Core, babylonjs and threejs libraries work only on the browser and are dependant on many great 3D libraries. bitbybit-occt library is much more versatile and can be used both on the nodejs and browser applications.
7+
8+
Visit https://bitbybit.dev to use our full cloud platform.
9+
10+
# App Example Frameworks
11+
We present examples with full integration for the most popular frameworks, such as Angular, React, NextJS, Nuxt, NodeJS with Express. Whenever possible we try to build a valid 3D model configurator, using either babylonjs or threejs game enegines for representation.
12+
13+
# Github
14+
https://github.com/bitbybit-dev/app-examples
15+
16+
# NPM
17+
BABYLONJS
18+
https://www.npmjs.com/package/@bitbybit-dev/babylonjs
19+
THREEJS
20+
https://www.npmjs.com/package/@bitbybit-dev/threejs
21+
CORE
22+
https://www.npmjs.com/package/@bitbybit-dev/core
23+
OCCT WORKER
24+
https://www.npmjs.com/package/@bitbybit-dev/occt-worker
25+
OCCT
26+
https://www.npmjs.com/package/@bitbybit-dev/occt
27+
28+
# Example Applications
29+
30+
Visit this page to find short overview of all the configurators built so far
31+
https://app-store.bitbybit.dev
32+
33+
Patterns
34+
THREEJS: https://app-store.bitbybit.dev/patterns
35+
Github Source Code - https://github.com/bitbybit-dev/app-examples/blob/main/webpack/threejs/src/code/patterns.ts
36+
37+
Laptop Holder
38+
BABYLONJS: https://app-store.bitbybit.dev/laptop-holder
39+
Github Source Code Angular - https://github.com/bitbybit-dev/app-examples/tree/main/angular/laptop-holder
40+
Github Source Code React - https://github.com/bitbybit-dev/app-examples/tree/main/react/laptop-holder
41+
42+
<img src="https://app.bitbybit.dev/assets/laptop-holder.png" alt="Laptop Holder Configurator">
43+
44+
3D Printable Vase
45+
THREEJS: https://app-store.bitbybit.dev/bitbybit-threejs
46+
Github Source Code - https://github.com/bitbybit-dev/app-examples/tree/main/react/bitbybit-threejs
47+
48+
<img src="https://app.bitbybit.dev/assets/bitbybit-threejs.png" alt="ThreeJS Vase Configurator">
49+
50+
Cup Configurator
51+
BABYLONJS: https://app-store.bitbybit.dev/cup
52+
Github Source Code - https://github.com/bitbybit-dev/app-examples/tree/main/react/cup
53+
54+
Cup Configurator
55+
THREEJS: https://app-store.bitbybit.dev/cup-three
56+
Github Source Code - https://github.com/bitbybit-dev/app-examples/blob/main/webpack/threejs/src/code/cup.ts
57+
58+
<img src="https://app.bitbybit.dev/assets/cup.png" alt="Cup Configurator">
59+
60+
Other Closed Source Apps We Built
61+
Terrace Furniture
62+
BABYLONJS: https://app-store.bitbybit.dev/terrace-furniture
63+
64+
<img src="https://app.bitbybit.dev/assets/terrace.png" alt="Terrace Furniture Configurator">
65+
66+
# Media Channels
67+
Discord: https://discord.gg/GSe3VMe
68+
Youtube: https://www.youtube.com/@bitbybitdev?sub_confirmation=1
69+
Instagram: https://www.instagram.com/bitbybit.dev
70+
Twitter: https://twitter.com/bitbybit_dev
71+
LinkedIn: https://lnkd.in/gQjEQA2
72+
Facebook: https://www.facebook.com/bitbybitdev
73+
Medium: https://bitbybit-dev.medium.com/
74+
75+
# Principles
76+
Bit By Bit Developers company will keep these core algorithms that you can find in this repository free and opensource for its users. These algorithms are based on other open-source projects, run and are deployed on the browser, thus there is no point of closing them down from public.
77+
78+
# About Bit By Bit Developers platform
79+
Bit By Bit Developers web platform allows creators to program geometry through simple visual programming language or choose monaco typescript editor with full intellisense of bitbybit API. This cloud platform can fulfil many practical, educational and artistic needs of its users. Through familiar programming interface used in tools such as Scratch and Blockly.Games we expose powerful 3D algorithms that make it easier to implement various parametric tasks. Our goal is to make it very simple for users to share their ideas and designs. We want to encourage everyone to engage in the future of this tool.
80+
81+
# Major Dependencies
82+
BabylonJS, ThreeJS, OpenCascade, JSCAD, Verbnurbs, React, Angular, NextJS, Nuxt, Webpack, NodeJS
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.angular
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# LaptopHolder
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.5.
4+
5+
## Development server
6+
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.
8+
9+
## Code scaffolding
10+
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`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16+
17+
## Running unit tests
18+
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.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"analytics": false
5+
},
6+
"version": 1,
7+
"newProjectRoot": "projects",
8+
"projects": {
9+
"laptop-holder": {
10+
"projectType": "application",
11+
"schematics": {
12+
"@schematics/angular:application": {
13+
"strict": true
14+
}
15+
},
16+
"root": "",
17+
"sourceRoot": "src",
18+
"prefix": "app",
19+
"architect": {
20+
"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+
},
43+
"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+
},
65+
"development": {
66+
"buildOptimizer": false,
67+
"optimization": false,
68+
"vendorChunk": true,
69+
"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"
84+
},
85+
"development": {
86+
"browserTarget": "laptop-holder:build:development"
87+
}
88+
},
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",
99+
"options": {
100+
"tsConfig": [
101+
"tsconfig.app.json",
102+
"tsconfig.spec.json",
103+
"e2e/tsconfig.json",
104+
"tsconfig.worker.json"
105+
],
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",
118+
"assets": [
119+
"src/favicon.ico",
120+
"src/assets"
121+
],
122+
"styles": [
123+
"src/styles.css"
124+
],
125+
"scripts": []
126+
}
127+
}
128+
}
129+
}
130+
},
131+
"defaultProject": "laptop-holder"
132+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
module: {
3+
rules: [
4+
{
5+
test: /\.wasm$/,
6+
type: "javascript/auto",
7+
loader: "file-loader",
8+
},
9+
{
10+
test: /\.m?js/,
11+
type: "javascript/auto",
12+
},
13+
{
14+
test: /\.m?js/,
15+
resolve: {
16+
fullySpecified: false,
17+
},
18+
}
19+
]
20+
},
21+
resolve: {
22+
fallback: {
23+
fs: false,
24+
path: false,
25+
crypto: false
26+
}
27+
}
28+
};
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, './coverage/laptop-holder'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
34+
},
35+
reporters: ['progress', 'kjhtml'],
36+
port: 9876,
37+
colors: true,
38+
logLevel: config.LOG_INFO,
39+
autoWatch: true,
40+
browsers: ['Chrome'],
41+
singleRun: false,
42+
restartOnFileChange: true
43+
});
44+
};

0 commit comments

Comments
 (0)