You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the light modeling done by Priorblue here,
only it has been largely refactored and edited to allow for scaling and proper translation.
Supports love 0.10.1
Installation
Copy and rename the lib folder into your project.
How to use
localLightWorld=require"lib" --the path to where light_world is (in this repo "lib")--create light worldfunctionlove.load()
lightWorld=LightWorld({
ambient= {55,55,55}, --the general ambient light in the environment
})
endfunctionlove.update(dt)
lightWorld:update(dt)
lightWorld:setTranslation(x, y, scale)
endfunctionlove.draw()
love.graphics.push()
love.graphics.translate(x, y)
love.graphics.scale(scale)
lightWorld:draw(function()
-- do your stuffend)
love.graphics.pop()
end
For more information please check out the wiki and see the examples directory to see how it is fully used. This project can be run with love to see the demonstrations in action.
Gamera & HUMP
There are example in the example directory how to use both of these with the library.