From b8df012c4d06add8e2df29bda523f295da15f73c Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Thu, 6 Aug 2026 14:59:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=A2=E7=90=B4Boss=E5=A4=A7=E6=BF=80?= =?UTF-8?q?=E5=85=89=E5=8D=8A=E5=9C=86=EF=BC=9A=E6=94=B9=E7=94=A8=E5=92=8C?= =?UTF-8?q?=E6=BF=80=E5=85=89=E7=BA=BF=E4=B8=80=E8=87=B4=E7=9A=84=E6=8F=8F?= =?UTF-8?q?=E8=BE=B9=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 去掉fill()实心填充,改用stroke()弧线描边 - 粗主色弧线(lineWidth=bm.w)+细白边弧线(lineWidth=bm.w/3),和激光线绘制方式完全一致 - 半圆与激光都是描边发光风格,纹理自然统一 --- star-raid/js/render.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/star-raid/js/render.js b/star-raid/js/render.js index 4d8412d..16fb0d2 100644 --- a/star-raid/js/render.js +++ b/star-raid/js/render.js @@ -224,11 +224,11 @@ 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; - // 大激光起点扩口半圆:直径=线宽,最高点=炮口,线从半圆底部开始向下延伸,不重叠 + // 大激光起点扩口半圆:弧线描边风格与激光线完全一致(粗主色弧+细白边弧) 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.strokeStyle=bm.col;ctx.lineWidth=bm.w; + ctx.beginPath();ctx.arc(bm.x1,bm.y1+pR,pR,Math.PI,0);ctx.stroke(); + ctx.strokeStyle="#fff";ctx.lineWidth=Math.max(1,bm.w/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+bm.w);ctx.lineTo(bm.x2,bm.y2);ctx.stroke();