Migration Guide
Version 3.16 (16/04/26) - Quince
With the introduction of the new RectangleTransform feature, which is a close relative to the Gumball, existing Gumball functionality has been renamed to GumballTransform, including a renaming of the general package.
The
@shapediver/viewer.features.gumballpackage has been renamed to@shapediver/viewer.features.transformation-tools. All imports must be updated accordingly:Gumballwas renamed toGumballTransformIGumballwas renamed toIGumballTransformIGumballEventwas renamed toITransformationToolsEvent. The new event interface introduces two additional required fields:id(string) andtype("gumball" | "rectangleTransform") to filter for the correct events.GumballEventResponseMappingwas renamed toEventResponseMapping(exported from@shapediver/viewer.features.transformation-tools)updateGumballTransformation()was renamed toupdateTransformation(). Note: the internal transformation node ID also changed from"SD_gumball_matrix"to"SD_transformation_tools_matrix".
The
IGumballinterface previously exposed all enable-flags as directly writable properties at runtime (e.g.gumball.enableRotationX = false). These properties have been removed fromIGumballTransform. The settings — includingenableRotation,enableScaling,enableTranslationand their per-axis variants, as well asspace,scale, andrestrictions— must now be passed as constructor arguments viaGumballTransformSettingsOptionaland can no longer be mutated on the returned instance.EVENTTYPE_GUMBALLhas been removed and replaced byEVENTTYPE_TRANSFORMATION_TOOLS. The event type value also changed from"gumball.matrixChanged"to"transformation_tools.matrixChanged". AnyaddListener/removeListenercalls usingEVENTTYPE_GUMBALL.MATRIX_CHANGEDmust be updated toEVENTTYPE_TRANSFORMATION_TOOLS.MATRIX_CHANGED.The following Gumball-related exports have been renamed across
@shapediver/viewerand@shapediver/viewer.session:IGumballParameterApi→IGumballTransformParameterApiIGumballParameterProps→IGumballTransformParameterPropsGumballParameterValue→GumballTransformParameterValueIGumballParameterJsonSchema→IGumballTransformParameterJsonSchemaIGumballParameterPropsJsonSchema→IGumballTransformParameterPropsJsonSchemaisGumballParameterApi()→isGumballTransformParameterApi()validateGumballParameterSettings()→validateGumballTransformParameterSettings()
In
IDrawingParameterSettings, thedisplayproperty has been renamed tovisualization. Any drawing tool parameter settings referencingdisplay: { ... }must be updated tovisualization: { ... }.createDrawingTools()previously threw aShapeDiverViewerDrawingToolsErrorif an existing drawing tools instance was still open. This restriction has been lifted — multiple instances can now be active simultaneously. Code that relied on catching this error to detect singleton violations must now manage instance lifecycles explicitly.
Version 3.14 (30/10/25) - Orange
Due to the implementation of the
SelectionBoxfeature, multiple objects can now be hovered at once. Therefore, theIHoverEventneeded to be changed and now returnsnodesinstead ofnode.
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.jslibrary was removed from some packages:threeJsObjectwas renamed toconvertedObjectupdateCallbackThreeJsObjectwas renamed toupdateCallbackConvertedObject
From this version on,
sdTFdata is not loaded anymore by default. This affect Attribute Visualization and all applications that need data fromsdTF. This change was necessary as this type of data can get quite large and can therefore drastically impact the loading performance. You can enablesdTFloading either:At initialization by setting the
loadSdtfin the createSession properties totrueAt runtime by setting the property
loadSdtfin the SessionApi totrue. In this case you can listen to the eventSESSION_SDTF_DELAYED_LOADEDfor 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,materialVariantsandeffectsMaterialwere removed from thePrimitiveDataand added to theGeometryData
Version 2.8 (20/04/23) - Interpol
Removal of tsyringe, classes that were previously requested via
container.resolve(ExampleClass)can now be accessed viaExampleClass.instance
Version 2.2 (01/09/22) - Cleopatrick
The events
ISelectEvent,IMultiSelectEvent,IHoverEventandIDragEventwere moved from@shapediver/viewerto@shapediver/viewer.features.interaction.The
animationsproperty in theIViewportApiis now a dictionary instead of an array.
Version 2.0 (27/07/22) - Arctic Monkeys
To avoid further confusion, the naming of the
Viewercomponent of the API was changed toViewporton all occurrencesSome previously exposed classes are now only exposed via their interface. The naming stayed the same with a leading
IExample:AnimationTrackis nowIAnimationTrackThe API Classes now all have the postfix
Api. With the previously point in mind,Sessionchange toISessionApi.The
CameraApinow includes all properties that were underCamera.controlsdirectly.The enum values are now separated by underscores, therefore enum names may have changed by adding additional underscores. Example:
RENDERERTYPEwas changed toRENDERER_TYPE
Important other enum changes:PRIMITIVETYPEHINT→SDTF_TYPEHINTATTRIBUTEVISUALIZATION→ATTRIBUTE_VISUALIZATIONin package@shapediver/viewer.features.attribute-visualization
The
apiObject was removed the corresponding functions and variables were moved as follows:api.addListener→addListenerapi.applySettings→SessionApi.applySettingsapi.automaticUpdate→SessionApi.automaticSceneUpdateapi.closeSession→SessionApi.closeapi.closeViewer→ViewportApi.closeapi.convertSceneToGLTF→ exists onViewportApiandSessionApidepending on use caseapi.createSDTFOverview→ViewportApi.createSDTFOverviewapi.createSession→createSessionapi.createViewer→createViewportapi.enableAR→ViewportApi.enableARapi.globalScale→ViewportApi.arScaleapi.globalTranslation→ViewportApi.arTranslationapi.globalRotation→ViewportApi.arRotationapi.loggingLevel→generalOptions.loggingLevelapi.removeListener→removeListenerapi.sceneTree→sceneTreeapi.sessions→sessionsapi.showMessages→generalOptions.showMessagesapi.update→ViewportApi.updateapi.viewInAR→ViewportApi.viewInARapi.viewableInAR→ViewportApi.viewableInARapi.viewers→viewports
AnimationTrackis nowIAnimationTrackAnchorDataImageis nowIAnchorDataImageAnchorDataTextis nowIAnchorDataTextThe
AttributeVisualizationEnginenow only needs aViewportApias inputThe default material
MaterialDatawas renamed toMaterialStandardData
Version 1.15.0
removed
busyandblurSceneWhenBusy, you can now use the branding options when creating a viewer
Version 1.13.0
viewableInARonly returns a boolean now, no more errors
Version 1.12.2
import of
reflect-metadatanot necessary any morebranding options changed,
logowas moved into objectthe
HTMLElementAnchorDatawas reworked, there are nowHTMLElementAnchorTextData,HTMLElementAnchorImageDataandHTMLElementAnchorCustomDatato better fit your needs
Version 1.11.11
updateOutputContentfunction signature,session.updateOutputs()now included, can be disabled via flag
Version 1.11.2
renamed
ENVIRONMENTMAPtoENVIRONMENT_MAPrenamed
ENVIRONMENTMAP_CUBEtoENVIRONMENT_MAP_CUBE
Version 1.8.0
the CDN naming was changed from lowercase
sdvto uppercaseSDVthe viewer types were restructured, there is no
IStandardViewerorIAttributeVieweranymore, both are the sameIViewerwhere the type can be set later on