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 pathRoamingPath 漫游路径
-
changeSpeed(speed)
roaming/RoamingController.js, line 161 -
改变播放速度
Name Type Description speedNumber 播放速度
-
clearPath()
roaming/RoamingController.js, line 206 -
清除所有的漫游路径
-
getPath(id){RoamingPath}
roaming/RoamingController.js, line 185 -
根据设置的路径唯一
id获取漫游路径Name Type Description idString 路径唯一
idReturns:
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 pathRoamingPath 漫游路径
-
restore()
roaming/RoamingController.js, line 151 -
继续播放所有的漫游路径
-
setTimeDuration(startTime, duration)
roaming/RoamingController.js, line 111 -
设置漫游开始时间以及时间间隔
Name Type Description startTimeDate 开始时间
durationNumber 时间间隔(秒)
-
setTimeRange(startTime, endTime)
roaming/RoamingController.js, line 86 -
设置漫游的时间区间
Name Type Description startTimeDate 开始时间
endTimeDate 结束时间
-
trackedPath(path, viewMode, viewOption)
roaming/RoamingController.js, line 232 -
相机视角跟踪某一条路径
Name Type Description pathRoamingPath 漫游路径
viewModeString 视角类型,通过
RoamingViewMode的属性值赋值const RoamingViewMode = { FP: "1", // 第一人称视角 TP: "2", // 第三人称视角 TRACKED: "3", // 跟随视角 FREE: "5" // 自由视角 };viewOptionObject 相机视角参数
Name Type Default Description altNumber 5 optional 当
viewMode为RoamingViewMode.TP时,相机位置高度设置pitchNumber 0 optional 当
viewMode为RoamingViewMode.TP时,相机偏移量中的俯仰角设置rangeObject 相机视角范围