Version 13.0.0

Version 13.0.0 Details

List of all changes

Introduction

The so-called "Spec" has always been the core or the heart of the viewer API. As requirements evolve and projects become increasingly complex, the additional layer provided by the Spec interface is becoming more of a hindrance than a help. Intermediate solutions like the "Auto-Spec" were quite successful, but finally the time has come to remove the Spec completely.

Whilst this removal can generally be considered as a tech debt, improving the development experience drastically, it also provides benefits for the consumer, such as:

  • usage of baked animations
  • direct access to imported 3d data
  • simplified API

What is new

Model Manager

Whilst most tasks of the legacy Spec have already been worked around with different modules, handling models has still been done with Spec API, using "variantInstances", "variants" and "elements". This is now the job of the ModelManager.

First of all you need to register your models, linking the model names to their dedicated URLS. This is done automatically, if you use the viewer control of the Combeenation framework.

Afterwards you can access the model and fulfill tasks like:

What has changed

"The rest" is basically very similar, whereas lots of modules have been slightly refactored and switched around to improve the overall behaviour and simplify the API. Here is a small overview of the most important functionalities:

Old New
Viewer.autofocusActiveCamera moved to Camera manager (autofocusActiveCamera)
Viewer.addEventListener moved to Event manager (addListener)
Viewer.screenshot moved to Screenshot manager ScreenshotManager.takeScreenshot
Viewer.enableDebugLayer moved to Debug manager (showInspector)
setMaterial moved to Material manager (setMaterialOnMesh)
Tag Manager renamed to "ParameterManager"

Generated using TypeDoc