new RoamingController(viewer)
roaming/RoamingController.js, line 45
当前视图 Viewer
Name | Type | Description |
---|---|---|
viewer |
Viewer |
当前视图 |
Classes
Methods
-
addPath(path)
roaming/RoamingController.js, line 171 -
添加漫游路径
Name Type Description path
RoamingPath 漫游路径
-
changeSpeed(speed)
roaming/RoamingController.js, line 161 -
改变播放速度
Name Type Description speed
Number 播放速度
-
clearPath()
roaming/RoamingController.js, line 206 -
清除所有的漫游路径
-
getPath(id){RoamingPath}
roaming/RoamingController.js, line 185 -
根据设置的路径唯一
id
获取漫游路径Name Type Description id
String 路径唯一
id
Returns:
Type Description RoamingPath 漫游路径 -
pause()
roaming/RoamingController.js, line 142 -
暂停所有漫游路径
-
play()
roaming/RoamingController.js, line 124 -
播放所有漫游路径
-
removePath(path)
roaming/RoamingController.js, line 194 -
移出漫游路径
Name Type Description path
RoamingPath 漫游路径
-
restore()
roaming/RoamingController.js, line 151 -
继续播放所有的漫游路径
-
setTimeDuration(startTime, duration)
roaming/RoamingController.js, line 111 -
设置漫游开始时间以及时间间隔
Name Type Description startTime
Date 开始时间
duration
Number 时间间隔(秒)
-
setTimeRange(startTime, endTime)
roaming/RoamingController.js, line 86 -
设置漫游的时间区间
Name Type Description startTime
Date 开始时间
endTime
Date 结束时间
-
trackedPath(path, viewMode, viewOption)
roaming/RoamingController.js, line 232 -
相机视角跟踪某一条路径
Name Type Description path
RoamingPath 漫游路径
viewMode
String 视角类型,通过
RoamingViewMode
的属性值赋值const RoamingViewMode = { FP: "1", // 第一人称视角 TP: "2", // 第三人称视角 TRACKED: "3", // 跟随视角 FREE: "5" // 自由视角 };
viewOption
Object 相机视角参数
Name Type Default Description alt
Number 5 optional 当
viewMode
为RoamingViewMode.TP
时,相机位置高度设置pitch
Number 0 optional 当
viewMode
为RoamingViewMode.TP
时,相机偏移量中的俯仰角设置range
Object 相机视角范围