From 82cf18b9163f86e4d0a1cd999d4815cc3f85a3fd Mon Sep 17 00:00:00 2001 From: sanine Date: Tue, 1 Mar 2022 22:49:53 -0600 Subject: clear out demo/ --- demo/Camera.lua | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 demo/Camera.lua (limited to 'demo/Camera.lua') diff --git a/demo/Camera.lua b/demo/Camera.lua deleted file mode 100644 index 7abef16..0000000 --- a/demo/Camera.lua +++ /dev/null @@ -1,32 +0,0 @@ -local Node = require('Node') - -local Camera = {} - -Camera.prototype = {} -setmetatable(Camera.prototype, { __index = Node.prototype }) - -Camera.prototype.updateView = function(self) - self.basis = self.transform:basis() - self.view:look(self.position, self.basis.z, self.basis.y) -end - --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Camera.mt = {} -Camera.mt.__index = Camera.prototype - --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Camera.new = function(parent, position, rotation, scale, fov, aspect, near, far) - local camera = Node.new(parent, position, rotation, scale) - setmetatable(camera, Camera.mt) - - camera.view = honey.glm.mat4() - camera:updateView() - camera.projection = honey.glm.mat4() - camera.projection:perspective(fov, aspect, near, far) - - return camera -end - -return Camera -- cgit v1.2.1