From d45064be602c3becb046d86913ea8013774b0079 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 16 May 2018 19:19:03 +0800 Subject: v0.1.0 --- bin/main.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'bin/main.lua') diff --git a/bin/main.lua b/bin/main.lua index 190c644..3231705 100644 --- a/bin/main.lua +++ b/bin/main.lua @@ -39,7 +39,7 @@ local jg = jin.graphics local effect = jg.Shader(shader) local diffuse = jg.Image("treestump_diffuse.png") local img = jg.Image("treestump.png") - +local ww, wh = jg.size() jin.core.onEvent = function(e) if e.type == "quit" then jin.core.quit() @@ -48,15 +48,14 @@ end jin.core.onUpdate = function() local mx, my = jin.mouse.position() - my = 400 - my + my = wh - my effect:send("number", "mx", mx) effect:send("number", "my", my) end jin.core.onDraw = function() - effect:send("Image", "diffuse", diffuse); jg.use(effect) + effect:send("Image", "diffuse", diffuse); img:setAnchor(16, 16) - jg.draw(img, 250, 200, 5, 5) - + jg.draw(img, 250, 200, 2, 2) end -- cgit v1.1-26-g67d0