I've thought about this for a while, I have have done a bit of research on this topic. Other than using a framework and writing super complex/long code, there are two options that I can think of:
- use shadowblur
- use radial/linear gradients
http://www.w3schools.com/tags/canvas_createradialgradient.asp
I will edit this post when I have more info Another option is to use alpa colors to draw various levels of darkness such as squares or circles:)
context.save();
context.globalAlpha = 0.5;
context.fillStyle = "#000000";
// draw a whole ton of shapes with 50% transparency with a black color...
context.restore();