Skip to content

HeightShadow

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

HeightShadow

Importing

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

Functions

HeightShadow heightShadow = HeightShadow:new(Body Body, Image Texture)
Description: Creates a height map shadow object.

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

Methods

HeightShadow: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 = HeightShadow:GetPosition()
Description: Gets the actual position of the camera on the light world.

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

HeightShadow:SetTexture(Image Texture)
Description: Sets the texture of the height map shadow object.

table vertices = HeightShadow:GetVertices()
Description: Gets the vertices of the height map.

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

Clone this wiki locally