aboutsummaryrefslogtreecommitdiffstats
path: root/yage/core/camera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yage/core/camera.cpp')
-rw-r--r--yage/core/camera.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/yage/core/camera.cpp b/yage/core/camera.cpp
index c492351f..d52c8996 100644
--- a/yage/core/camera.cpp
+++ b/yage/core/camera.cpp
@@ -9,6 +9,8 @@
#include "camera.h"
#include "../render/shader.h"
+#include "logger.h"
+
#include <glad/glad.h>
#include <glm/gtc/matrix_transform.hpp>
@@ -43,4 +45,10 @@ void Camera::move(const glm::vec2 &direction)
update_matrix_ = true;
}
+void Camera::zoom(float factor)
+{
+ scale_ += factor;
+ update_matrix_ = true;
+}
+
} // namespace yage