Constructor
new RenderViewer(container, options, callback)
Parameters:
Name | Type | Description |
---|---|---|
container |
String | 需要嵌入的容器(例如 div)的 id |
options |
Object | 参数:{api: "/api"} |
callback |
function | 回调函数 |
Methods
getWsInfo(item)
- To Do:
-
- 根据模型 id 获取实例信息
Example
renderViewer.getWsInfo({itemVersionId: '模型版本号'})
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | 参数:{itemVersionId: '模型版本号', requestUrlPrefix: '请求地址前缀', webSocketUrl: 'webSocket连接地址'} |
destroy()
- To Do:
-
- 销毁时调用,以回收资源
Example
renderViewer.destroy()