Skip to content

Commit 1b1818a

Browse files
Merge pull request #79 from bitbybit-dev/develop
update to docs and examples
2 parents babb8e3 + 4168059 commit 1b1818a

69 files changed

Lines changed: 6006 additions & 2093 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Bitbybit Monorepo
22

3-
This git repo contains multiple bitbybit packages and contains code for core 3D algorithms of Bitbybit platform which are open-sourced under MIT license.
3+
This git repo contains multiple bitbybit packages and code for core 3D algorithms of Bitbybit platform which are open-sourced under MIT license.
44

55
# [FULL PLATFORM AT BITBYBIT.DEV](https://bitbybit.dev)
66
# [LEARN BITBYBIT](https://learn.bitbybit.dev)

docs/blog/2024-04-23-introducing-bitbybit-runner.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ We've developed and launched three different types of examples to demonstrate a
6060
When you only need to run a script created in Bitbybit.dev without much external interaction, this is a good starting point. There are several ways to load the exported script file into your website, but perhaps the simplest is to just copy and paste its content and assign it to a variable or return it from a function.
6161

6262
We've provided this example on three popular external coding sites:
63-
* [StackBlitz Example](https://stackblitz.com/edit/stackblitz-starters-f6d3a2?file=script.js)
63+
* [StackBlitz Example](https://stackblitz.com/edit/bitbybit-dev-runner-example-inline-string-embed-from-ret?file=script.js)
6464
* [JSFiddle Example](https://jsfiddle.net/matas_bitbybitdev/sa5jroqn/11/)
6565
* [CodePen Example](https://codepen.io/matas-bitbybit-dev/pen/XWQoxmX)
6666

@@ -98,7 +98,7 @@ While this example is basic, it includes all the essential elements of a 3D conf
9898
* Demonstration of how you can provide inputs to your exported Rete script and read outputs from it.
9999

100100
Check out the examples:
101-
* [StackBlitz Example](https://stackblitz.com/edit/stackblitz-starters-ohhh1g?file=script.js)
101+
* [StackBlitz Example](https://stackblitz.com/edit/bitbybit-dev-runner-example-io-from-rete-editor?file=index.html,script.js)
102102
* [JSFiddle Example](https://jsfiddle.net/matas_bitbybitdev/z1pku4gj/3/)
103103
* [CodePen Example](https://codepen.io/matas-bitbybit-dev/pen/KKYbJdj)
104104

docs/docusaurus.config.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,23 @@ const config: Config = {
3030
defaultLocale: "en",
3131
locales: ["en"],
3232
},
33-
33+
plugins: [
34+
[
35+
"@docusaurus/plugin-client-redirects",
36+
{
37+
redirects: [
38+
{
39+
from: "/learn/npm-packages/start-with-three-js",
40+
to: "/learn/npm-packages/threejs/start-with-three-js",
41+
},
42+
{
43+
from: "/learn/npm-packages/start-with-babylon-js",
44+
to: "/learn/npm-packages/babylonjs/start-with-babylon-js",
45+
},
46+
],
47+
}
48+
],
49+
],
3450
presets: [
3551
[
3652
"classic",
@@ -65,7 +81,7 @@ const config: Config = {
6581
],
6682
themeConfig: {
6783
// Replace with your project's social card
68-
image: "img/docusaurus-social-card.jpg",
84+
image: "img/learn-bitbybit-social-card.jpeg",
6985
colorMode: {
7086
defaultMode: "dark",
7187
disableSwitch: false,

docs/learn/3d-bits/faq.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
sidebar_position: 2
3+
title: "3D Bits Shopify App - FAQ"
4+
sidebar_label: "3D Bits FAQ"
5+
description: "Frequently asked questions about using the 3D Bits app to integrate 3D models and product configurators into your Shopify store."
6+
tags: [shopify, 3d-bits]
7+
---
8+
9+
import Admonition from '@theme/Admonition';
10+
11+
# 3D Bits Shopify App: Frequently Asked Questions
12+
13+
As 3D Bits makes its way into Shopify stores, we’ve started getting some recurring questions from merchants. So, here’s a quick FAQ with some honest answers to help you understand what 3D Bits can do for your store.
14+
15+
<Admonition type="info" title="Don't see your question answered?">
16+
<p>If you have other questions or just need some initial guidance, please contact us, we're here to help you out!</p>
17+
<a href="mailto:info@bitbybit.dev">info@bitbybit.dev</a>
18+
</Admonition>
19+
20+
---
21+
22+
### Can I use 3D Bits if I have zero coding skills?
23+
24+
**Yes, absolutely!** If you can click buttons and copy-paste, you’re good to go for basic 3D model display.
25+
26+
**Here's the simple process:**
27+
1. Install 3D Bits app, subscribe for a trial and pin it.
28+
2. Go to Metafields sections within the app admin page and hit create button.
29+
3. Upload your 3D models to Shopify via **Content > Files**.
30+
4. Copy the link to your uploaded 3D model.
31+
5. Paste this link into one of our designated 3D Bits metafields associated with your product.
32+
6. Voilà! Your 3D model should now appear on your product page.
33+
34+
Feeling a bit more adventurous but still don't want to code? You can try our **BITBYBIT VIEWER** editor block within the Shopify Theme Editor. It allows for arranging slightly fancier scenes with multiple models or different camera angles, still without writing any code – just courage required!
35+
36+
<Admonition type="note" title="Quick Start Guide">
37+
For a detailed walkthrough, check out our guide: <a href="/learn/3d-bits/theme-app-extensions/bitbybit-viewer" target="_blank" rel="noopener noreferrer">3D Bits Setup Guide</a>.
38+
</Admonition>
39+
40+
---
41+
42+
### Can I build a product configurator without writing code?
43+
44+
**To a certain extent, yes.**
45+
46+
The **BITBYBIT VIEWER** block (used within the Viewer Editor) lets you match static 3D models with your existing Shopify product variants. This is great for handling common scenarios like:
47+
* Showing a different 3D model for each color option (e.g., a blue chair model when "Blue" is selected).
48+
* Displaying different models for size variations.
49+
50+
<Admonition type="info" title="Our Design Philosophy">
51+
As technical founders, our initial inclination was to build in complex parametric logic for everything. However, we quickly realized that many merchants simply want to achieve straightforward visual changes based on standard Shopify variants – like showing the blue chair when "Blue" is selected. And that's perfectly fine and often all that's needed! 3D Bits handles this simple variant swapping effectively.
52+
</Admonition>
53+
54+
- Have GLTF files ready? Check this tutorial: [No-Code GLTF Configurators with BITBYBIT VIEWER Editor on Shopify](/learn/3d-bits/tutorials/viewer-no-code-gltf-configurators)
55+
- Want to use 3D scans (Gaussian splatting)? [No-Code Gaussian Splat Configurators with BITBYBIT VIEWER Editor on Shopify](/learn/3d-bits/tutorials/viewer-no-code-3d-scan-configurators)
56+
57+
For more complex configurators (e.g., where parts change dynamically beyond pre-set variants, or intricate rules are needed), you'd likely need to explore options involving some level of scripting, as discussed in later questions.
58+
59+
---
60+
61+
### I already use [bitbybit.dev](https://bitbybit.dev) for my projects – can I connect those to Shopify?
62+
63+
**Yes, you can!**
64+
65+
* **For Simple Previews:** Use the **BITBYBIT PREVIEW** extension block in the Shopify Theme Editor. Make your project public on `bitbybit.dev`, and paste the project link into the block. That’s it! This is great for showcasing existing non-interactive or pre-animated scenes.
66+
* **For More Interactivity:** If you want your `bitbybit.dev` script to react to Shopify variants or other page elements, you'll need to integrate your scripts using the **BITBYBIT RUNNER** theme extension block. This involves exporting your script from `bitbybit.dev` (as a JavaScript snippet) and then setting up the Runner block to execute it. This approach is more complex but offers much greater control.
67+
68+
<Admonition type="note" title="Integration Guide">
69+
Learn more about connecting your projects: <a href="/learn/3d-bits/theme-app-extensions/bitbybit-preview" target="_blank" rel="noopener noreferrer">Connecting bitbybit.dev Projects to Shopify</a>.
70+
</Admonition>
71+
72+
---
73+
74+
### We’re developers building stores for merchants. Should we bother with 3D Bits?
75+
76+
**Definitely.**
77+
78+
While you *can* build everything from scratch (integrating a WebGL viewer, handling model loading, Shopify integration, etc.), ask yourself: do you really want to keep reinventing that wheel for each new theme or client?
79+
80+
81+
3D Bits handles the essential groundwork:
82+
* Easy 3D model embedding.
83+
* Shopify metafield integration for 3D assets.
84+
* Basic variant-to-model mapping.
85+
* A bridge (the Runner block) for your custom JavaScript/TypeScript logic to interact with the 3D scene.
86+
87+
This frees you up to focus on the unique business logic, creative 3D experiences, and advanced interactivity your clients need, rather than spending time wrangling 3D viewers into every theme variation. We’ve been there – it wasn't fun! 🥹
88+
89+
<Admonition type="note" title="Note on rendering engines">
90+
We currently use BabylonJS in 3D Bits app. All of the videos and viewer editor is based on it.
91+
</Admonition>
92+
93+
---
94+
95+
### Can I use 3D Bits for complex pricing (e.g., a slider value changes the product price)?
96+
97+
**Not directly for the pricing calculation itself.**
98+
99+
3D Bits is focused on handling the **3D visualization**. It can:
100+
* Read a value from a slider (or any other UI element on your page).
101+
* Update the 3D model based on that value (e.g., change dimensions, swap parts).
102+
103+
However, **3D Bits does not calculate or update the product price in Shopify.** Pricing logic, especially for complex, dynamically calculated prices, needs to be handled by:
104+
* Shopify's built-in variant pricing.
105+
* A dedicated third-party Shopify pricing app.
106+
* Custom backend development with secure validation.
107+
108+
Shopify offers three variant types with many options out of the box, which covers most standard pricing scenarios. For anything fancier, you’ll need to combine 3D Bits for the visuals with other tools or custom solutions for the pricing logic.
109+
110+
---
111+
112+
### My product has a ton of configurable parts and complex logic. Can I build a fully custom configurator with 3D Bits?
113+
114+
**Yes, if you or your team can write JavaScript or TypeScript.**
115+
116+
This is where the **BITBYBIT RUNNER** theme extension block truly shines. It acts as a bridge:
117+
1. You develop your complex configuration logic, part-swapping rules, and geometric manipulations as a script (e.g., using Rete, Blockly, or TypeScript on `bitbybit.dev` and then exporting it, or writing it directly for the runner).
118+
2. The Runner block executes this script within your Shopify theme.
119+
3. Your script can then interact with the 3D scene, listen to Shopify variant changes (or other custom UI elements you add to the page), and update the 3D model accordingly.
120+
121+
3D Bits provides the 3D rendering pipeline and the connection to Shopify. You'll need to bring your own:
122+
* Custom configuration logic (as a script).
123+
* Pricing strategy (likely handled by Shopify or another app).
124+
* Custom UI elements (if Shopify's default variant selectors aren't sufficient).
125+
126+
<Admonition type="note" title="Advanced Configuration Guide">
127+
Dive deeper into building custom configurators: <a href="/learn/3d-bits/theme-app-extensions/bitbybit-runner" target="_blank" rel="noopener noreferrer">Using the Bitbybit Runner for Custom Logic</a>.
128+
</Admonition>
129+
130+
---
131+
132+
### Does 3D Bits offer fancy UI controls for product pages (like custom sliders, color swatches, etc.)?
133+
134+
**Nope. 3D Bits is not here to reinvent the dropdown or the color swatch.**
135+
136+
There are many excellent Shopify apps and theme development techniques dedicated to creating sophisticated UI controls for product options.
137+
138+
3D Bits focuses on the 3D visualization. It's designed to **listen** to what options are already selected on your product page (whether through standard Shopify variants or custom UI controls you've implemented) and then **update the 3D scene accordingly**:
139+
* Show the correct 3D model or parts.
140+
* Hide what shouldn’t be visible.
141+
* Update 3D model dimensions or features based on selected options.
142+
143+
**Think of 3D Bits as the 3D backbone of your product visualization – not the entire user interface nervous system. 💪** It plays well with others, allowing you to choose the best UI tools for your store while it handles the 3D heavy lifting.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"label": "Theme App Extensions",
3-
"position": 1
3+
"position": 3
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"label": "Tutorials",
3-
"position": 2
3+
"position": 4
44
}

docs/learn/3d-bits/tutorials/viewer-no-code-gltf-configurators copy.md renamed to docs/learn/3d-bits/tutorials/viewer-no-code-gltf-configurators.md

File renamed without changes.

docs/learn/intro.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,36 @@ import Admonition from '@theme/Admonition';
1010

1111
# Welcome! 🎉
1212

13-
We're thrilled you're interested in using our platform! These "Start" pages are designed to help you quickly get up to speed and begin creating amazing 3D experiences.
13+
We're thrilled you're interested in using our platform! This site is designed to help you quickly get up to speed and begin creating amazing 3D experiences.
14+
15+
In this essential introduction to Bitbybit video Matas Ubarevičius explains the fundamental ideas of the platform - if you haven't watched it yet - it's highly recommended.
16+
<div class="responsive-video-container">
17+
<iframe
18+
width="560"
19+
height="315"
20+
src="https://www.youtube.com/embed/noc6Rg6tMe0"
21+
title="Essential Introduction To BITBYBIT That Explains You The Most Important Aspects Of The 3D Platform"
22+
frameborder="0"
23+
allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
24+
allowfullscreen>
25+
</iframe>
26+
</div>
1427

1528
Let's find the best starting point for you:
1629

30+
### Are you a programmer?
31+
32+
If you're a professional programmer, you can jump right into our [**TypeScript Monaco editor**](https://bitbybit.dev/app?editor=typescript). Find the [**API Docs here**](https://docs.bitbybit.dev).
33+
34+
To get started:
35+
36+
* We offer [**NPM packages**](/learn/npm-packages/intro) that you can incorporate into your own websites.
37+
* *Note: These packages do not include our proprietary advanced algorithms or the models available in the 3D Models section.*
38+
* Check out how to set up our algorithms with [**Three.JS**](/learn/npm-packages/threejs/intro) or [**Babylon.JS**](/learn/npm-packages/babylonjs/intro). We include some complete powerful demos with explanations.
39+
* Also consider our course: [**Introduction To Programming 3D In TypeScript**](https://bitbybit.dev/school/courses/introduction-to-programming-3d-in-typescript).
40+
* Or, if you're familiar with BabylonJS: [**Bitbybit For BabylonJS Developers**](https://bitbybit.dev/school/courses/bitbybit-for-babylonjs-developers).
41+
These courses explore how our algorithms can create 3D CAD applications.
42+
1743
### Are you looking for ready-made 3D models?
1844

1945
Many of our standalone 3D model configurators require a subscription to our paid plans: Silver or Gold.
@@ -65,15 +91,3 @@ This platform is a great place to teach 3D computational design, mathematics, ge
6591
</Admonition>
6692

6793
If you're familiar with our tools and interested in becoming a teacher in our School to share your knowledge, please reach out to us at [info@bitbybit.dev](mailto:info@bitbybit.dev).
68-
69-
### Are you a programmer?
70-
71-
If you're a professional programmer, you can jump right into our **TypeScript Monaco editor**.
72-
73-
To get started:
74-
75-
* Consider our course: [**Introduction To Programming 3D In TypeScript**](https://bitbybit.dev/school/courses/introduction-to-programming-3d-in-typescript).
76-
* Or, if you're familiar with BabylonJS: [**Bitbybit For BabylonJS Developers**](https://bitbybit.dev/school/courses/bitbybit-for-babylonjs-developers).
77-
These courses explore how our algorithms can create 3D CAD applications.
78-
* We also offer [**NPM packages**](/learn/npm-packages/intro) that you can incorporate into your own websites.
79-
* *Note: These packages do not include our proprietary advanced algorithms or the models available in the 3D Models section.*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "BabylonJS",
3+
"position": 3
4+
}

0 commit comments

Comments
 (0)