diff options
Diffstat (limited to 'demo/MeshInstance.lua')
-rw-r--r-- | demo/MeshInstance.lua | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/demo/MeshInstance.lua b/demo/MeshInstance.lua deleted file mode 100644 index 3e879e1..0000000 --- a/demo/MeshInstance.lua +++ /dev/null @@ -1,32 +0,0 @@ -local Node = require('Node') - -local MeshInstance = {} - -MeshInstance.prototype = {} -setmetatable(MeshInstance.prototype, { __index = Node.prototype }) - -MeshInstance.prototype.draw = function(self, camera, shader) - local shader = shader or self.shader - - shader:setCamera(camera) - shader:drawMesh(self) -end - --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MeshInstance.mt = {} -MeshInstance.mt.__index = MeshInstance.prototype - --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MeshInstance.new = function(parent, position, rotation, scale, mesh, shader) - local meshinstance = Node.new(parent, position, rotation, scale) - meshinstance.mesh = mesh - meshinstance.shader = shader - - setmetatable(meshinstance, MeshInstance.mt) - - return meshinstance -end - -return MeshInstance |