anaglym/tests/imagetest.lua
Josh Holtrop 9058dcfefc added initial support for reference objects
git-svn-id: svn://anubis/anaglym/trunk@241 99a6e188-d820-4881-8870-2d33a10e2619
2010-02-11 01:03:08 +00:00

18 lines
587 B
Lua

function init_event()
ag.import("std")
image = ag.loadTexture("transparent.png")
local crate = ag.loadModel("crate", {static = true})
ag.setCamera(5, -5, 5)
end
function update_overlay_event(width, height)
local time = ag.elapsedTime()
local rot = time / 1000 * 90
local scale = math.sin(time / 1000) * 1.5 / 2 + 1.25
ag.drawImage(256 * scale, 256 * scale, width / 2, height / 2, image, rot);
ag.drawArc(1, 0, 0.5, width * 0.8, height * 0.8, height * 0.15,
90, 180);
ag.drawCircle(0, 0, 1, width * 0.8, height * 0.2, height * 0.15);
end