diff --git a/star-raid/js/render.js b/star-raid/js/render.js index 9bb6f47..4d8412d 100644 --- a/star-raid/js/render.js +++ b/star-raid/js/render.js @@ -224,16 +224,16 @@ function drawBossFx(){ ctx.beginPath();ctx.moveTo(bm.x1,bm.y1);ctx.lineTo(bm.x2,bm.y2);ctx.stroke();ctx.globalAlpha=1;}} else{ctx.globalCompositeOperation="lighter"; ctx.globalAlpha=clamp(bm.life/10,0,1)*0.85; - // 大激光起点扩口半圆:直径=激光宽度,圆心在炮口下方pR处,最高点=炮口,和激光一起出现 + // 大激光起点扩口半圆:直径=线宽,最高点=炮口,线从半圆底部开始向下延伸,不重叠 if(bm.dmg>=90000){const pR=bm.w*0.5; ctx.fillStyle=bm.col; ctx.beginPath();ctx.arc(bm.x1,bm.y1+pR,pR,Math.PI,0);ctx.fill(); ctx.strokeStyle="#fff";ctx.lineWidth=Math.max(1,pR/3); ctx.beginPath();ctx.arc(bm.x1,bm.y1+pR,pR,Math.PI,0);ctx.stroke();} ctx.strokeStyle=bm.col;ctx.lineWidth=bm.w; - ctx.beginPath();ctx.moveTo(bm.x1,bm.y1);ctx.lineTo(bm.x2,bm.y2);ctx.stroke(); + ctx.beginPath();ctx.moveTo(bm.x1,bm.y1+bm.w);ctx.lineTo(bm.x2,bm.y2);ctx.stroke(); ctx.strokeStyle="#fff";ctx.lineWidth=Math.max(1,bm.w/3); - ctx.beginPath();ctx.moveTo(bm.x1,bm.y1);ctx.lineTo(bm.x2,bm.y2);ctx.stroke(); + ctx.beginPath();ctx.moveTo(bm.x1,bm.y1+bm.w);ctx.lineTo(bm.x2,bm.y2);ctx.stroke(); ctx.globalAlpha=1;ctx.globalCompositeOperation="source-over";} } }