defold / sample-lights-and-shadows

Example of how to achieve pixel perfect shadows in a 2D view
MIT License
31 stars 5 forks source link

Add updating of radius for non-static light sources #5

Closed haath closed 2 years ago

haath commented 2 years ago

Just a small update here.

I added a line in the update() function of lightsource.script that also updates the light radius for non-static objects. For some reason this was missing.

I have also updated the example collection to showcase this by animating the blue ball's light radius.

Animation


Edit: I've also added the same for the color property.