UI.ModelViewer() class

Create a viewer that displays a model with a default UI.

Signature:

export default class ModelViewer(containerId: string, modelId: string, useDefaultFavicon: boolean, onReady: (viewer: DWGViewer)=>void , onError: (err: string)=>void);

Parameters

ParameterTypeDescription
containerIdstringThe id of a DIV DOM which will host the viewer.
modelIdstringThe model id that will be loaded into the viewer.
useDefaultFaviconbooleanIf true, modelo icon will shown on the browser's title bar.
onReady(viewer: ModelViewer)=>voidCallback when the viewer is created.
onError(err: string)=>voidCallback when some errors happen.

Returns:

Modelo.UI.ModelViewer

Methods

MethodModifiersDescription
getViewer()---Get the internal Viewer3D instance.
destroy()---Destroy the viewer.