Skip to content

Commit 6ecd082

Browse files
committed
Luven v1.22 dev
Added Luven.removeAllLights() Luven become more and more a global thing with transition effect.
1 parent f206b5f commit 6ecd082

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

luven/luven.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
local luven = {
2-
_VERSION = 'Luven v1.21 dev',
2+
_VERSION = 'Luven v1.22 dev',
33
_URL = 'https://github.com/chicogamedev/Luven',
44
_DESCRIPTION = 'A minimalist light engine for Löve2D',
55
_CONTRIBUTORS = 'Lionel Leeser, Pedro Gimeno (Help with camera)',
@@ -429,12 +429,16 @@ function luven.drawEnd()
429429
lg.setBlendMode("alpha")
430430
end
431431

432-
function luven.dispose()
432+
function luven.removeAllLights()
433433
for _, v in pairs(currentLights) do
434434
if (v.enabled) then
435435
luven.removeLight(v.id)
436436
end
437437
end
438+
end
439+
440+
function luven.dispose()
441+
luven.removeAllLights()
438442

439443
clearTable(currentLights)
440444
clearTable(luven.lightShapes)

main.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ local power = 0.25
1616

1717
function love.load()
1818
love.graphics.setDefaultFilter("nearest", "nearest")
19-
Profi:start()
19+
-- Profi:start()
2020
image = love.graphics.newImage("Background.png")
2121

2222
Luven.init()
@@ -100,6 +100,6 @@ end -- function
100100

101101
function love.quit()
102102
Luven.dispose()
103-
Profi:stop()
104-
Profi:writeReport("LuvenProfile.txt")
103+
-- Profi:stop()
104+
-- Profi:writeReport("LuvenProfile.txt")
105105
end -- function

0 commit comments

Comments
 (0)