To use the Pictofit SDK, you will need an access token to our private registry. Please contact our sales team to get in touch and request a token.

To give npm access to the registry on the project scope, you have to add a .npmrc file in project root (on the same level as package.json):

You will need to replace <YOUR-TOKEN> with the token you got from Reactive Reality.

; reactive reality public registry

or if you wish not to commit the credentials to the repo:

You will need to replace <YOUR-TOKEN> with the token you got from Reactive Reality.

npm config set @reactivereality-public:registry=
npm config set //<YOUR-TOKEN>

Then add to your package.json dependencies: "@reactivereality-public/pictofit-web-sdk": "major.minor.patch"

Now you will have to add a canvas element to your DOM for the SDK to render your content into:

        <canvas id="canvas3d" style="width:100%;height:100%;"></canvas>       

Then you can import the module an use its components like so:

import * as Pictofit from "@reactivereality-public/pictofitcore-web-sdk";
const viewer = new Pictofit.WebViewer("canvas3d"); // ID of the canvas element

All you have to provide here is the ID of the canvas element so that the viewer can use it as the rendering target. As part of every asset bundle that we generate through the Pictofit Content Service, you’ll find a .json config file that you can use the load the model.

The rendering within our SDK is based on the Babylon.js engine. You need to separately load the respective modules in your code. The minimal requirement are the core library and the loaders extensions. Depending on the use case, additional extensions might be required (which can be seen from the respective documentation/samples).

<!DOCTYPE html>

    <meta charset="UTF-8" />
    <script src=""></script>
    <script src=""></script>

This can be done through creating a BaseURLResourceProvider. This simply prefixes the referenced filename with the provided url. So if an element in the configuration refers to texture.jpg and your base url is, the viewer will try to load the asset from

For most cases, this simple provider is sufficient. Sometimes, you might need a more complex handling. Please see the section Custom Resource Providers on how to implement your own provider.

// create a URLResourceProvider and provide the base url to your server
viewer.resourceProvider = new Pictofit.BaseURLResourceProvider("");

// load the configuration file from your server

That’s it, you are good to go. The viewer should now show your asset within the viewer. You can also use absolute paths in your configuration files. Still, we advise against doing this for real world integrations since you have to change your configuration files once you move the assets.