summaryrefslogtreecommitdiff
path: root/demo/Camera.lua
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-03-01 22:49:53 -0600
committersanine <sanine.not@pm.me>2022-03-01 22:49:53 -0600
commit82cf18b9163f86e4d0a1cd999d4815cc3f85a3fd (patch)
tree1bc96ae80f509ef919bb7e74500dc6b37c9e59cf /demo/Camera.lua
parent10288765588673645c1cc0a6e3d2245aff3f9080 (diff)
clear out demo/
Diffstat (limited to 'demo/Camera.lua')
-rw-r--r--demo/Camera.lua32
1 files changed, 0 insertions, 32 deletions
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