根据鼠标对画布的输入修改相机位置和方向.
| Name | Type | Description |
|---|---|---|
scene |
Scene | The scene. |
Members
设定2D和哥伦布视图中反弹动画持续时间,以秒计.
-
Default Value:
3.0
When disabled, the values of
maximumZoomDistance and minimumZoomDistance are ignored.
Also used in conjunction with Cesium3DTileset#enableCollision to prevent the camera from moving through or below a 3D Tileset surface.
这也可能影响在3D梯子上使用 HeightReference.CLAMP_TO_GROUND 时的夹击行为.
-
Default Value:
true
如果输入是真实的,则允许有条件地使用启用的旗帜 Translate, 启用Zoom,
启用旋转、 启用 Tilt 和启用 Look 。 如果错误, 所有输入都禁用 .
NOTE: This setting is for temporary use cases, such as camera flights and
区域拖动选择(见Picking演示). 通常在
此类活动的开始,并在完成后确定真相。 使输入禁用
穿过摄影机飞行的尽头, 你必须使用其他布林(可翻译,
启用Zoom、启用旋转、启用Tilt和启用Look).
-
Default Value:
true
如果为真,则允许用户使用自由视图. 如果错误, 只能通过翻译更改相机视图方向
或旋转。 此旗帜仅适用于3D和哥伦布视图模式.
-
Default Value:
true
如果为真,则允许用户旋转翻译用户位置的世界.
此旗帜仅适用于2D和3D.
-
Default Value:
true
如果真实,允许用户倾斜相机. 如果错误,相机被锁定到当前标题上.
这面旗帜只适用于3D和哥伦布视图.
-
Default Value:
true
如果为真,则允许用户绕行地图。 如果错误, 相机将锁定在当前位置 .
此旗帜仅适用于2D和哥伦布视图模式.
-
Default Value:
true
如果为真,则允许用户缩放进出. 如果错误,相机被锁定到当前与椭圆的距离.
-
Default Value:
true
A parameter in the range
[0, 1) used to determine how long
由于惯性,相机将继续旋转.
值为0,相机将无惯性.
-
Default Value:
0.9
A parameter in the range
[0, 1) used to determine how long
相机会继续翻译 因为惯性.
值为0,相机将无惯性.
-
Default Value:
0.9
A parameter in the range
[0, 1) used to determine how long
由于惯性,相机将继续放大.
值为0,相机将无惯性.
-
Default Value:
0.8
lookEventTypes : CameraEventType|Array|undefined
允许用户改变镜头所查看方向的输入. 这只适用于3D和哥伦布视图模式.
该类型可以是 CameraEventType , 未定义 ,是一个与 eventType 有关天体
and modifier properties with types CameraEventType and KeyboardEventModifier,
或前述任何一组.
-
Default Value:
{ eventType : CameraEventType.LEFT_DRAG, modifier : KeyboardEventModifier.SHIFT }
A parameter in the range
[0, 1) used to limit the range
每个动画框的窗口宽度/高度的百分比.
这有助于在低帧速率情况下控制相机.
-
Default Value:
0.1
角度相对于椭圆正常,限制用户可以倾斜相机的最大量. 如果 NT 0 未定义 NT 1 ,相机倾斜角度不受限制.
-
Default Value:
undefined
Example:
// Prevent the camera from tilting below the ellipsoid surface
viewer.scene.screenSpaceCameraController.maximumTiltAngle = Math.PI / 2.0;
缩放时相机位置的最大尺寸,以米计. 默认为正无穷.
-
Default Value:
Number.POSITIVE_INFINITY
相机在测试与地形碰撞之前必须达到最小高度. 默认为 scene.ellipsoid.minimumRadius * 0.0025 当使用另一个椭圆度大于 WGS84 .
-
Default Value:
15000.0 or scene.ellipsoid.minimumRadius * 0.0025.
相机在与惯性进行放大时,在测试与地形碰撞之前必须达到最小距离. 默认为 scene.ellipsoid.minimumRadius * 0.00063 当使用 WGS84 的另一种椭圆形时.
-
Default Value:
4000.0或 NT 0 *
相机的最小高度必须是在选择地形或场景内容之前,而不是椭圆形. 默认为 scene.ellipsoid.minimumRadius * 0.025 当使用 WGS84 的另一种椭圆时.
-
Default Value:
150000.0 or scene.ellipsoid.minimumRadius * 0.025
相机在从旋转轨道球切换到
点击来自天空或空间时的自由外观。 * 1.175 当使用另一个椭圆值大于 WGS84 .
-
Default Value:
75000000.0或 NT 0 * 1.175
缩放时相机位置的最小尺寸,以米计. 默认为1.0.
-
Default Value:
1.0
rotateEventTypes : CameraEventType|Array|undefined
允许用户围绕地球或另一个对象旋转的输入. 这只适用于3D和哥伦布视图模式.
该类型可以是 CameraEventType , 未定义 ,是一个与 eventType 有关天体
and modifier properties with types CameraEventType and KeyboardEventModifier,
或前述任何一组.
-
Default Value:
CameraEventType.LEFT_DRAG
tiltEventTypes : CameraEventType|Array|undefined
允许用户在3D和哥伦布视图中倾斜或2D扭曲的输入.
该类型可以是 CameraEventType , 未定义 ,是一个与 eventType 有关天体
and modifier properties with types CameraEventType and KeyboardEventModifier,
或前述任何一组.
-
Default Value:
[CameraEventType.MIDDLE_DRAG, CameraEventType.PINCH, {
eventType : CameraEventType.LEFT_DRAG,
modifier : KeyboardEventModifier.CTRL
}, {
eventType : CameraEventType.RIGHT_DRAG,
modifier : KeyboardEventModifier.CTRL
}]
translateEventTypes : CameraEventType|Array|undefined
允许用户绕行地图的输入. 这仅适用于2D和哥伦布视图模式.
该类型可以是 CameraEventType , 未定义 ,是一个与 eventType 有关天体
and modifier properties with types CameraEventType and KeyboardEventModifier,
或前述任何一组.
-
Default Value:
CameraEventType.LEFT_DRAG
zoomEventTypes : CameraEventType|Array|undefined
允许用户缩放的输入 .
该类型可以是 CameraEventType , 未定义 ,是一个与 eventType 有关天体
and modifier properties with types CameraEventType and KeyboardEventModifier,
或前述任何一组.
-
Default Value:
[ CameraEventType.RIGHT_DRAG , CameraEventType.WHEEL , CameraEventType.PINCH ]
相机放大速度的乘数.
-
Default Value:
5.0
Methods
删除该对象所持有的鼠标听众.
Once an object is destroyed, it should not be used; calling any function other than
Once an object is destroyed, it should not be used; calling any function other than
isDestroyed will result in a DeveloperError exception. Therefore,
assign the return value (undefined) to the object as done in the example.
Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
Example:
controller = controller && controller.destroy();
See:
如果此对象被销毁, 返回真实; 否则, 错误 .
If this object was destroyed, it should not be used; calling any function other than
If this object was destroyed, it should not be used; calling any function other than
isDestroyed will result in a DeveloperError exception.
Returns:
true if this object was destroyed; otherwise, false.