anaglym/tests/imagetest.lua

18 lines
576 B
Lua

function init_event()
ag.import("std")
image = ag.loadTexture("transparent.png")
local crate = ag.loadModelStatic("crate")
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