Introducing NPM packages for ThreeJS & BabylonJS game engines.
Nov 7, 2024
by Matas Ubarevicius
We are thrilled to announce the release of two new open-source packages designed to advance our mission: making 3D CAD accessible and adaptable for a broader community of developers. These packages, @bitbybit-dev/threejs and @bitbybit-dev/babylonjs, are critical steps toward our strategic goal of democratizing access to 3D CAD technologies, and they offer greater flexibility for our users.
The muscle car with two engines under the gigantic hood - BabylonJS and ThreeJS driven by Bitbybit.
Why We Did It
Our main objective with these new releases is to make our CAD tools more versatile and accessible. By decoupling our core layer from a single game engine, we are opening the door for developers to integrate our technology with their preferred tools—particularly ThreeJS. This broadens our reach and aligns perfectly with our vision of an open, adaptable CAD platform that meets the diverse needs of the 3D developer community.
A Quick Note on BabylonJS
While we are excited to bring ThreeJS compatibility to our platform, it’s important to clarify that BabylonJS is here to stay. BabylonJS remains a crucial component in our high-level platform architecture, which integrates advanced editors like Rete, Blockly, and Monaco. For users already working within our ecosystem, there will be no disruptions. Instead, this expansion offers them more choices if they wish to integrate our tools with other engines, such as ThreeJS, as they grow and experiment with different technologies.
CAD on the Browser: Our Layered Approach
From the outset, we built our platform in a series of modular layers, balancing open-source accessibility with proprietary elements to create a powerful, flexible CAD solution. Our core layer was initially designed with open-source ideals in mind, making it available for developers to integrate into their own projects. However, it remained deeply intertwined with the BabylonJS game engine—an integration we have always appreciated and continue to utilize in our parametric design editors and internal projects.
Yet, this dependency also presented challenges. It limited our ability to support other game engines, which, in turn, created a barrier to our vision of a truly democratic CAD platform. Recognizing the popularity of other engines, like ThreeJS and PlayCanvas, we decided to refactor our core to make it more versatile.
The New Packages: @bitbybit-dev/threejs and @bitbybit-dev/babylonjs
Our work has culminated in two new NPM packages that enhance the flexibility and reach of our platform:
- @bitbybit-dev/threejs
- This package enables seamless integration with ThreeJS, a widely used 3D library, opening our platform to a broader audience of developers already familiar with ThreeJS.
- @bitbybit-dev/babylonjs
- This package maintains our long-standing support for BabylonJS, allowing developers who have already integrated BabylonJS to continue their work with minimal adjustments.
Both packages rely on our @bitbybit-dev/core package, which now stands as a decoupled, engine-agnostic layer. This core package serves as the common foundation for each game engine integration, making it simpler for developers to switch engines if needed.
Current Architecture
Our updated platform architecture reflects a more flexible, modular setup. Each game engine-specific package now connects through the core layer, creating a streamlined, extensible structure that supports a range of integrations.
Overview of Bitbybit platform architecture, indicating open-source layers accessible via NPM packages and proprietary application levels.
With these new packages, we’re excited to expand possibilities for our users, offering them a truly flexible, developer-friendly CAD solution that empowers them to create, innovate, and build on the web.