@bitbybit-dev/jscad-worker

中文文档
1.6.0发布于 2026/10/29MITTypeScriptES Module构建来源已验证近 30 天下载 3347

Bit By Bit Developers JSCAD Based CAD Library to Program Geometry Via WebWorker

原始使用文档
文档目录13 节
  1. Overview
  2. Quick Start
  3. Need Server-Side CAD?
  4. Use It With an AI Agent
  5. Links
  6. API reference
  7. Example Applications
  8. Development
  9. Bitbybit Platform
  10. Support the Project
  11. Community
  12. Major Dependencies
  13. License

@bitbybit-dev/jscad-worker

Non-blocking WebWorker wrapper for @bitbybit-dev/jscad - run JSCAD solid modeling operations asynchronously without freezing the UI.

Picture showing bitbybit.dev platform

Overview

This package exposes JSCAD 3D algorithms from Bitbybit via a WebWorker, making all CSG and solid modeling operations asynchronous and non-blocking. Perfect for complex parametric designs that need responsive UIs.

Designed for browser environments. For Node.js, use @bitbybit-dev/jscad directly.

Quick Start

The fastest way to scaffold a project with JSCAD pre-configured:

npx @bitbybit-dev/create-app my-project --engine babylonjs
cd my-project
npm install
npm run dev

This creates a complete Vite + TypeScript project with JSCAD (via WebWorker), OCCT, and Manifold kernels ready to use. 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 cloud

Choose 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.

Use It With an AI Agent

An agent that does not know an API invents plausible names for it, and Bitbybit has more functions across its three CAD kernels than any model holds in memory. The free Bitbybit CAD MCP server removes the guesswork: your agent looks up the exact signature, parameter defaults, return type and examples for the version of @bitbybit-dev/jscad-worker your project has installed, and writes code that compiles the first time.

claude mcp add --transport http bitbybit https://mcp.bitbybit.dev/mcp

Cursor, VS Code, claude.ai, ChatGPT and the Claude API connect to the same endpoint; npx -y @bitbybit-dev/mcp runs the same server locally, pinned to your installed version. Every configuration is here.

With a CAD Cloud key, the Bitbybit CAD Cloud MCP goes further and lets the agent run the geometry for you - measure a STEP file, run a pipeline, convert to glTF - and hand back the results as files. For assistants that cannot speak MCP, the whole API is also published as context files. The AI section of the documentation explains all of it.

ResourceURL
GitHubhttps://github.com/bitbybit-dev/bitbybit/tree/master/packages/dev/jscad-worker
Monorepohttps://github.com/bitbybit-dev/bitbybit
NPMhttps://www.npmjs.com/package/@bitbybit-dev/jscad-worker
Documentationhttps://learn.bitbybit.dev/learn/npm-packages/intro
API Referencehttps://docs.bitbybit.dev/classes/Bit.JSCAD
Unit Test Coveragehttps://github.com/bitbybit-dev/bitbybit/actions/workflows/verify.yml

API reference

Every class, method and input type in this package is documented in the generated TypeScript API reference:

Example Applications

AppSource Code
Hex ShellGitHub
Cup ConfiguratorGitHub
Terrace Furniture (BabylonJS)Closed source

Development

# Build package
npm run build-p

# Run unit tests with coverage
npm run test:coverage

# Re-run them as you edit
npm run test:watch

Bitbybit 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
  • Built for AI Coding Agents - The free Bitbybit CAD MCP gives Claude Code, Cursor, VS Code, claude.ai and ChatGPT the exact API of the version you use; with a key, the CAD Cloud MCP runs the geometry too
  • 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

JSCAD

License

MIT © Bit By Bit Developers

版本与发布记录

@bitbybit-dev/jscad-worker 共发布 53 个版本,首次发布于 2024/11/26;过去 12 个月发布了 30 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.6.0latest2026/10/2910 天前
1.6.0-rc.0rc2026/10/2811 天前
1.5.02026/10/1227 天前
1.5.0-rc.02026/10/1227 天前
1.4.12026/10/021 个月前
1.4.02026/09/301 个月前

其他发布通道:alpha → 0.19.0-alpha.0,rc → 1.6.0-rc.0。

关于 @bitbybit-dev/jscad-worker 的常见问题

@bitbybit-dev/jscad-worker 是什么?

Bit By Bit Developers JSCAD Based CAD Library to Program Geometry Via WebWorker

如何安装 @bitbybit-dev/jscad-worker?

在项目目录运行 npm install @bitbybit-dev/jscad-worker,或使用 pnpm add / yarn add / bun add。

@bitbybit-dev/jscad-worker 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bitbybit-dev/jscad-worker 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bitbybit-dev/jscad-worker 可以商用吗?

@bitbybit-dev/jscad-worker 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bitbybit-dev/jscad-worker 的下载量有多少?

根据 npm 官方下载统计,@bitbybit-dev/jscad-worker 在 2026/10/08 – 2026/11/06 这 30 天内被下载 3,347 次,日均约 112 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bitbybit-dev/jscad-worker 还在维护吗?

最新版本 1.6.0 发布于 2026/10/29(10 天前);至今共发布 53 个版本,其中过去 12 个月发布了 30 个;首次发布于 2024/11/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。