I wanted to try and do some ray casting. I've read that it's not possible with JS and WebGL. I get that. I wanted to start a conversation about the issue and possible hacks to do it in a slightly less high end fashion.
Below is some google image I scraped from some Box2D turotial.
<img src="http://www.iforce2d.net/image/explosions-raycast1.png" border="0" />
Here you see the concept. You have a series of light rays coming from the character. This is easily done in C2 using the "destination out" blend mode and a light sprite.
I think the real issue comes in the changing, blending and shaping of the light sprites.
You don't want to resize the sprite, because that will change the fade on it. It will just look short and stubby and not mix well. What you really want it to cut it off as it hits an object.
I haven't been able to come up with a realistic demo.
I think the answer in C2 is a combination of Masks and Destination Outs.
But I'd like to hear ideas on it.