Getting Started
Last updated
Last updated
In this section we want to go through step by step how to setup the Rubens SDK.
Our recommended setup is a build pipeline which uses the Node.js ecosystem. Therefore it also makes sense to use some package manager like or . To keep it "simple" we focus on npm in this tutorial. To install our Web SDK you need to run
This should add the following line to your package.json
Without any version specified this will always lead to the most recent version of the SDK.
To install for example version 2.1.1
just change the entry in your package.json
to the following:
When you want to upgrade the version you just need to change the version number. For more details you can see the official .
We follow therefore the versions have the following semantics:
When we have a look on the following version number: X.Y.Z
, a change in Z means a bug fix, in Y a new feature and in X a new major version which could be a breaking release. To find out what we changed we recommend reading through our changelog before upgrading.
Since our applications are quite complex we do not only have JavaScript files. Therefore a simple packaging is not possible. Roomle uses to display the 3D content and a module for our logic. Also we provide some standard backgrounds as files for our 3D scenes. This requiers you to copy all our static assets to some path which is available via https. These files are all located in node_modules/roomle-web-sdk/lib/static
. We recommend doing this automated (and not by hand) with your build tools (, , etc).
To tell Roomle where to look for this assets you need to specify a global variable before you load the Roomle source code. We need to use a global variable because we try to load all the stuff as fast and parallel as possible.
Typically the assets should be in some folder like public
or dist
and from there they are available via https
. Let's assume your project setup serves from a dist
folder at localhost:4242 and you place the Roomle assets into dist/roomle
. You have dist/index.html
which starts your app and loads Roomle. Then you have to set the assetPath
to roomle/
. You must not forget the trailing /
, because otherwise the sub paths are not constructed correctly.
After you set up the project correctly you can start implementing the Rubens SDK. Therefore we provide three different ready to use modules:
Rubens GLB Viewer
Rubens Configurator
Rubens Planner (Room Designer)
All Modules and how you can using it are described in the following sections.
All the Roomle Packages are authored in therefore we provide declaration files for a better developer experience. We recommend to use TypeScript but the SDK should also be useable as a plain ES6 module. Since we develop in TypeScript and do not do any special testing for plain ES6 we consider the usage of the SDK as plain ES6 as experimental. Because Roomle has very hard performance constraints (especially for webshop integrations) we use . Since dynamic imports are not supported by every browser it's important to transpile the code to something like . Keep in mind to provide two different bundles, one for legacy browsers and one for . A very interesting article about this topic can be found here: