GeoWalkerAnimationCamera

new Cesium.GeoWalkerAnimationCamera(options)

行走动画相机(近景相机、室内相机)
Name Type Description
options Object optional 对象具有以下属性:
Name Type Default Description
viewer Viewer optional 地球对象
path Array optional 路径
moveStep Number 2.0 optional 移动步进
rotateStep Number 10.0 optional 转向步进
frameChange function optional 动画节点改变事件
Author:
  • liuck
Example:
//示例代码:
     	
		var geoWalkerAnimationCamera = new Cesium.GeoWalkerAnimationCamera({
			viewer : viewer,
			moveStep : 2.0,
			rotateStep : 3.0,
			path : [
				{
					"geoposition" : {
						"longitude" : 112.5972286663428,
						"latitude" : 37.82588195767011,
						"height" : 839.3667863349507
					},
					"direction" : {
						"x" : 0.750645374175468,
						"y" : -0.21342301299171448,
						"z" : 0.6252856465284569
					},
					"moveSpeed" : 0,
					"rotateSpeed" : 0
				}, {
					"geoposition" : {
						"longitude" : 112.5972286663428,
						"latitude" : 37.82588195767011,
						"height" : 839.3667863349507
					},
					"direction" : {
						"x" : -0.5966420892240152,
						"y" : -0.6472757810536913,
						"z" : 0.4743967544447751
					},
					"moveSpeed" : 0,
					"rotateSpeed" : 0
				}
			],
			frameChange : function(e){
				//TODO frameChanged
			}
		})
Demo:

Members

walkFrame

行走帧控制对象
Properties:
Name Type Description
WalkFrame WalkFrame 行走帧控制对象
Properties
Name Type Description
start function 开始行走动画,默认从第一个节点开始,具备一个参数指定从哪个节点开发播放
pause function 暂停
stop function 停止
Example:
geoWalkerAnimationCamera.walkFrame.start(2);
geoWalkerAnimationCamera.walkFrame.pause();
geoWalkerAnimationCamera.walkFrame.start();
geoWalkerAnimationCamera.walkFrame.stop();

Methods

activate()

激活相机

deactivate()

禁用相机

destroy()

销毁

raiseUpdate(camera)

触发更新机制
Name Type Description
camera Camera 相机对象