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);| Parameter | Type | Description |
|---|---|---|
| containerId | string | The id of a DIV DOM which will host the viewer. |
| modelId | string | The model id that will be loaded into the viewer. |
| useDefaultFavicon | boolean | If true, modelo icon will shown on the browser's title bar. |
| onReady | (viewer: ModelViewer)=>void | Callback when the viewer is created. |
| onError | (err: string)=>void | Callback when some errors happen. |
Returns:
Modelo.UI.ModelViewer
| Method | Modifiers | Description |
|---|---|---|
| getViewer() | --- | Get the internal Viewer3D instance. |
| destroy() | --- | Destroy the viewer. |