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);
把大鱼的跟随强度改成0.01
this.x = lerpDistance(mx, this.x, 0.01); this.y = lerpDistance(my, this.y, 0.01);
这个值越小,跟鼠标跟得越紧