Skip to content

Commit 2f2e7fc

Browse files
New npm package @bitbybit-dev/create-app. CLI tool to scaffold Bit By Bit Developers 3D/CAD projects with your favorite game engine.
1 parent 1b68849 commit 2f2e7fc

37 files changed

Lines changed: 2431 additions & 1 deletion

File tree

examples/vite/threejs/starter-template/src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ async function createOCCTGeometry(bitbybit: BitByBitBase, color: string) {
5151
drawOptions.drawVertices = true;
5252
drawOptions.vertexSize = 0.05;
5353
drawOptions.vertexColour = "#ffffff";
54+
5455
await bitbybit.draw.drawAnyAsync({
5556
entity: roundedCube,
5657
options: drawOptions,

packages/dev/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@bitbybit-dev/occt-worker": "0.21.0",
5959
"@bitbybit-dev/manifold-worker": "0.21.0",
6060
"@bitbybit-dev/jscad-worker": "0.21.0",
61-
"jsonpath-plus": "10.1.0",
61+
"jsonpath-plus": "10.3.0",
6262
"verb-nurbs-web": "2.1.3",
6363
"rxjs": "7.5.5"
6464
},

packages/dev/create-app/.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
7+
# IDE
8+
.idea/
9+
.vscode/
10+
*.swp
11+
*.swo
12+
13+
# OS
14+
.DS_Store
15+
Thumbs.db
16+
17+
# Logs
18+
*.log
19+
npm-debug.log*
20+
21+
# Coverage
22+
coverage/

packages/dev/create-app/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.

packages/dev/create-app/README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# @bitbybit-dev/create-app
2+
3+
🚀 **CLI tool to scaffold Bit By Bit Developers 3D/CAD projects with your favorite game engine**
4+
5+
Create stunning 3D/CAD applications with ease using our powerful geometry kernels: OCCT (OpenCascade), JSCAD, and Manifold.
6+
7+
## Quick Start
8+
9+
### Using npm init (Recommended)
10+
11+
```bash
12+
npm init @bitbybit-dev/app my-project
13+
```
14+
15+
### Using npx
16+
17+
```bash
18+
npx @bitbybit-dev/create-app my-project
19+
```
20+
21+
## Usage
22+
23+
### Interactive Mode
24+
25+
Simply run the command without options to enter interactive mode:
26+
27+
```bash
28+
npm init @bitbybit-dev/app my-project
29+
```
30+
31+
You'll be prompted to select:
32+
- 🎮 **Game Engine**: Three.js, Babylon.js, or PlayCanvas
33+
34+
### CLI Options
35+
36+
```bash
37+
npm init @bitbybit-dev/app my-project --engine threejs
38+
```
39+
40+
Available engines:
41+
- `threejs` - Three.js: Lightweight and flexible 3D library
42+
- `babylonjs` - Babylon.js: Powerful and feature-rich game engine
43+
- `playcanvas` - PlayCanvas: Fast and lightweight WebGL game engine
44+
45+
## What You Get
46+
47+
Each scaffolded project includes:
48+
49+
-**Vite** - Lightning fast build tool
50+
- 📘 **TypeScript** - Type-safe development
51+
- 🎨 **Bitbybit** - All geometry kernels pre-configured:
52+
- **OCCT** (OpenCascade) - Professional CAD kernel
53+
- **JSCAD** - Programmatic solid modeling
54+
- **Manifold** - Fast mesh boolean operations
55+
- 🎮 **Your chosen 3D engine** - Three.js, Babylon.js, or PlayCanvas
56+
57+
## After Scaffolding
58+
59+
Navigate to your project and start developing:
60+
61+
```bash
62+
cd my-project
63+
npm install
64+
npm run dev
65+
```
66+
67+
## Project Structure
68+
69+
```
70+
my-project/
71+
├── index.html
72+
├── package.json
73+
├── tsconfig.json
74+
├── public/
75+
│ └── vite.svg
76+
└── src/
77+
├── main.ts
78+
├── style.css
79+
└── vite-env.d.ts
80+
```
81+
82+
## Links
83+
84+
- 🌐 **Website**: [https://bitbybit.dev](https://bitbybit.dev)
85+
- 📚 **Documentation**: [https://bitbybit.dev/docs](https://bitbybit.dev/docs)
86+
- 💬 **Discord Community**: [https://discord.gg/GSe3VMe](https://discord.gg/GSe3VMe)
87+
- 🐛 **Issues**: [https://github.com/bitbybit-dev/bitbybit/issues](https://github.com/bitbybit-dev/bitbybit/issues)
88+
89+
## Support Us
90+
91+
**The best way to support Bit By Bit Developers is with a Silver or Gold plan subscription!**
92+
93+
[Subscribe Now](https://bitbybit.dev/auth/pick-plan)
94+
95+
## License
96+
97+
MIT © [Bit By Bit Developers](https://bitbybit.dev)

0 commit comments

Comments
 (0)