Click to drag walls and light sources
+multiple sources
+lights are additive
+shadow casting objects can have any number of sides
+shadow quality adjustable
+background lighting
here's a screenshot of it working in a platformer i'm making.
here is the .capx file, requires the canvas plugin
I use multiple canvas objects, one for each light source.
Each canvas is only as big as its source's light sprite. Because they are not the same size as the screen, i have to multiply where the shadows should be by a ratio which you see in the events as 'ResMulti'.. The part where the shadows are actually drawn is similar to r0j0hounds original .capx a long time ago where it draws a quad for each pair of corners.
the additive lighting is done by using the (spoilers!) additive blending mode on each canvas, the layer they are all on has the 'multiply' shader. This combo is a replacement for using the 'destination out' method that only does black n white.