滑鼠模式參數。
面板模式參數。
可選disableKeyboard?: boolean關閉鍵盤輸入
可選disablePan?: boolean關閉平移
可選disableRotateHorizontal?: boolean關閉水平旋轉
可選disableRotateVertical?: boolean關閉垂直旋轉
可選disableZoom?: boolean關閉縮放
可選zoomRate?: number縮放速度
旋轉模式參數。
可選allowUpdateFocusPoint?: boolean允許更新注視點
可選disableKeyboard?: boolean關閉鍵盤輸入
可選disableMouse?: boolean關閉滑鼠輸入
可選disableTouch?: boolean關閉觸控輸入
可選maxDistance?: number距離注視點最大距離
可選maxPolarAngle?: number天頂角上限
可選minDistance?: number距離注視點最小距離
可選minPolarAngle?: number天頂角下限
可選staticAzimuthAngleOffset?: number方位角平移量
可選zoomRate?: number縮放速度
地面行走模式參數。
可選collisionDetectFrustumHeight?: number碰撞採樣攝影機高度(相對當前攝影機位置),單位公尺
可選collisionDetectRange?: number碰撞偵測範圍,預設為0.5(公尺)
可選considerModel?: boolean是否考慮三維模型
可選disableKeyboard?: boolean關閉鍵盤輸入
可選disableMouse?: boolean關閉滑鼠輸入
可選enableMovingShake?: boolean開啟行走搖晃
可選heightAboveGround?: number離地高度
可選horizonAmplitude?: number水平搖晃幅度
可選keyboardMoveRate?: number鍵盤移動速度
可選keyboardRotateRate?: number鍵盤旋轉速度
可選mouseRotateRate?: number滑鼠旋轉速度
可選standDetectFrustumHeight?: number站立採樣攝影機高度(相對當前攝影機位置),單位公尺
可選standDetectRange?: number站立偵測範圍,預設為0.1(公尺)
可選stopMovingShakeSpeed?: number停止搖晃速度
可選verticalAmplitude?: number垂直搖晃幅度
第三人稱模式參數。 熱鍵說明:
可選collisionBoxHeight?: number碰撞方塊高度
可選collisionBoxWidth?: number碰撞方塊寬度
可選collisionDetectFrustumHeight?: number碰撞採樣攝影機高度(相對當前攝影機位置),單位公尺
可選collisionDetectRange?: number站立偵測範圍,預設為0.1(公尺)
可選considerModel?: boolean是否考慮三維模型
可選disableKeyboard?: boolean關閉鍵盤輸入
可選disableMouse?: boolean關閉滑鼠輸入
可選fixSpeed?: boolean固定速度,不隨攝影機高度調整
可選focusPoint?: GeoPoint | Geo3DPoint初始注視點
可選glTFModel?: window.ov.CustomGLTFEntity使用的模型
可選glTFModelFunction?: (模型處理函式
const glTFModelFunction = (glTFEntity, position, speed, rotate, object) => {
//設定旋轉軸
rotate.x = 1;
rotate.y = 0;
rotate.z = 0;
//設定偏移角度
rotate.offset = 30;
glTFEntity.update({ position: position });
glTFEntity.playAll();
let list = glTFEntity.getAnimationList();
if (speed < 1.5) {
let weight = speed / 1.5;
glTFEntity.setAnimationWeight(0, 1 - weight);
glTFEntity.setAnimationWeight(1, 0);
glTFEntity.setAnimationWeight(3, weight);
if (list.length !== 0) {
glTFEntity.setPlaySpeed(0, list[0].cycleTime \* (1 + weight));
glTFEntity.setPlaySpeed(1, list[1].cycleTime \* (1 + weight));
glTFEntity.setPlaySpeed(3, list[3].cycleTime \* (1 + weight));
}
} else {
let weight = (speed - 1.5) / 1.5;
if (weight > 1.0) {
weight = 1.0;
}
glTFEntity.setAnimationWeight(0, 0);
glTFEntity.setAnimationWeight(1, weight);
glTFEntity.setAnimationWeight(3, 1 - weight);
if (list.length !== 0) {
glTFEntity.setPlaySpeed(0, list[0].cycleTime \* (1 + weight));
glTFEntity.setPlaySpeed(1, list[1].cycleTime \* (1 + weight));
glTFEntity.setPlaySpeed(3, list[3].cycleTime \* (1 + weight));
}
}
可選heightAboveGround?: number離地高度
可選maxDistance?: number距離注視點最大距離
可選maxPolarAngle?: number天頂角上限
可選minDistance?: number距離注視點最小距離
可選minPolarAngle?: number天頂角下限
可選moveSpeed?: number移動速度,若fixSpeed為false,為初始速度;若fixSpeed為true,為最終速度
可選object?: any物件參數
可選standDetectFrustumHeight?: number站立採樣攝影機高度(相對注視點),單位公尺
可選standDetectRange?: number碰撞偵測範圍,預設為0.5(公尺)
可選staticAzimuthAngleOffset?: number方位角平移量
可選zoomRate?: number縮放速度
跟隨模式參數。
可選azimuthAngleRotatePerSecond?: number方位角每秒旋轉角度 (deg/s)
可選entity?: window.ov.CustomGLTFEntity自畫圖素 CustomGLTFEntity
可選firstPersonViewMovingFunction?: (第一人稱處理函式
const firstPersonViewMovingFunction = (entity, moveEvent, pos, v, up, offset) => {
let position = entity.getParameter().position;
let vDir = moveEvent.getV();
let upDir = moveEvent.getUp();
//設定座標
pos.x = position.x;
pos.y = position.y;
pos.z = position.z;
//設定面向
v.x = vDir.x;
v.y = vDir.y;
v.z = vDir.z;
//設定頭頂方向
up.x = upDir.x;
up.y = upDir.y;
up.z = upDir.z;
//設定偏移量
offset.x = -0.5;
offset.y = 2;
offset.z = 2;
}
可選maxDistance?: number距離注視點最大距離
可選minDistance?: number距離注視點最小距離
可選moveEvent?: CameraMoveEvent移動事件 ov.MoveEvent
可選polarAngleRotatePerSecond?: number天頂角每秒旋轉角度 (deg/s)
可選thirdPersonViewMovingFunction?: (第三人稱處理函式
可選view?: FOLLOW_VIEW跟隨視角 ov.FOLLOW_VIEW
GoogleEarth模式參數。
可選disableKeyboard?: boolean關閉鍵盤輸入
可選disableZoom?: boolean關閉縮放
可選zoomRate?: number縮放速度
操作模式參數表。