ShapeDiver 3D Viewer

You are reading the documentation of the public API of the ShapeDiver 3D viewer v2. This is the result of a complete software redesign of ShapeDiver's 3D viewer v1. It offers the following advantages over v1:

  • new API v2 making use of promises
  • support for multiple simultaneous sessions with one or several ShapeDiver models
  • drag & drop, selection, highlighting
  • advanced rendering and materials
  • advanced control of the 3D scene (geometry and lighting)
  • support for multiple viewports
  • file/blob parameter types
  • AR support soon to be there

Read more about ShapeDiver and 3D product configurators.


API v2

The new API v2 offers numerous advantages over API v1:

  • supports promises and provides direct feedback of the result of asynchronous operations
  • consistent naming convention
  • support for changing of materials, and updating/adding of geometry
  • support for drag & drop, selection, and highlighting
  • support for configuration of the 3D scene lighting
  • support for multiple viewports
  • file/blob parameter types

API v1

The API v1 is offered for backwards compatibility with the API of ShapeDiver's 3D viewer v1.

We discourage use of the API v1 for developing new applications.

Questions, feedback, bugs

Don't hesitate to ask questions and provide feedback, please use our forum for this purpose. Should you find a bug, please report it in our forum or email us.

Notice for developers

The JavaScript API objects might contain additional members or functionality which are not documented here. Do not use such undocumented functionality. Such additional functionality will likely be changed or removed by us between releases or patches without further notice.

Browser support

The ShapeDiver 3D viewer v2 supports the following browsers:

  • Chrome
  • Firefox
  • Edge
  • Safari
  • Internet Explorer 11
  • Modern Smartphones and tablets, Android and iOS

External dependencies

  1. THREE.js

    WebGL based library used to create and display animated 3D computer graphics on a Web browser

  2. axios

    Alternative promise based standalone HTTP-client to replace jQuery

  3. verb-nurbs - optional

    verb is a library for creating and manipulating NURBS surfaces and curves in many languages including JavaScript

Release Notes

Version Release date Notes
------ -------------- ------------------
2.0.6 2018-07-01 API v2 available
------ -------------- ------------------
2.0.7 2018-08-22 Browser testing
------ -------------- ------------------
2.0.8 2018-08-30 Parameter history API
------ -------------- ------------------
2.1.0 2018-10-12 Multiple viewports, browser tested
------ -------------- ------------------
2.2.0 2018-11-23 oauth2 support
fixed iOS texture problems
fixed rendering of transparent objects
drag/selection/hovering handler now supports touch events
------ -------------- ------------------
2.3.0 2018-12-20 improved rendering for transparent objects
gems rendering
fixes to responsive layout of viewer and controls/settings containers
iframe API reflector supports addEventListener
diverse bugfixes
------ -------------- ------------------
2.4.0 2019-01-21 export dialog bugfix
CommPlugin error message improvements
viewport resizing fix
rendering bugfixes
------ -------------- ------------------
2.5.0 2019-02-01 anchor object documentation improvements and bugfix
------ -------------- ------------------
2.6.0 2019-03-01 THREE.LineSegments and THREE.LineLoop are supported now in addition to THREE.Line
IE11 support restored
Live transformations API
Fixed crash when loading empty scene
Pass on scroll events in case zooming is disabled
Added further properties to AnchorEventData
Support for settings for multiple viewports
new setting ignoreSuperseded for CommPlugin
fix in constructor SDVApp.ParametricViewer to allow an empty container array to be passed
new camera settings for auto adjusting and revert at mouse up
glb loader now uses browser cache
Settings widget light intensity sliders max value increased to 5
CommPlugin sent export requests instead of export-cache requests
Export modal dialog did not show message to user in case of download export not resulting in a downloadable file
Material defined for SceneAsset takes precedence over materials defined in SceneAssetItems.
------ -------------- ------------------
2.7.0 2019-03-15 bugfix in implementation of scene.updatePersistentAsync: all assets were being updated unnecessarily and faded out/in
bugfix in implementation of File parameter: default value was ignored
new setting scene.material.environmentMapResolution allows to configure image resolution used for environment map
performance improvement: environment map 'default' was always being loaded, even if another one was configured for a model
performance improvement: environment map and material preset images have been optimized for lower size
API documentation updates regarding supported image types
bugfix to drag & drop of transparent objects
bugfix to draggable objects restricted to a plane: the plane origin was being updated while dragging
bugfix: shadows were always being activated on change of light intensity
------ -------------- ------------------
2.8.0 2019-04-01 - bugfix in SDVReflector: return values containing an Error object did not pass through the iframe barrier,
this has been solved by passing the error message only and recreating an error object using that message
(information about the source location of the error gets lost, but the error message is preserved)
- API documentation: added clarifications about the exact firing criterion for some events
- Performance improvement: lowered resulting build size of the viewer bundle
- new API function scene.toggleGeometry for showing or hiding geometry based on scene paths
- prevent rendering of a single frame with opacity 1 when fading in geometry
------ -------------- ------------------
2.9.0 2019-04-12 - switched to using a forked version of THREE.js
- diverse significant performance optimizations regarding THREE.js
- material presets are loaded from central library on first usage
------ -------------- ------------------
2.10.0 2019-05-02 - new and improved implementation of the controls used for parameters and settings
please note that the following dependencies are not required anymore to be separately loaded for using the controls:
-- Font Awesome ( (not used anymore)
-- JQuery ( (will be loaded on demand)
-- Spectrum color picker ( (will be loaded on demand)
-- Sortable.js ( (internalized)
- support for rendering of gems, see api.scene.GemMaterialV1
- SVG images passed as data URI are now expected to be base64 encoded using the method as described on the following line, which adds support for Unicode characters
- methods for base64 encoding and decoding of DOMStrings are available as api.utils.btoaUTF8 and api.utils.atobUTF8
- controls and settings panel now available in fullscreen mode, add property sdv-fullscreen='true' as shown in section usage
- bugfix: changed default text anchor positioning from 'top'/'left' to 'center'/'center'
- bugfix related to anchor elements and api.scene.convertTo2D for IE11
------ -------------- ------------------
2.10.1 2019-05-06 - garbage collection improvements
- bugfix: avoid unnecessary computation of intersections, dramatically improving framerate in case of anchors
- bugfix: color for lines working again
- iOS problem fix: usage of multiple spotlights was causing shader problems


  • Version: 2.10.1
  • Build date: 2019-05-22T07:14:25.659Z
  • Branch: 2.10.1
  • Commit: c8d335257a4eba3d866aa08828751237fef6c1a2

ShapeDiver 3D Viewer, Copyright © 2015-2019 ShapeDiver GmbH. Documentation generated by JSDoc 3.5.5 on Wed May 22nd 2019 using the DocStrap template.