Skip to main content
Skip table of contents

Installation Guide

You can use the Viewer with our npm package or with our CDN. Both variants have their advantages, so it's on you to choose.

If you don't know what is right for you, you'll probably be better off with the npm version as this is an industry standard and a future proof way for development.


Installation with NPM

You can install the Viewer with npm. To install the module, open a terminal window in you project and run:

BASH
npm install --save @shapediver/viewer

The package will be downloaded and installed for you. You can also have a look at this example for an example setup.

Hint: Clicking Click to Run opens a standalone environment with a live preview and direct links to the CodeSandbox project and GitHub source code.


Installation with CDN

In you html-head section, simply add our bundle.

HTML
<script src="https://viewer.shapediver.com/v3/VERSION_NUMBER/bundle.js"></script>

Note: Please select a fixed version by replacing VERSION_NUMBER with a version number (example X.X.X). If you want to update to a newer viewer version at some point, please go through our migration guide.

You can also have a look at this example for the complete setup.

Hint: Clicking Click to Run opens a standalone environment with a live preview and direct links to the CodeSandbox project and GitHub source code.


Additional Examples

Additional example can be found on the viewer examples page in the setup section.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.