|
| 1 | +# Bitbybit Monorepo |
| 2 | + |
| 3 | +> Open-source 3D CAD algorithms and NPM packages for web-based parametric modeling and visualization. Build once, run anywhere—no installation required. |
| 4 | + |
| 5 | +This monorepo contains the open-source core of Bitbybit platform, including multiple NPM packages for integrating 3D CAD capabilities into web applications using BabylonJS, Three.js, or PlayCanvas game engines. |
| 6 | + |
| 7 | +## Repository |
| 8 | + |
| 9 | +- GitHub: https://github.com/bitbybit-dev/bitbybit |
| 10 | +- License: MIT |
| 11 | + |
| 12 | +## Documentation |
| 13 | + |
| 14 | +- Learn Bitbybit: https://learn.bitbybit.dev |
| 15 | +- TypeScript API Reference: https://docs.bitbybit.dev |
| 16 | +- Main Platform: https://bitbybit.dev |
| 17 | + |
| 18 | +## Quick Start |
| 19 | + |
| 20 | +```bash |
| 21 | +npx @bitbybit-dev/create-app my-project |
| 22 | +``` |
| 23 | + |
| 24 | +Choose your game engine and start coding immediately. |
| 25 | + |
| 26 | +## NPM Packages |
| 27 | + |
| 28 | +### Game Engine Integrations |
| 29 | + |
| 30 | +| Package | Description | NPM | |
| 31 | +|---------|-------------|-----| |
| 32 | +| @bitbybit-dev/babylonjs | BabylonJS visualization and drawing | https://www.npmjs.com/package/@bitbybit-dev/babylonjs | |
| 33 | +| @bitbybit-dev/threejs | Three.js visualization and drawing | https://www.npmjs.com/package/@bitbybit-dev/threejs | |
| 34 | +| @bitbybit-dev/playcanvas | PlayCanvas visualization and drawing | https://www.npmjs.com/package/@bitbybit-dev/playcanvas | |
| 35 | + |
| 36 | +### Core Packages |
| 37 | + |
| 38 | +| Package | Description | NPM | |
| 39 | +|---------|-------------|-----| |
| 40 | +| @bitbybit-dev/core | Combined CAD kernel features | https://www.npmjs.com/package/@bitbybit-dev/core | |
| 41 | +| @bitbybit-dev/base | Base algorithms (vector math, transforms) | https://www.npmjs.com/package/@bitbybit-dev/base | |
| 42 | + |
| 43 | +### CAD Kernel Packages (Main Thread) |
| 44 | + |
| 45 | +| Package | Description | NPM | |
| 46 | +|---------|-------------|-----| |
| 47 | +| @bitbybit-dev/occt | OpenCascade B-rep CAD wrapper | https://www.npmjs.com/package/@bitbybit-dev/occt | |
| 48 | +| @bitbybit-dev/jscad | JSCAD CSG modeling wrapper | https://www.npmjs.com/package/@bitbybit-dev/jscad | |
| 49 | +| @bitbybit-dev/manifold | Manifold mesh booleans wrapper | https://www.npmjs.com/package/@bitbybit-dev/manifold | |
| 50 | + |
| 51 | +### Web Worker Packages (Non-blocking, Recommended) |
| 52 | + |
| 53 | +These packages run geometry computations in web workers for non-blocking UI. Same API as main thread packages, but all operations are asynchronous. |
| 54 | + |
| 55 | +| Package | Description | NPM | |
| 56 | +|---------|-------------|-----| |
| 57 | +| @bitbybit-dev/occt-worker | OpenCascade via web worker | https://www.npmjs.com/package/@bitbybit-dev/occt-worker | |
| 58 | +| @bitbybit-dev/jscad-worker | JSCAD via web worker | https://www.npmjs.com/package/@bitbybit-dev/jscad-worker | |
| 59 | +| @bitbybit-dev/manifold-worker | Manifold via web worker | https://www.npmjs.com/package/@bitbybit-dev/manifold-worker | |
| 60 | + |
| 61 | +## Package Structure |
| 62 | + |
| 63 | +``` |
| 64 | +packages/ |
| 65 | +└── dev/ |
| 66 | + ├── babylonjs/ # BabylonJS integration |
| 67 | + ├── threejs/ # Three.js integration |
| 68 | + ├── playcanvas/ # PlayCanvas integration |
| 69 | + ├── core/ # Core combining all kernels |
| 70 | + ├── base/ # Base algorithms |
| 71 | + ├── occt/ # OpenCascade wrapper |
| 72 | + ├── occt-worker/ # OCCT web worker |
| 73 | + ├── jscad/ # JSCAD wrapper |
| 74 | + ├── jscad-worker/ # JSCAD web worker |
| 75 | + ├── manifold/ # Manifold wrapper |
| 76 | + ├── manifold-worker/ # Manifold web worker |
| 77 | + └── create-app/ # Project scaffolding CLI |
| 78 | +``` |
| 79 | + |
| 80 | +## AI Context |
| 81 | + |
| 82 | +For AI coding assistants, use these resources to get comprehensive Bitbybit API knowledge. |
| 83 | + |
| 84 | +### AI Prompt Context Files (v0.21.0) |
| 85 | + |
| 86 | +#### Beginner Context (Monaco Editor) |
| 87 | +For online TypeScript editor at bitbybit.dev: |
| 88 | +- Full Context (116k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.0/bitbybit-babylon-monaco-ai-context-v0.21.0.md |
| 89 | + |
| 90 | +#### BabylonJS Context |
| 91 | +- Full (116k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.0/bitbybit-babylon-ai-context-v0.21.0.md |
| 92 | +- Lite (114k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.0/bitbybit-babylon-no-comment-min-ai-v0.21.0.txt |
| 93 | + |
| 94 | +#### Three.js Context |
| 95 | +- Full (95k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.0/bitbybit-three-ai-context-v0.21.0.md |
| 96 | +- Lite (82k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.0/bitbybit-three-no-comment-min-ai-v0.21.0.txt |
| 97 | + |
| 98 | +#### PlayCanvas Context |
| 99 | +- Full (94k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.0/bitbybit-playcanvas-ai-context-v0.21.0.md |
| 100 | +- Lite (82k tokens): https://app.bitbybit.dev/assets/ai-prompt-context/v0.21.0/bitbybit-playcanvas-no-comment-min-ai-v0.21.0.txt |
| 101 | + |
| 102 | +### Context7 MCP (Recommended) |
| 103 | + |
| 104 | +Live AI context with always up-to-date documentation. Works with Claude, Gemini, Grok. |
| 105 | + |
| 106 | +Add to your `.vscode/mcp.json`: |
| 107 | + |
| 108 | +```json |
| 109 | +{ |
| 110 | + "servers": [ |
| 111 | + { |
| 112 | + "command": "npx", |
| 113 | + "args": ["-y", "@upstash/context7-mcp@latest"], |
| 114 | + "env": { |
| 115 | + "DEFAULT_MINIMUM_TOKENS": "10000" |
| 116 | + } |
| 117 | + } |
| 118 | + ] |
| 119 | +} |
| 120 | +``` |
| 121 | + |
| 122 | +- Context7 Library: https://context7.com/bitbybit-dev/bitbybit |
| 123 | +- Integration Guide: https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/mcp/context-7 |
| 124 | + |
| 125 | +## Integration Guides |
| 126 | + |
| 127 | +- Three.js: https://learn.bitbybit.dev/learn/npm-packages/threejs |
| 128 | +- BabylonJS: https://learn.bitbybit.dev/learn/npm-packages/babylonjs |
| 129 | +- PlayCanvas: https://learn.bitbybit.dev/learn/npm-packages/playcanvas |
| 130 | +- Engine Agnostic: https://learn.bitbybit.dev/learn/npm-packages/game-engine-agnostic |
| 131 | + |
| 132 | +## Geometry Kernels |
| 133 | + |
| 134 | +### OpenCascade (OCCT) |
| 135 | +Industrial-grade B-rep kernel: |
| 136 | +- Boundary representation for exact geometry |
| 137 | +- Boolean operations (union, difference, intersection) |
| 138 | +- Fillets, chamfers, shell, offset operations |
| 139 | +- STEP/IGES import/export |
| 140 | +- Sweeps, lofts, pipes, revolutions |
| 141 | + |
| 142 | +### JSCAD |
| 143 | +JavaScript-based CSG modeling: |
| 144 | +- Constructive solid geometry operations |
| 145 | +- Lightweight for simple shapes |
| 146 | +- STL export for 3D printing |
| 147 | + |
| 148 | +### Manifold |
| 149 | +Fast mesh boolean operations: |
| 150 | +- Optimized for real-time operations |
| 151 | +- GPU-accelerated |
| 152 | +- Ideal for interactive applications |
| 153 | + |
| 154 | +## Example Applications |
| 155 | + |
| 156 | +- Laptop Holder: https://github.com/bitbybit-dev/app-examples/tree/main/angular/laptop-holder |
| 157 | +- Cup Configurator: https://github.com/bitbybit-dev/app-examples/tree/main/react/cup |
| 158 | +- Live Demos: https://app-store.bitbybit.dev |
| 159 | + |
| 160 | +## Contributing |
| 161 | + |
| 162 | +- Contributing Guide: CONTRIBUTING.md |
| 163 | +- Code of Conduct: CODE_OF_CONDUCT.md |
| 164 | +- Unit Testing Guide: UNIT_TESTING_GUIDE.md |
| 165 | + |
| 166 | +## Community |
| 167 | + |
| 168 | +- Discord: https://discord.gg/GSe3VMe |
| 169 | +- YouTube: https://www.youtube.com/@bitbybitdev |
| 170 | + |
| 171 | +## Support the Project |
| 172 | + |
| 173 | +Your contributions allow this project to exist: |
| 174 | + |
| 175 | +- Silver/Gold Plans: https://bitbybit.dev/auth/pick-plan |
| 176 | +- 3D Bits Shopify App: https://apps.shopify.com/3d-bits-1 |
| 177 | +- Crafts Shop: https://crafts.bitbybit.dev |
| 178 | + |
| 179 | +## Related llms.txt Files |
| 180 | + |
| 181 | +- Main Platform: https://bitbybit.dev/llms.txt |
| 182 | +- Documentation: https://learn.bitbybit.dev/llms.txt |
0 commit comments