From e17c312871a9a823b4afaf56b00ecfc2990f4d8a Mon Sep 17 00:00:00 2001 From: falsycat Date: Wed, 9 Oct 2019 00:00:00 +0000 Subject: [PATCH] [fix] Fixed a wrong formula for matrix creation. --- sjplayer/src/sjplayer/util/MatrixFactory.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sjplayer/src/sjplayer/util/MatrixFactory.d b/sjplayer/src/sjplayer/util/MatrixFactory.d index 7c3c40e..49009ec 100644 --- a/sjplayer/src/sjplayer/util/MatrixFactory.d +++ b/sjplayer/src/sjplayer/util/MatrixFactory.d @@ -9,13 +9,13 @@ import gl4d; struct MatrixFactory { public: /// - @property mat3 Create() const { + mat3 Create() const { auto m = mat3.identity; m.scale(scale.x, scale.y, scale.z); m.rotatex(rotation.x); m.rotatey(rotation.y); m.rotatez(rotation.z); - m.translate(translation.x, translation.y, translation.z); + m.translate(translation.x, translation.y, 1); return m; } @@ -38,5 +38,5 @@ struct MatrixFactory { /// vec3 rotation = vec3(0, 0, 0); /// - vec3 translation = vec3(0, 0, 0); + vec2 translation = vec2(0, 0); }