Once again, here is the final result 👀
This system works pretty well and has ok performance as long as you don't have too many lights or shadow casters.
It will be much more performant written entirely in Javascript.
Once the Javascript features are good enough to replace these events, I'll add a section with the JS code that do the exact same thing these events do.
Again, this will need some adjustments to be replicated for your game, and this tutorial is more of a guide on how to replicate it with my own implementation given as an example than a proper "do this, do that" tutorial.
Alright, end of tutorial, bye 👋.