Skip to content

NormalShadow

Matías Hermosilla edited this page Dec 11, 2017 · 9 revisions

NormalShadow

Importing

local NormalShadow = require("shadows.ShadowShapes.NormalShadow")

Functions

NormalShadow normalShadow = NormalShadow:new(Body Body, Image Texture[, number Width, number Height])
Description: Creates a normal map shadow object.

local newLightWorld = LightWorld:new()
local newBody = Body:new(newLightWorld)
local newTexture = love.graphics.newImage("normalTexture.png")
local newNormalShadow = NormalShadow:new(newBody, newTexture)

Methods

NormalShadow:SetPosition(number x, number y, number z)
Description: Sets the position of the camera on the light world, the 'Z' parameter is for scaling.

number x, number y, number z = NormalShadow:GetPosition()
Description: Gets the actual position of the camera on the light world.

Image Texture = NormalShadow:GetTexture()
Description: Gets the texture of the normal map shadow object.

NormalShadow:SetTexture(Image Texture)
Description: Sets the texture of the normal map shadow object.

NormalShadow:Remove()
Description: Removes the normal map.

Clone this wiki locally