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 toconvertedObject
updateCallbackThreeJsObject
was renamed toupdateCallbackConvertedObject
From this version on,
sdTF
data 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 enablesdTF
loading either:At initialization by setting the
loadSdtf
in the createSession properties totrue
At runtime by setting the property
loadSdtf
in the SessionApi totrue
. In this case you can listen to the eventSESSION_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
andeffectsMaterial
were removed from thePrimitiveData
and 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
,IHoverEvent
andIDragEvent
were moved from@shapediver/viewer
to@shapediver/viewer.features.interaction
.The
animations
property in theIViewportApi
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 toViewport
on all occurrencesSome previously exposed classes are now only exposed via their interface. The naming stayed the same with a leading
I
Example:AnimationTrack
is nowIAnimationTrack
The API Classes now all have the postfix
Api
. With the previously point in mind,Session
change toISessionApi
.The
CameraApi
now includes all properties that were underCamera.controls
directly.The enum values are now separated by underscores, therefore enum names may have changed by adding additional underscores. Example:
RENDERERTYPE
was changed toRENDERER_TYPE
Important other enum changes:PRIMITIVETYPEHINT
→SDTF_TYPEHINT
ATTRIBUTEVISUALIZATION
→ATTRIBUTE_VISUALIZATION
in package@shapediver/viewer.features.attribute-visualization
The
api
Object was removed the corresponding functions and variables were moved as follows:api.addListener
→addListener
api.applySettings
→SessionApi.applySettings
api.automaticUpdate
→SessionApi.automaticSceneUpdate
api.closeSession
→SessionApi.close
api.closeViewer
→ViewportApi.close
api.convertSceneToGLTF
→ exists onViewportApi
andSessionApi
depending on use caseapi.createSDTFOverview
→ViewportApi.createSDTFOverview
api.createSession
→createSession
api.createViewer
→createViewport
api.enableAR
→ViewportApi.enableAR
api.globalScale
→ViewportApi.arScale
api.globalTranslation
→ViewportApi.arTranslation
api.globalRotation
→ViewportApi.arRotation
api.loggingLevel
→generalOptions.loggingLevel
api.removeListener
→removeListener
api.sceneTree
→sceneTree
api.sessions
→sessions
api.showMessages
→generalOptions.showMessages
api.update
→ViewportApi.update
api.viewInAR
→ViewportApi.viewInAR
api.viewableInAR
→ViewportApi.viewableInAR
api.viewers
→viewports
AnimationTrack
is nowIAnimationTrack
AnchorDataImage
is nowIAnchorDataImage
AnchorDataText
is nowIAnchorDataText
The
AttributeVisualizationEngine
now only needs aViewportApi
as inputThe default material
MaterialData
was renamed toMaterialStandardData
Version 1.15.0
removed
busy
andblurSceneWhenBusy
, 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 morebranding options changed,
logo
was moved into objectthe
HTMLElementAnchorData
was reworked, there are nowHTMLElementAnchorTextData
,HTMLElementAnchorImageData
andHTMLElementAnchorCustomData
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
toENVIRONMENT_MAP
renamed
ENVIRONMENTMAP_CUBE
toENVIRONMENT_MAP_CUBE
Version 1.8.0
the CDN naming was changed from lowercase
sdv
to uppercaseSDV
the viewer types were restructured, there is no
IStandardViewer
orIAttributeViewer
anymore, both are the sameIViewer
where the type can be set later on