Skip to content

Commit 13797b1

Browse files
re-structured some of the tutorials, added getting started tutorials for 3 game engines, linked to them from docs pages.
1 parent d680e7c commit 13797b1

File tree

14 files changed

+458
-49
lines changed

14 files changed

+458
-49
lines changed

docs/docusaurus.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ const config: Config = {
9090
},
9191
{ to: "/learn/code/intro", label: "Code", position: "left" },
9292
{ to: "/learn/3d-bits/intro", label: "3D Bits", position: "left" },
93-
{ to: "/learn/npm-packages/threejs", label: "ThreeJS", position: "left" },
94-
{ to: "/learn/npm-packages/babylonjs", label: "BabylonJS", position: "left" },
95-
{ to: "/learn/npm-packages/playcanvas", label: "PlayCanvas", position: "left" },
93+
{ to: "/learn/getting-started/engines/threejs", label: "ThreeJS", position: "left" },
94+
{ to: "/learn/getting-started/engines/babylonjs", label: "BabylonJS", position: "left" },
95+
{ to: "/learn/getting-started/engines/playcanvas", label: "PlayCanvas", position: "left" },
9696
{ to: "/blog", label: "Blog", position: "left" },
9797
{ to: "https://bitbybit.dev", label: "Home", position: "left" },
9898
{
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"label": "Game Engines",
3+
"position": 7,
4+
"link": {
5+
"type": "generated-index",
6+
"title": "Getting Started with Game Engines",
7+
"description": "Choose your preferred 3D game engine and learn how to integrate Bitbybit's CAD capabilities. We support BabylonJS, ThreeJS, and PlayCanvas.",
8+
"slug": "/getting-started/engines"
9+
}
10+
}
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
sidebar_position: 1
3+
title: "Getting Started with BabylonJS"
4+
sidebar_label: "BabylonJS"
5+
description: "Get started with Bitbybit and BabylonJS - our fully integrated 3D game engine. Learn about integration approaches including visual editors, NPM packages, and runners."
6+
tags: [getting-started, babylonjs, engines]
7+
---
8+
9+
import Admonition from '@theme/Admonition';
10+
11+
# Getting Started with BabylonJS
12+
13+
<img
14+
src="https://bitbybit.dev/assets/babylon_logo.png"
15+
width="150"
16+
alt="BabylonJS Logo"
17+
title="BabylonJS Logo" />
18+
19+
BabylonJS is a powerful, open-source game and rendering engine for the web. It's also the native rendering engine for all Bitbybit visual programming editors, which means you get the most complete integration experience with this engine.
20+
21+
**Official homepage:** <a href="https://babylonjs.com/" target="_blank" rel="noopener noreferrer">babylonjs.com</a>
22+
23+
---
24+
25+
## Three Ways to Use BabylonJS with Bitbybit
26+
27+
### 1. Visual Editors (No Setup Required)
28+
29+
The easiest way to get started. Just open one of our online editors and start building:
30+
31+
- **<a href="https://bitbybit.dev/app?editor=rete" target="_blank" rel="noopener noreferrer">Rete Editor</a>** - Connect visual nodes to create parametric 3D models. If you've used Grasshopper, Dynamo, or Blender Nodes, this will feel familiar.
32+
33+
- **<a href="https://bitbybit.dev/app?editor=blockly" target="_blank" rel="noopener noreferrer">Blockly Editor</a>** - Drag and drop blocks to build 3D models. Great for beginners and educational settings.
34+
35+
- **<a href="https://bitbybit.dev/app?editor=monaco" target="_blank" rel="noopener noreferrer">Monaco Editor</a>** - Write TypeScript code directly in your browser with full intellisense.
36+
37+
Scripts created in any of these editors can be exported as JavaScript and run on your own website using Bitbybit Runners.
38+
39+
---
40+
41+
### 2. NPM Packages (For Developers)
42+
43+
If you're building a production application or prefer working with TypeScript in your own development environment, use our NPM packages.
44+
45+
The quickest way to start a new project:
46+
47+
```bash
48+
npx @bitbybit-dev/create-app my-project --engine babylonjs
49+
cd my-project
50+
npm install
51+
npm run dev
52+
```
53+
54+
This creates a ready-to-run project with Vite, TypeScript, and all three CAD kernels (OCCT, JSCAD, Manifold) pre-configured.
55+
56+
NPM packages give you full TypeScript support with intellisense, optimized bundle sizes through tree-shaking, and are the recommended approach for production applications.
57+
58+
Note that NPM packages only include our open-source algorithms. To understand which parts of Bitbybit are open-source and which are not, see our [Open Source Approach](/learn/open-source-approach) guide.
59+
60+
**Detailed setup guide:** [Quick Start with BabylonJS](/learn/npm-packages/babylonjs/start-with-babylon-js)
61+
62+
---
63+
64+
### 3. Runners (Quick Prototypes)
65+
66+
Runners are single JavaScript files that bundle everything you need. They're perfect when you want to quickly prototype something without setting up a build environment.
67+
68+
**Full Runner** - Includes both BabylonJS and Bitbybit in one file:
69+
70+
```html
71+
<script src="https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@latest/runner/bitbybit-runner-babylonjs.js"></script>
72+
```
73+
74+
**Lite Runner** - Just Bitbybit, you load BabylonJS separately (smaller download):
75+
76+
```html
77+
<script src="https://cdn.babylonjs.com/babylon.js"></script>
78+
<script src="https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@latest/runner/bitbybit-runner-babylonjs-lite.js"></script>
79+
```
80+
81+
Runners work great for demos on CodePen, JSFiddle, or StackBlitz. However, they only support JavaScript (no TypeScript) and have larger bundle sizes, so NPM packages are better for production work.
82+
83+
**Learn more:** [Introduction to Runners](/learn/runners/intro) - Understand runner capabilities, limitations, and how to export visual scripts as JavaScript.
84+
85+
**Runner guides:** [Full Runner](/learn/runners/engines/babylonjs/full-runner) | [Lite Runner](/learn/runners/engines/babylonjs/lite-runner)
86+
87+
---
88+
89+
## NPM vs Runners - Which Should I Use?
90+
91+
**Choose NPM packages** when you're building something for production, want TypeScript support, or need optimized bundle sizes.
92+
93+
**Choose Runners** when you're prototyping, creating quick demos, or just want to experiment without any setup.
94+
95+
---
96+
97+
## Next Steps
98+
99+
If you're new to 3D programming, start with the <a href="https://bitbybit.dev/app?editor=rete" target="_blank" rel="noopener noreferrer">Rete Editor</a> to get familiar with the concepts visually.
100+
101+
If you're a developer ready to build, run the NPX command above and check out the [starter template guide](/learn/npm-packages/babylonjs/start-with-babylon-js).
102+
103+
If you want to understand BabylonJS better, read [About BabylonJS](/learn/npm-packages/babylonjs/about-babylonjs) for a deeper look at the engine's capabilities.
104+
105+
---
106+
107+
## Resources
108+
109+
- [About BabylonJS](/learn/npm-packages/babylonjs/about-babylonjs) - Engine overview and features
110+
- [NPM Package](https://www.npmjs.com/package/@bitbybit-dev/babylonjs)
111+
- [GitHub Examples](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/babylonjs)
112+
- [BabylonJS Documentation](https://doc.babylonjs.com/)
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
sidebar_position: 3
3+
title: "Getting Started with PlayCanvas"
4+
sidebar_label: "PlayCanvas"
5+
description: "Get started with Bitbybit and PlayCanvas - a powerful WebGL game engine. Learn about NPM packages and runners integration approaches."
6+
tags: [getting-started, playcanvas, engines]
7+
---
8+
9+
import Admonition from '@theme/Admonition';
10+
11+
# Getting Started with PlayCanvas
12+
13+
<img
14+
src="/img/playcanvas.png"
15+
width="200"
16+
alt="PlayCanvas Logo"
17+
title="PlayCanvas Logo" />
18+
19+
PlayCanvas is a high-performance WebGL game engine known for its speed and mobile optimization. It features an open-source engine (MIT licensed) and is particularly well-suited for interactive 3D experiences that need to run smoothly across devices.
20+
21+
**Official homepage:** <a href="https://playcanvas.com/" target="_blank" rel="noopener noreferrer">playcanvas.com</a>
22+
23+
<Admonition type="info" title="Note">
24+
Our visual programming editors (Rete, Blockly, Monaco) use BabylonJS as their rendering engine. For PlayCanvas, you'll work with NPM packages or Runners directly.
25+
</Admonition>
26+
27+
---
28+
29+
## Two Ways to Use PlayCanvas with Bitbybit
30+
31+
### 1. NPM Packages (Recommended)
32+
33+
If you're building a production application or prefer working with TypeScript, use our NPM packages.
34+
35+
The quickest way to start a new project:
36+
37+
```bash
38+
npx @bitbybit-dev/create-app my-project --engine playcanvas
39+
cd my-project
40+
npm install
41+
npm run dev
42+
```
43+
44+
This creates a ready-to-run project with Vite, TypeScript, and all three CAD kernels (OCCT, JSCAD, Manifold) pre-configured.
45+
46+
NPM packages give you full TypeScript support with intellisense, optimized bundle sizes through tree-shaking, and are the recommended approach for production applications.
47+
48+
Note that NPM packages only include our open-source algorithms. To understand which parts of Bitbybit are open-source and which are not, see our [Open Source Approach](/learn/open-source-approach) guide.
49+
50+
**Detailed setup guide:** [Quick Start with PlayCanvas](/learn/npm-packages/playcanvas/start-with-playcanvas)
51+
52+
---
53+
54+
### 2. Runners (Quick Prototypes)
55+
56+
Runners are single JavaScript files that bundle everything you need. They're perfect when you want to quickly prototype something without setting up a build environment.
57+
58+
**Full Runner** - Includes both PlayCanvas and Bitbybit in one file:
59+
60+
```html
61+
<script src="https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@latest/runner/bitbybit-runner-playcanvas.js"></script>
62+
```
63+
64+
**Lite Runner** - Just Bitbybit, you load PlayCanvas separately (smaller download):
65+
66+
```html
67+
<script src="https://cdn.playcanvas.com/playcanvas-stable.min.js"></script>
68+
<script src="https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@latest/runner/bitbybit-runner-playcanvas-lite.js"></script>
69+
```
70+
71+
Runners work great for demos on CodePen, JSFiddle, or StackBlitz. However, they only support JavaScript (no TypeScript) and have larger bundle sizes, so NPM packages are better for production work.
72+
73+
**Learn more:** [Introduction to Runners](/learn/runners/intro) - Understand runner capabilities, limitations, and how to export visual scripts as JavaScript.
74+
75+
**Runner guides:** [Full Runner](/learn/runners/engines/playcanvas/full-runner) | [Lite Runner](/learn/runners/engines/playcanvas/lite-runner)
76+
77+
---
78+
79+
## NPM vs Runners - Which Should I Use?
80+
81+
**Choose NPM packages** when you're building something for production, want TypeScript support, or need optimized bundle sizes.
82+
83+
**Choose Runners** when you're prototyping, creating quick demos, or just want to experiment without any setup.
84+
85+
---
86+
87+
## What About Visual Editors?
88+
89+
Our visual editors use BabylonJS for rendering, but the CAD algorithms are engine-agnostic. This means you can prototype ideas in our visual editors, export the script, and adapt it for PlayCanvas. The Bitbybit API is largely the same across engines - the main differences are in initialization and drawing functions.
90+
91+
---
92+
93+
## Next Steps
94+
95+
If you're ready to build, run the NPX command above and check out the [starter template guide](/learn/npm-packages/playcanvas/start-with-playcanvas).
96+
97+
If you want to understand PlayCanvas better, read [About PlayCanvas](/learn/npm-packages/playcanvas/about-playcanvas) for a deeper look at the engine's capabilities.
98+
99+
---
100+
101+
## Resources
102+
103+
- [About PlayCanvas](/learn/npm-packages/playcanvas/about-playcanvas) - Engine overview and features
104+
- [NPM Package](https://www.npmjs.com/package/@bitbybit-dev/playcanvas)
105+
- [GitHub Examples](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/playcanvas)
106+
- [PlayCanvas Documentation](https://developer.playcanvas.com/)
107+
- [PlayCanvas Examples](https://playcanvas.github.io/)
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
sidebar_position: 2
3+
title: "Getting Started with ThreeJS"
4+
sidebar_label: "ThreeJS"
5+
description: "Get started with Bitbybit and ThreeJS - the world's most popular WebGL library. Learn about NPM packages and runners integration approaches."
6+
tags: [getting-started, threejs, engines]
7+
---
8+
9+
import Admonition from '@theme/Admonition';
10+
11+
# Getting Started with ThreeJS
12+
13+
<img
14+
src="https://bitbybit.dev/assets/threejs-logo.png"
15+
width="150"
16+
alt="ThreeJS Logo"
17+
title="ThreeJS Logo" />
18+
19+
ThreeJS is a popular JavaScript library for creating 3D graphics in the browser. It provides a simpler API on top of WebGL and has a huge community with countless examples and resources.
20+
21+
**Official homepage:** <a href="https://threejs.org/" target="_blank" rel="noopener noreferrer">threejs.org</a>
22+
23+
<Admonition type="info" title="Note">
24+
Our visual programming editors (Rete, Blockly, Monaco) use BabylonJS as their rendering engine. For ThreeJS, you'll work with NPM packages or Runners directly.
25+
</Admonition>
26+
27+
---
28+
29+
## Two Ways to Use ThreeJS with Bitbybit
30+
31+
### 1. NPM Packages (Recommended)
32+
33+
If you're building a production application or prefer working with TypeScript, use our NPM packages.
34+
35+
The quickest way to start a new project:
36+
37+
```bash
38+
npx @bitbybit-dev/create-app my-project --engine threejs
39+
cd my-project
40+
npm install
41+
npm run dev
42+
```
43+
44+
This creates a ready-to-run project with Vite, TypeScript, and all three CAD kernels (OCCT, JSCAD, Manifold) pre-configured.
45+
46+
NPM packages give you full TypeScript support with intellisense, optimized bundle sizes through tree-shaking, and are the recommended approach for production applications.
47+
48+
Note that NPM packages only include our open-source algorithms. To understand which parts of Bitbybit are open-source and which are not, see our [Open Source Approach](/learn/open-source-approach) guide.
49+
50+
**Detailed setup guide:** [Quick Start with ThreeJS](/learn/npm-packages/threejs/start-with-three-js)
51+
52+
---
53+
54+
### 2. Runners (Quick Prototypes)
55+
56+
Runners are single JavaScript files that bundle everything you need. They're perfect when you want to quickly prototype something without setting up a build environment.
57+
58+
**Full Runner** - Includes both ThreeJS and Bitbybit in one file:
59+
60+
```html
61+
<script src="https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@latest/runner/bitbybit-runner-threejs.js"></script>
62+
```
63+
64+
**Lite Runner** - Just Bitbybit, you load ThreeJS separately (smaller download):
65+
66+
```html
67+
<script src="https://cdn.jsdelivr.net/npm/three@latest/build/three.min.js"></script>
68+
<script src="https://cdn.jsdelivr.net/gh/bitbybit-dev/bitbybit-assets@latest/runner/bitbybit-runner-threejs-lite.js"></script>
69+
```
70+
71+
Runners work great for demos on CodePen, JSFiddle, or StackBlitz. However, they only support JavaScript (no TypeScript) and have larger bundle sizes, so NPM packages are better for production work.
72+
73+
**Learn more:** [Introduction to Runners](/learn/runners/intro) - Understand runner capabilities, limitations, and how to export visual scripts as JavaScript.
74+
75+
**Runner guides:** [Full Runner](/learn/runners/engines/threejs/full-runner) | [Lite Runner](/learn/runners/engines/threejs/lite-runner)
76+
77+
---
78+
79+
## NPM vs Runners - Which Should I Use?
80+
81+
**Choose NPM packages** when you're building something for production, want TypeScript support, or need optimized bundle sizes.
82+
83+
**Choose Runners** when you're prototyping, creating quick demos, or just want to experiment without any setup.
84+
85+
---
86+
87+
## What About Visual Editors?
88+
89+
Our visual editors use BabylonJS for rendering, but the CAD algorithms are engine-agnostic. This means you can prototype ideas in our visual editors, export the script, and adapt it for ThreeJS. The Bitbybit API is largely the same across engines - the main differences are in initialization and drawing functions.
90+
91+
---
92+
93+
## Next Steps
94+
95+
If you're ready to build, run the NPX command above and check out the [starter template guide](/learn/npm-packages/threejs/start-with-three-js).
96+
97+
If you want to understand ThreeJS better, read [About ThreeJS](/learn/npm-packages/threejs/about-threejs) for a deeper look at the library's capabilities.
98+
99+
---
100+
101+
## Resources
102+
103+
- [About ThreeJS](/learn/npm-packages/threejs/about-threejs) - Library overview and features
104+
- [NPM Package](https://www.npmjs.com/package/@bitbybit-dev/threejs)
105+
- [GitHub Examples](https://github.com/bitbybit-dev/bitbybit/tree/master/examples/vite/threejs)
106+
- [ThreeJS Documentation](https://threejs.org/docs/)
107+
- [ThreeJS Examples](https://threejs.org/examples/)

docs/learn/getting-started/overview.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,29 @@ The Monaco editor provides a full code-based environment using TypeScript, aimed
7575

7676
## Open-Source NPM Packages (MIT Licensed)
7777

78-
For developers who want to integrate our core geometric algorithms and functionalities directly into their own web applications, we offer a suite of **open-source NPM packages**. Our two main game engine-based libraries are:
78+
For developers who want to integrate our core geometric algorithms and functionalities directly into their own web applications, we offer a suite of **open-source NPM packages**. Our game engine-based libraries include:
7979

80-
* `@bitbybit-dev/threejs`
81-
* `@bitbybit-dev/babylonjs`
80+
* `@bitbybit-dev/babylonjs` - [Getting Started Guide](/learn/getting-started/engines/babylonjs)
81+
* `@bitbybit-dev/threejs` - [Getting Started Guide](/learn/getting-started/engines/threejs)
82+
* `@bitbybit-dev/playcanvas` - [Getting Started Guide](/learn/getting-started/engines/playcanvas)
8283

8384
These allow you to leverage our CAD capabilities within your preferred 3D rendering environment.
8485

8586
**Key Features & Benefits:**
8687
* **Flexibility:** Build custom 3D tools, viewers, or applications tailored to your specific needs.
87-
* **Integration:** Seamlessly incorporate our computational geometry capabilities into your existing JavaScript or TypeScript projects using either ThreeJS or BabylonJS.
88+
* **Integration:** Seamlessly incorporate our computational geometry capabilities into your existing JavaScript or TypeScript projects.
8889
* **Community & Control:** Leverage the power of open-source, contribute, or fork as needed.
8990
* **MIT Licensed:** All our core NPM packages are licensed under the permissive MIT license, granting you broad freedom to use, modify, and distribute your projects.
9091

92+
<Admonition type="tip" title="Quick Start with Any Engine">
93+
The fastest way to get started is using our NPX scaffolding tool:
94+
```bash
95+
npx @bitbybit-dev/create-app my-project --engine babylonjs
96+
# or --engine threejs
97+
# or --engine playcanvas
98+
```
99+
</Admonition>
100+
91101
<Admonition type="info" title="What's Included (and Not Included)">
92102
<p>Our NPM packages provide the foundational geometric algorithms and data structures that power our platform, along with rendering integrations for ThreeJS and BabylonJS.</p>
93103
<p>They generally **do not** include:</p>

0 commit comments

Comments
 (0)