Skip to main content
Skip table of contents

Migration Guide

Version 3.0 (21/05/24) - Asgard

  • Due to the separation of the Viewport and the Session APIs into separate packages (hydra/headless versions) the naming of some properties in the scene tree were changed as the three.js library was removed from some packages:

    • threeJsObject was renamed to convertedObject

    • updateCallbackThreeJsObject was renamed to updateCallbackConvertedObject

  • From this version on, sdTF data is not loaded anymore by default. This affect Attribute Visualization and all applications that need data from sdTF. This change was necessary as this type of data can get quite large and can therefore drastically impact the loading performance. You can enable sdTF loading either:

    • At initialization by setting the loadSdtf in the createSession properties to true

    • At runtime by setting the property loadSdtf in the SessionApi to true. In this case you can listen to the event SESSION_SDTF_DELAYED_LOADED for when the data has been loaded.

  • As there was a switch from the mouse/pointer events to the pointer events, the function signature of the function restrictEventListeners has changed.

Version 2.9 (25/05/23) - Jimmy Eat World

  • The properties mode, material, standardMaterial, attributeMaterial, materialVariants and effectsMaterial were removed from the PrimitiveData and added to the GeometryData

Version 2.8 (20/04/23) - Interpol

  • Removal of tsyringe, classes that were previously requested via container.resolve(ExampleClass) can now be accessed via ExampleClass.instance

Version 2.2 (01/09/22) - Cleopatrick

  • The events ISelectEvent, IMultiSelectEvent, IHoverEvent and IDragEvent were moved from @shapediver/viewer to @shapediver/viewer.features.interaction.

  • The animations property in the IViewportApi is now a dictionary instead of an array.

Version 2.0 (27/07/22) - Arctic Monkeys

  • To avoid further confusion, the naming of the Viewer component of the API was changed to Viewport on all occurrences

  • Some previously exposed classes are now only exposed via their interface. The naming stayed the same with a leading I Example: AnimationTrack is now IAnimationTrack

  • The API Classes now all have the postfix Api. With the previously point in mind, Session change to ISessionApi.

  • The CameraApi now includes all properties that were under Camera.controls directly.

  • The enum values are now separated by underscores, therefore enum names may have changed by adding additional underscores. Example: RENDERERTYPE was changed to RENDERER_TYPE
    Important other enum changes:

    • PRIMITIVETYPEHINTSDTF_TYPEHINT

    • ATTRIBUTEVISUALIZATIONATTRIBUTE_VISUALIZATION in package @shapediver/viewer.features.attribute-visualization

  • The api Object was removed the corresponding functions and variables were moved as follows:

    • api.addListeneraddListener

    • api.applySettingsSessionApi.applySettings

    • api.automaticUpdateSessionApi.automaticSceneUpdate

    • api.closeSessionSessionApi.close

    • api.closeViewerViewportApi.close

    • api.convertSceneToGLTF → exists on ViewportApi and SessionApi depending on use case

    • api.createSDTFOverviewViewportApi.createSDTFOverview

    • api.createSessioncreateSession

    • api.createViewercreateViewport

    • api.enableARViewportApi.enableAR

    • api.globalScaleViewportApi.arScale

    • api.globalTranslationViewportApi.arTranslation

    • api.globalRotationViewportApi.arRotation

    • api.loggingLevelgeneralOptions.loggingLevel

    • api.removeListenerremoveListener

    • api.sceneTreesceneTree

    • api.sessionssessions

    • api.showMessagesgeneralOptions.showMessages

    • api.updateViewportApi.update

    • api.viewInARViewportApi.viewInAR

    • api.viewableInARViewportApi.viewableInAR

    • api.viewersviewports

  • AnimationTrack is now IAnimationTrack

  • AnchorDataImage is now IAnchorDataImage

  • AnchorDataText is now IAnchorDataText

  • The AttributeVisualizationEngine now only needs a ViewportApi as input

  • The default material MaterialData was renamed to MaterialStandardData

Version 1.15.0

  • removed busy and blurSceneWhenBusy, you can now use the branding options when creating a viewer

Version 1.13.0

  • viewableInAR only returns a boolean now, no more errors

Version 1.12.2

  • import of reflect-metadata not necessary any more

  • branding options changed, logo was moved into object

  • the HTMLElementAnchorData was reworked, there are now HTMLElementAnchorTextData, HTMLElementAnchorImageData and HTMLElementAnchorCustomData to better fit your needs

Version 1.11.11

  • updateOutputContent function signature, session.updateOutputs() now included, can be disabled via flag

Version 1.11.2

  • renamed ENVIRONMENTMAP to ENVIRONMENT_MAP

  • renamed ENVIRONMENTMAP_CUBE to ENVIRONMENT_MAP_CUBE

Version 1.8.0

  • the CDN naming was changed from lowercase sdv to uppercase SDV

  • the viewer types were restructured, there is no IStandardViewer or IAttributeViewer anymore, both are the same IViewer where the type can be set later on

JavaScript errors detected

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

If this problem persists, please contact our support.