-
Notifications
You must be signed in to change notification settings - Fork 10
ImageShadow
Matías Hermosilla edited this page Aug 4, 2017
·
4 revisions
local ImageShadow = require("shadows.ShadowShapes.ImageShadow")
ImageShadow imageShadow = ImageShadow:new(Body Body, Image Texture[, number Width, number Height])
Description: Creates a image shadow object. The lighter a pixel is, the darker the shadow is.
local newLightWorld = LightWorld:new()
local newBody = Body:new(newLightWorld)
local newTexture = love.graphics.newImage("texture.png")
local newImageShadow = ImageShadow:new(newBody, newTexture)
ImageShadow: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 = ImageShadow:GetPosition()
Description: Gets the actual position of the camera on the light world.
Image Texture = ImageShadow:GetTexture()
Description: Gets the texture of the image shadow object.
ImageShadow:SetTexture(Image Texture)
Description: Sets the texture of the image shadow object.
ImageShadow:Remove()
Description: Removes the image shadow.