Line Of Sight in javascript DOM game
10. Květen 2024 v 01:45
I am creating a 2D game in javascript using pure DOM, on my computer and on my cell phone WebGL or OpenGL do not work.
How can I create Lights and shadows effects using Line Of Sight, for example, I want to create a javascript class that adds the tag a circular object called "light", and I want this light to throw rays in all directions from the center of the light, what if the light touches an object of the sprite class it projects a shadow of the object