fix: remove lineJoin round, skip progress for very low RPM to prevent artifacts

This commit is contained in:
2026-07-25 17:27:20 +08:00
parent 2aabd54d50
commit b9b2d51601
+3 -3
View File
@@ -98,12 +98,12 @@ function draw(cur,max){
ctx.arc(sx,sy,sr,d2r(As),d2r(Ae),false); ctx.arc(sx,sy,sr,d2r(As),d2r(Ae),false);
ctx.lineTo(lx,ey); ctx.lineTo(lx,ey);
ctx.strokeStyle='rgba(255,255,255,.04)'; ctx.strokeStyle='rgba(255,255,255,.04)';
ctx.lineWidth=gw;ctx.lineJoin='round'; ctx.lineWidth=gw;
ctx.stroke(); ctx.stroke();
// progress stroke // progress stroke
const pc=Math.min(cur/max,1); const pc=Math.min(cur/max,1);
if(pc>0){ if(pc>.005){
const pd=pc*totalLen; const pd=pc*totalLen;
ctx.beginPath(); ctx.beginPath();
if(pd<=arcLen){ if(pd<=arcLen){
@@ -113,7 +113,7 @@ function draw(cur,max){
ctx.lineTo(ex+(pd-arcLen)/lineLen*(lx-ex),ey); ctx.lineTo(ex+(pd-arcLen)/lineLen*(lx-ex),ey);
} }
ctx.strokeStyle=cur>=rl?'rgba(255,50,35,.95)':'rgba(255,255,255,.85)'; ctx.strokeStyle=cur>=rl?'rgba(255,50,35,.95)':'rgba(255,255,255,.85)';
ctx.lineWidth=gw;ctx.lineJoin='round'; ctx.lineWidth=gw;
ctx.stroke(); ctx.stroke();
} }