WalkthroughManager
类:路径漫游管理器(用于存放和管理多个路径漫游对象)
Constructor
new Glodon.Bimface.Plugins.Walkthrough.WalkthroughManager(walkthroughManagerConfig)
构造路径漫游管理器
Parameters:
| Name | Type | Description | 
|---|---|---|
| walkthroughManagerConfig | Glodon.Bimface.Plugins.Walkthrough.WalkthroughManagerConfig | 路径漫游管理器配置项 | 
Methods
addWalkthrough(name, walkthrough)
添加漫游路径
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | String | 漫游路径名称 | 
| walkthrough | Glodon.Bimface.Plugins.Walkthrough.Walkthrough | 漫游路径对象 | 
Returns:
| Type | Description | 
|---|---|
| String | 漫游路径对象ID | 
exportVideo(id, callback)
将指定漫游路径动画导出视频
Parameters:
| Name | Type | Description | 
|---|---|---|
| id | String | 漫游路径对象ID | 
| callback | Function | 回调函数,对应返回blob | 
Example
// 下载视频到本地并保存为video.mp4
walkthroughManager.exportVideo('walkthrough对象的ID', (blob)=>{
  const videoUrl = URL.createObjectURL(blob);
  const link = document.createElement('a');
  link.href = videoUrl;
  link.download = 'video.mp4';
  document.body.appendChild(link);
  link.click();
  URL.revokeObjectURL(videoUrl);
})getWalkthroughList()
获取漫游列表
Returns:
| Type | Description | 
|---|---|
| Object | 漫游列表数据 | 
removeWalkthrough(ids)
清除漫游路径
Parameters:
| Name | Type | Description | 
|---|---|---|
| ids | Array | 多个漫游路径ID | 
setWalkthroughList(walkthroughList)
设置漫游列表
Parameters:
| Name | Type | Description | 
|---|---|---|
| walkthroughList | Object | 漫游列表数据 |