mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-16 12:57:27 +02:00
Expose mode shift period to JS, remove default value
This commit is contained in:
parent
81e7f8e0a5
commit
60c33c18c3
3 changed files with 4 additions and 4 deletions
|
@ -195,6 +195,8 @@ function keyReleaseEvent(event) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function mousePressEvent(event) {
|
||||
if (alt && !isActive) {
|
||||
mouseLastX = event.x;
|
||||
|
|
|
@ -317,8 +317,6 @@ void CameraScriptableObject::setMode(const QString& mode) {
|
|||
}
|
||||
if (currentMode != targetMode) {
|
||||
_camera->setMode(targetMode);
|
||||
const float DEFAULT_MODE_SHIFT_PERIOD = 0.5f; // half second
|
||||
_camera->setModeShiftPeriod(DEFAULT_MODE_SHIFT_PERIOD);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,9 +42,8 @@ public:
|
|||
void setTargetPosition(const glm::vec3& t);
|
||||
void setTightness(float t) { _tightness = t; }
|
||||
void setTargetRotation(const glm::quat& rotation);
|
||||
|
||||
void setMode(CameraMode m);
|
||||
void setModeShiftPeriod(float r);
|
||||
void setMode(CameraMode m);
|
||||
void setFieldOfView(float f);
|
||||
void setAspectRatio(float a);
|
||||
void setNearClip(float n);
|
||||
|
@ -130,6 +129,7 @@ public:
|
|||
public slots:
|
||||
QString getMode() const;
|
||||
void setMode(const QString& mode);
|
||||
void setModeShiftPeriod(float r) {_camera->setModeShiftPeriod(r); }
|
||||
void setPosition(const glm::vec3& value) { _camera->setTargetPosition(value);}
|
||||
|
||||
glm::vec3 getPosition() const { return _camera->getPosition(); }
|
||||
|
|
Loading…
Reference in a new issue