WalkthroughManager

类:路径漫游管理器(用于存放和管理多个路径漫游对象)

Constructor

new Glodon.Bimface.Plugins.Walkthrough.WalkthroughManager(walkthroughManagerConfig)

构造路径漫游管理器

Parameters:
NameTypeDescription
walkthroughManagerConfigGlodon.Bimface.Plugins.Walkthrough.WalkthroughManagerConfig

路径漫游管理器配置项

Methods

addWalkthrough(name, walkthrough)

添加漫游路径

Parameters:
NameTypeDescription
nameString

漫游路径名称

walkthroughGlodon.Bimface.Plugins.Walkthrough.Walkthrough

漫游路径对象

Returns:
TypeDescription
String

漫游路径对象ID

exportVideo(id, callback)

将指定漫游路径动画导出视频

Parameters:
NameTypeDescription
idString

漫游路径对象ID

callbackFunction

回调函数,对应返回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:
TypeDescription
Object

漫游列表数据

removeWalkthrough(ids)

清除漫游路径

Parameters:
NameTypeDescription
idsArray

多个漫游路径ID

setWalkthroughList(walkthroughList)

设置漫游列表

Parameters:
NameTypeDescription
walkthroughListObject

漫游列表数据