Viewer3DCompare.loadModelAtViewport() method

Load a model into certain viewport. When loading done, it will trigger onSuccess callback. The loading will fail if there is already a model loaded in current renderer. In this case, users should call unload first.

Signature:

loadModelAtViewport(modelId: string, viewportIdx: number, configOrOnProgress?: LoadModelConfig | ProgressFn): Promise<{}>;

Parameters

ParameterDescription
modelIdThe model's id.
viewportIdxWhich viewport you want the model to be displayed.
configOrOnProgressLoadModelConfig | Pass a callback of onprogress or a object contains both initail transform of the model and onprogress.

Returns:

Promise<{}>

The promise to resolve when the loading is done or fails.