reset动画,由于字数限制我把不必要的空格删掉了,辛苦大家自己断代码
function reset(){clippingRegion={x:Math.random()*(canvas.width-2*radius)+radius,y:Math.random()*(canvas.height-2*radius)+radius,r:740};var t2=setInterval(function(){clippingRegion.r-=20;if(clippingRegion.r<50){clearInterval(t2);}draw(image,clippingRegion);},30)}
function reset(){clippingRegion={x:Math.random()*(canvas.width-2*radius)+radius,y:Math.random()*(canvas.height-2*radius)+radius,r:740};var t2=setInterval(function(){clippingRegion.r-=20;if(clippingRegion.r<50){clearInterval(t2);}draw(image,clippingRegion);},30)}