2.18 → 2.18.14

2.x → 2.18

The introduction of viewer API 2.0 into our stable channel. The changes to the API itself are extensive and there is no point for a step by step guide, as what was previously known as API 2.0 will become the single supported viewer API moving forward.

Backwards Compatibility:

For backwards compatibility reasons we provide a built-in legacy implementation that emulates the old API precisely. Please note that this is meant as a temporary measure which will eventually become naturally obsolete. For this purpose, this migration guide entry will describe moving from any older viewer version to 2.18 while using the legacy implementation

Full Migration:

The encouraged way, is to conform to the new API as soon as possible. The following guide will attempt to help with the initial migration from the old API to the new one.

Extensions:

A lot of existing viewer functionality has been transferred over to modular Extensions. 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

const cameraController = this.createExtension(CameraController)
const selection = this.createExtension(LegacySelectionExtension)
const sections = this.createExtension(SectionTool)
const sectionOutlines = this.createExtension(SectionOutlines)
const measurements = this.createExtension(MeasurementsExtension)
const filtering = this.createExtension(FilteringExtension)
const explodeExtension = this.createExtension(ExplodeExtension)
const diffExtension = this.createExtension(DiffExtension)

General: