Manual Reference Source
import {ModelCompareViewer} from '@modelo/api/doc/UI/UI.js'
public class | source

ModelCompareViewer

A model compare viewer will open two models and show the difference of them.

Constructor Summary

Public Constructor
public

constructor(containerId: string, baseModelId: string, updatedModelId: string, onReady: function(viewer: Object): void, onError: function(error: Error): void)

Constructor a viewer with for comparing two models.

Public Constructors

public constructor(containerId: string, baseModelId: string, updatedModelId: string, onReady: function(viewer: Object): void, onError: function(error: Error): void) source

Constructor a viewer with for comparing two models.

Params:

NameTypeAttributeDescription
containerId string

The placeholder DOM's name. It can't be omitted.

baseModelId string

The base model ID.

updatedModelId string

The comparing model ID.

onReady function(viewer: Object): void

The callback when the viewer is created. It takes a parameter of the internal Viewer3D object.

onError function(error: Error): void

The callback when any errors happen.

Example:

    var viewer = new Modelo.UI.ModelCompareViewer (
      "modelContainer",
      baseModelId,
      updatedModelId,
      onReady: (viewer) => {
        console.log('viewer ready', viewer)
      },
      onError: (err) => {
        console.log(err);
      }
    );