Need help with light_world.lua?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

tanema
206 Stars 20 Forks MIT License 198 Commits 7 Opened issues

Description

A lighting model made for love 2d

Services available

!
?

Need anything else?

Contributors list

# 59,699
Go
echo
Lua
Shell
121 commits
# 613,425
Lua
20 commits
# 268,061
moonscr...
memex
openres...
pico-8
9 commits
# 524,394
Lua
JavaScr...
Shell
4 commits
# 296,660
mri
Shell
Nim
Haxe
3 commits
# 286,252
indiede...
Lua
C++
Shell
2 commits
# 77,147
C
Lua
Shell
Amazon ...
1 commit
# 331,445
elm
Shell
Sass
1 commit
# 778,179
Lua
1 commit

light_world.lua

A library for Love2d to create a dynamic lighting system, supporting: - Shadows for any shape - Normal maps for 3d like reflections - Glow maps - Postshader effects - Animations with normal maps

All of this is base of a previous version made by PriorBlue,

Installation

Copy and rename the lib folder into your project.

How to use

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.

local LightWorld = require "lib" --the path to where light_world is (in this repo "lib")

--create light world function love.load() lightWorld = LightWorld({ ambient = {0.21,0.21,0.21}, --the general ambient light in the environment }) end

function love.update(dt) lightWorld:update(dt) lightWorld:setTranslation(x, y, scale) end

function love.draw() love.graphics.push() love.graphics.translate(x, y) love.graphics.scale(scale) lightWorld:draw(function() -- do your stuff end) love.graphics.pop() end

Contributors

  • Jon @xiejiangzhi
  • Brandon Blanker Lim-it @flamendless
  • @Azorlogh
  • Gustavo Kishima @gukiboy
  • Rose L. Liverman @TangentFoxy
  • Kyle McLamb @Alloyed
  • @Buckle2000
  • Benoit Giannangeli @giann

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.