Cracked Glass Effect Using an HTML5 Canvas
This demo contains an image and HTML5 Canvas element positioned over the image
which contains the actual cracks. The image is unaffected. You can hide the image
to see the canvas overlay. Click the "Add Cracks" to draw the whole crack effect.
Click the "Add Single Crack" to see what the crackedLineSegment() function does
for one cracked line. Also, take a
look at my update version
which I think does a better job rendering the effect.