3.8.0 Migration Guide#

In this release, you’ll find only minor API cleanups, refactorings, and changes. In the majority of cases, these won’t impact already existing applications, which run on our previous version (3.7.0). This document provides both a general overview of the required updates and a detailed list of API changes.

Relocate logic how Annotations react to connected Node changes#

In order to empower application developers with greater flexibility to create their own tailored solutions, we have made the strategic decision to relocate the logic how Annotations respond to property changes of a connected Node from our webvis-core to the webvis-ui. This allows application developers to construct a completely customized logic for how their custom Annotation UIs should respond to property changes of a connected Node.

To inspire you in creating your own custom UI to visualize Annotations and react to Node changes, we’ve provided a simplified version of the logic implemented in our <webvis-annotation> Component as an example:

// Listen to property changes of the connected Node and reflect them to the annotation.
myContext.registerListener([webvis.EventType.NODE_CHANGED], (e : webvis.NodeChangedEvent) =>
{
    if ( e.property === webvis.Property.GLOBAL_TRANSFORM )
    {
        const inverseOldTrafo   : mat4 = mat4.invert(mat4.create(), e.oldValue),
              deltaTrafo        : mat4 = mat4.multiply(mat4.create(), e.newValue, inverseOldTrafo),
              newAnchorPosition : vec3 = vec3.transformMat4(vec3.create(), oldAnchorPosition, deltaTrafo);

        myContext.changeAnnotation( myAnnotationId, {
            anchorPosition : newAnchorPosition
        } );
    }
    else if ( e.property === webvis.Property.ENABLED )
    {
        myContext.changeAnnotation( myAnnotationId, {
            enabled : e.newValue === 1
        } );
    }
}, connectedNodeId, false));

// Listen to the removal of the connected Node and remove the annotation as well.
myContext.registerListener([webvis.EventType.NODE_REMOVED], (e : webvis.NodeRemovedEvent) =>
{
    myContext.removeAnnotation( myAnnotationId );
}, connectedNodeId, false));

API Changes#

The following list contain API additions, changes and removals which might be subject for migration efforts. Most alterations were performed to provide a more streamlined experience when working with the API and come only with minimal need for manual intervention from application developers.

ContextAPI

ViewerAPI

Events

Types

Enums

EntityType

EventType

SettingStrings

ViewerSettingStrings