• Stars
    star
    217
  • Rank 178,192 (Top 4 %)
  • Language
    Lua
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A lighting model made for love 2d

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

More Repositories

1

behaviourtree.lua

a simple behaviour tree library for lua ported from javascript
Lua
130
star
2

amore

a wip(again) go game framework
Go
86
star
3

gween

Tween animation library for go with a simple interface.
Go
79
star
4

talkies

A dialog system for LΓΆve2D
Lua
77
star
5

tile_engine

a simple html5/javascript tile engine
JavaScript
34
star
6

botbattle

A battle arena built in go for a upcoming go hack meetup
JavaScript
23
star
7

amore-examples

examples for the amore game framework
Go
15
star
8

gob

A Go Lang command line tool to help with project management and faster revel setup
Shell
10
star
9

myspritenormaltool

just my own tool for generating and editing normals for spritesheets
Lua
8
star
10

Moan.lua

Mirror of a lost library
Lua
5
star
11

gluey

Opinionated CLI Graphical Input
Go
5
star
12

grind

Fast, reproducible, and concurrent development environment and process manager
Go
4
star
13

ump

An AABB collision detection library for Go
Go
3
star
14

revel_mailer

A (as of yet) simple mailer for revel to use revel's config and template engine
Go
2
star
15

OmasKruidkoek

I am publishing my Oma's Kruidkoek (Dutch Spice Cake) Recipe
2
star
16

bopit

simple, quick, AABB framework-independent, collision system.
JavaScript
2
star
17

sjs

simple javascript interpreter without a name
JavaScript
2
star
18

vGoDoRPQl

An example of vGo/Docker/React/PostgresQL/GraphQL
Go
2
star
19

vlc-clickr

A remote control for VLC media player served up with RoR
Ruby
1
star
20

grouter

A lightweight tile engine for html5 game creation
JavaScript
1
star
21

Tab-Legitimizer

A chrome extention to mask what the tab displays
JavaScript
1
star
22

dotfiles

my dotfiles
Lua
1
star
23

mgorx

A mgo revel extention
Go
1
star
24

ff_currently

Currently Chrome extention ported to FireFox
JavaScript
1
star
25

cli_best_practices_presentation

Go
1
star