大鱼的眼睛不能和鼠标重合,总是有一段固定的距离
function onMouseMove(e)
{
if(e.offSetX || e.layerX)
{
mx = e.offSetX == undefined ? e.layerX : e.offSetX;
my = e.offSetY == undefined ? e.layerY : e.offSetY;
}
}
---------------------------------------------------------------------------
this.x = lerpDistance(mx, this.x, 0.98);
this.y = lerpDistance(my, this.y, 0.98);