钢琴Boss大激光半圆:白芯也改上半圆
- 内部白芯从完整圆改为上半圆arc(...,0,Math.PI,true) - 白半圆圆心(bm.x1, bm.y1+pR/3),顶部=炮口,和外部主色半圆同构
This commit is contained in:
parent
53733e6bfc
commit
cf41515239
@ -230,8 +230,8 @@ function drawBossFx(){
|
|||||||
ctx.beginPath();ctx.arc(bm.x1,bm.y1+pR,pR,0,Math.PI,true);ctx.fill(); // 上半圆
|
ctx.beginPath();ctx.arc(bm.x1,bm.y1+pR,pR,0,Math.PI,true);ctx.fill(); // 上半圆
|
||||||
ctx.fillRect(bm.x1-pR,bm.y1+pR,bm.w,bm.y2-(bm.y1+pR)); // 主矩形
|
ctx.fillRect(bm.x1-pR,bm.y1+pR,bm.w,bm.y2-(bm.y1+pR)); // 主矩形
|
||||||
ctx.fillStyle="#fff";
|
ctx.fillStyle="#fff";
|
||||||
ctx.beginPath();ctx.arc(bm.x1,bm.y1+pR/2,pR/3,0,TAU);ctx.fill(); // 半圆中间白圆,直径=内芯宽
|
ctx.beginPath();ctx.arc(bm.x1,bm.y1+pR/3,pR/3,0,Math.PI,true);ctx.fill(); // 上半圆里的白半圆,顶部=炮口,和激光内芯等宽
|
||||||
ctx.fillRect(bm.x1-pR/3,bm.y1+pR,pR*2/3,bm.y2-(bm.y1+pR));} // 主矩形内芯
|
ctx.fillRect(bm.x1-pR/3,bm.y1+pR/3,pR*2/3,bm.y2-(bm.y1+pR/3));} // 主矩形内芯,从白半圆底部开始
|
||||||
else{ctx.strokeStyle=bm.col;ctx.lineWidth=bm.w;
|
else{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);ctx.lineTo(bm.x2,bm.y2);ctx.stroke();
|
||||||
ctx.strokeStyle="#fff";ctx.lineWidth=Math.max(1,bm.w/3);
|
ctx.strokeStyle="#fff";ctx.lineWidth=Math.max(1,bm.w/3);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user