An exercise on html5 canvas and KineticJS