@bitbybit-dev/threejs
v1.1.1
Published
Bit By Bit Developers THREEJS CAD Library to Program Geometry
Downloads
558
Maintainers
Readme
@bitbybit-dev/threejs
Three.js engine integration for Bitbybit - draw and interact with CAD geometry from OCCT, JSCAD, and Manifold kernels directly in your Three.js scenes.
Overview
This package connects Bitbybit's powerful CAD kernels to the Three.js rendering engine. It includes three as a dependency, so you don't need to install Three.js separately. Create parametric 3D models with professional CAD operations and render them with Three.js's lightweight yet flexible rendering capabilities.
Quick Start
The fastest way to scaffold a Three.js + Bitbybit project:
npx @bitbybit-dev/create-app my-project --engine threejs
cd my-project
npm install
npm run devThis creates a complete Vite + TypeScript project with all three CAD kernels (OCCT, JSCAD, Manifold) pre-configured and rendering through Three.js. Learn more about the CLI.
Need Server-Side CAD?
The CLI first asks you to choose between a Frontend app or a CAD Cloud app. Select "cloud" to scaffold a full-stack project with a backend (Hono on Cloudflare Workers, Node.js Express, or ASP.NET Core) and a React + Three.js frontend. Your API key stays on the server and the frontend proxies requests through your backend:
npx @bitbybit-dev/create-app my-cloud-project --type cloudChoose from 5 backend templates: Hono + SDK, Hono + REST, Node.js + SDK, Node.js + REST, or .NET + REST. Each includes ready-to-run examples with model generation, batch operations, and CAD pipelines. Learn more.
Learn
| Topic | Link | |-------|------| | Quick Start Tutorial | https://learn.bitbybit.dev/learn/npm-packages/threejs/start-with-three-js | | About Three.js Integration | https://learn.bitbybit.dev/learn/npm-packages/threejs/about-threejs | | Advanced Parametric Model | https://learn.bitbybit.dev/learn/npm-packages/threejs/advanced-parametric-3d-model | | Hex House Concept | https://learn.bitbybit.dev/learn/npm-packages/threejs/hex-house-concept | | Three.js Engine Setup | https://learn.bitbybit.dev/learn/getting-started/engines/threejs | | AI-Assisted Development | https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/intro |
Links
| Resource | URL | |----------|-----| | GitHub | https://github.com/bitbybit-dev/bitbybit/tree/master/packages/dev/threejs | | Monorepo | https://github.com/bitbybit-dev/bitbybit | | NPM | https://www.npmjs.com/package/@bitbybit-dev/threejs | | Documentation | https://learn.bitbybit.dev/learn/npm-packages/threejs/start-with-three-js | | Unit Test Coverage | https://tests.bitbybit.dev/threejs |
Example Applications
| App | Source Code | |-----|-------------| | Hex Shell | GitHub | | Cup Configurator | GitHub | | Hex House Concept | GitHub | | Starter Template | GitHub | | Terrace Furniture (BabylonJS) | Closed source |
Development
# Build package
npm run build-p
# Run unit tests with coverage
npm run test-c
# Run live unit tests with coverage on save
npm run test-c-lBitbybit Platform
Beyond NPM packages, Bitbybit offers:
- Visual Programming Editors - Rete & Blockly drag-and-drop 3D modeling, plus a Monaco TypeScript editor
- CAD Cloud API - Build full pipelines that compose all Bitbybit algorithms, where each step can reference outputs of previous steps. Supports parametric model generation, STEP-to-glTF conversion, and complex CAD workflows via HTTP
- Bitbybit Studio - A growing visual dashboard where API Key users can generate models, convert files, build pipelines with a GUI, inspect tasks, and preview 3D results
- 3D Bits for Shopify - Interactive 3D product configurators for e-commerce
- Script Runners - Execute visual scripts directly on your website
- AI-Assisted Development - Context files for GitHub Copilot, Claude, and ChatGPT
- Business & Enterprise - We help businesses and enterprises develop custom applications and spin up optimized CAD tenant workflows on our managed servers
Support the Project
This package is part of the open-source Bitbybit ecosystem. Your subscription helps fund continued development.
⭐ Subscribe - Silver or Gold plan | Get API Key for CAD Cloud
Community
Major Dependencies
Three.js, OpenCascade, JSCAD, Manifold, Verbnurbs
License
MIT © Bit By Bit Developers
