mirror of
https://github.com/tanema/light_world.lua.git
synced 2024-12-24 20:24:19 +00:00
commit
5572d5135a
@ -1,5 +1,5 @@
|
|||||||
-- Example: Complex Example
|
-- Example: Complex Example
|
||||||
local LightWorld = require "lib/light_world"
|
local LightWorld = require "lib"
|
||||||
|
|
||||||
function initScene()
|
function initScene()
|
||||||
-- physic world
|
-- physic world
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-- Example: Normal map Example
|
-- Example: Normal map Example
|
||||||
local LightWorld = require "lib/light_world"
|
local LightWorld = require "lib"
|
||||||
|
|
||||||
function love.load()
|
function love.load()
|
||||||
x = 0
|
x = 0
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-- Example: Short Example
|
-- Example: Short Example
|
||||||
local LightWorld = require "lib/light_world"
|
local LightWorld = require "lib"
|
||||||
|
|
||||||
function love.load()
|
function love.load()
|
||||||
testShader = 0
|
testShader = 0
|
||||||
|
@ -21,21 +21,24 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
]]
|
]]
|
||||||
local _PACKAGE = (...):match("^(.+)[%./][^%./]+") or ""
|
local _PACKAGE = string.gsub(...,"%.","/") or ""
|
||||||
local class = require(_PACKAGE..'/class')
|
if string.len(_PACKAGE) > 0 then
|
||||||
local Light = require(_PACKAGE..'/light')
|
_PACKAGE = _PACKAGE .. "/"
|
||||||
local Body = require(_PACKAGE..'/body')
|
end
|
||||||
local util = require(_PACKAGE..'/util')
|
local class = require(_PACKAGE..'class')
|
||||||
local normal_map = require(_PACKAGE..'/normal_map')
|
local Light = require(_PACKAGE..'light')
|
||||||
local PostShader = require(_PACKAGE..'/postshader')
|
local Body = require(_PACKAGE..'body')
|
||||||
require(_PACKAGE..'/postshader')
|
local util = require(_PACKAGE..'util')
|
||||||
|
local normal_map = require(_PACKAGE..'normal_map')
|
||||||
|
local PostShader = require(_PACKAGE..'postshader')
|
||||||
|
require(_PACKAGE..'postshader')
|
||||||
|
|
||||||
local light_world = class()
|
local light_world = class()
|
||||||
|
|
||||||
light_world.blurv = love.graphics.newShader(_PACKAGE.."/shaders/blurv.glsl")
|
light_world.blurv = love.graphics.newShader(_PACKAGE.."shaders/blurv.glsl")
|
||||||
light_world.blurh = love.graphics.newShader(_PACKAGE.."/shaders/blurh.glsl")
|
light_world.blurh = love.graphics.newShader(_PACKAGE.."shaders/blurh.glsl")
|
||||||
light_world.refractionShader = love.graphics.newShader(_PACKAGE.."/shaders/refraction.glsl")
|
light_world.refractionShader = love.graphics.newShader(_PACKAGE.."shaders/refraction.glsl")
|
||||||
light_world.reflectionShader = love.graphics.newShader(_PACKAGE.."/shaders/reflection.glsl")
|
light_world.reflectionShader = love.graphics.newShader(_PACKAGE.."shaders/reflection.glsl")
|
||||||
|
|
||||||
function light_world:init(options)
|
function light_world:init(options)
|
||||||
self.lights = {}
|
self.lights = {}
|
Loading…
Reference in New Issue
Block a user