function drawBg(cxt,x,y){ console.log(sum()); cxt.save(); cxt.beginPath(); cxt.moveTo(x,y); cxt.fillStyle="red"; //cxt.bezierCurveTo(x+32, y-26, x+242, y+68, x+300, y+37); cxt.bezierCurveTo(x+32, y-26, x+242, y+68, x+300, y+37); cxt.lineTo(x+300,y+237); cxt.bezierCurveTo(x+162, y+254, x+84, y+138, x, y+174); cxt.lineTo(x,y); cxt.fill(); cxt.closePath(); cxt.restore(); cxt.beginPath(); cxt.moveTo(x,y); cxt.lineTo(x,y+300); cxt.lineWidth=6; cxt.lineCap="round"; cxt.stroke(); cxt.closePath(); }
就是用了贝塞尔曲线,想不出用什么方法让它飘起来,风吹的效果??
请大家帮帮忙!!!
相关分类