From 8ad6a7f955182955aec1fff0ed367f564f31e46a Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 19 May 2018 09:15:28 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AA=97=E5=8F=A3=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/config.lua | 4 +++- bin/jin.exe | Bin 727040 -> 1451520 bytes bin/main.lua | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/config.lua b/bin/config.lua index 40e4eac..8f75804 100644 --- a/bin/config.lua +++ b/bin/config.lua @@ -2,5 +2,7 @@ return { width = 320 * 2, height = 240 * 2, - fps = 60 + fps = 60, + vsync = false, + title = "动态光照demo" } \ No newline at end of file diff --git a/bin/jin.exe b/bin/jin.exe index aeccaf1..8747343 100644 Binary files a/bin/jin.exe and b/bin/jin.exe differ diff --git a/bin/main.lua b/bin/main.lua index 11af7fd..67c6122 100644 --- a/bin/main.lua +++ b/bin/main.lua @@ -58,11 +58,17 @@ jin.core.onEvent = function(e) end end local mx, my +local c = 0 jin.core.onUpdate = function(dt) mx, my = jin.mouse.position() mx = mx / 2 my = my / 2 my = wh - my + c = c + 1 + if c == 50 then + print(1/dt) + c = 0 + end end img:setAnchor(16, 16) local cvs = jg.Canvas(320, 240) -- cgit v1.1-26-g67d0