Me too..wonder how it can be done. Is this a javascript library?
Doing a little digging, there is a handler attached to the mousemove event on the canvas element. There is a credit here: Thanks to Giovanni Difeterici (http://www.gdifeterici.com/)
... but it's minified and I can't hunt down the source.