Extensions:
A lot of existing viewer functionality has been transferred over to modularExtensions.
In order to continue to make use of this functionality, the viewer clients now need to
explicitly enable extensions by calling createExtension with the extension’s constructor
as the argument. For example, the complete functionality set requires all the extensions
enabled.
General:
ViewerParamsno longer has akeepGeometryDataproperty. Redundant geometry data is by default removed and cannot be keptSectionBoxChangedandSectionBoxUpdatedremoved fromViewerEventand replaced bySectionToolEvent.UpdatedinSectionToolextensionSelectionEvent.hitschanged toArray<{node: TreeNode, point: Vector3}>requestRenderfromViewernow takes optionalUpdateFlagsgetObjectsremoved fromViewer. Similar functionality exists withgetObjectinSpeckleRendererexploderemoved fromViewerand replaced by having anExplodeExtensionactive. Explode time is now controller viasetExplodeinExplodeExtensiongetDataTreeandDataTreetype still exist, but are deprecated and will be soon removed completely. Any functionality can now be replicated withWorldTreecameraHandlerremoved fromViewerand replaced bycontrolsaccessor inCameraController.
Section Box:
setSectionBoxremoved fromViewerand replaced bysetBoxinSectionToolgetSectionBoxFromObjectsremoved fromViewerand replaced byboxFromObjectsfromSpeckleRenderergetCurrentSectionBoxremoved fromViewerand replace bygetCurrentBoxinSectionTooltoggleSectionBoxremoved fromViewerand replaced bytoggleinSectionToolsectionBoxOffandsectionBoxOnremoved fromViewerand replaced by theenabledaccessor inSectionTool
Camera:
zoomremoved fromViewerand replaced bysetCameraViewinCameraControllerextensiontoggleCameraProjectionremoved fromViewerand replaced bytoggleCamerasinCameraControllerextensionsetViewremoved fromViewerand replaced bysetCameraViewinCameraControllerextensionloadObjectsignature changed toloadObject(loader: Loader, zoomToObject?: boolean)and it’s now asynchronousloadObjectAsyncremoved fromViewer
Diffing:
diffremoved fromViewerand replaced bydiffinDiffExtensionundiffremoved fromViewerand replaced byundiffinDiffExtensionsetDiffTimeandsetVisualDiffModeremoved fromViewerand replaced byupdateVisualDiffinDiffExtension
Filtering and Selection:
applyFilterremoved fromViewergetObjectPropertiesis now asynchronousshowObjectsandhideObjectsare removed fromViewerand moved toFilteringExtensionisolateObjectsandunIsolateObjectsare removed fromViewerand moved toFilterinExtensionselectObjectsis removed fromViewerand replaced byselectObjectsinSelectionExtensionresetSelectionis removed fromViewerand replaced byclearSelectioninSelectionExtensionhighlightObjectsandresetHighlightare removed fromViewersetColorFilteransremoveColorFilterare removed fromViewerand replaced bysetColorFilterandremoveColorFilterinFilteringExtensionsetUserObjectColorsis remove fromViewerand replaced bysetUserObjectColorsinSelectionExtensionbut usage is discouraged since paradigm no longer appliesresetFiltersis removed fromViewerand replaced byresetFiltersinSelectionExtension
Measurements:
enableMeasurementsremoved fromViewerand replaced by having aMeasurementsExtensionactive and it’senabledaccessor setsetMeasurementOptionsremoved fromViewerand replaced by theoptionsaccessor inMeasurementsExtensionremoveMeasurementremoved fromViewerand replaced byremoveMeasurementinMeasurementsExtension