All shadow bodys (circle, rect, image etc...) are now combined to one object, so you can use all options like glow, alpha, color on all types. The initializations stay the same. Body types and shadow types are now separated, so you can now create an image body and set the shadow type to circle for example.
I also added image shadows over transformation. You can change the color and alpha of the shadow, too.
Image shadows:
Code:
Code: Select all
function love.load()
-- create a shadow body (default shadow: rectangle)
shadowBody = lightWorld.newImage(img, x, y, width, height, offsetX, offsetY)
-- change the shadow type to circle
shadowBody.setShadowType("circle", range, offsetX, offsetY)
-- change the shadow type to image
shadowBody.setShadowType("image", pivotX, pivotY, fadeStrength)
end