fix: adjust RPM arc center to keep left side on screen

This commit is contained in:
2026-07-25 16:55:50 +08:00
parent 59623d7cf5
commit fb0e83d2df
+2 -2
View File
@@ -68,8 +68,8 @@ const M={aspect_ratio:"16:9",render_mode:"contain"};let GAME_ID='';
const ctx=canvas.getContext('2d'); const ctx=canvas.getContext('2d');
let ws,rt,lR=-1,lG=-999,ldP=-1; let ws,rt,lR=-1,lG=-999,ldP=-1;
const N=66, Na=Math.round(N*.55), Nl=N-Na; const N=66, Na=Math.round(N*.5), Nl=N-Na;
const Ca=200, Cb=390, Cr=320, As=180, Ae=270; // arc: center(200,390), r=320, from 180°→270° const Ca=320, Cb=420, Cr=280, As=180, Ae=270; // arc: center(200,390), r=320, from 180°→270°
function d2r(d){return d*Math.PI/180} function d2r(d){return d*Math.PI/180}
function pr(r){if(!r||r==='auto')return null;const p=r.split(':');if(p.length===2)return +p[0]/+p[1]} function pr(r){if(!r||r==='auto')return null;const p=r.split(':');if(p.length===2)return +p[0]/+p[1]}