style: triple gauge tick thickness (54x18px)
This commit is contained in:
@@ -101,7 +101,7 @@ const M={aspect_ratio:"16:9",render_mode:"contain"};let GAME_ID='';
|
||||
max=max||8000;cur=cur||0;sz();
|
||||
const W=canvas.width/devicePixelRatio,H=canvas.height/devicePixelRatio;
|
||||
ctx.clearRect(0,0,W,H);
|
||||
const tw=Math.max(18,W/32),th=Math.max(6,H/70),gap=Math.max(1,tw*.12);
|
||||
const tw=Math.max(54,W/11),th=Math.max(18,H/24),gap=Math.max(2,tw*.06);
|
||||
|
||||
// bg ticks
|
||||
for(let i=0;i<N;i++){const p=tp(i);ctx.save();ctx.translate(p.x,p.y);ctx.rotate(p.r);ctx.fillStyle='rgba(255,255,255,.04)';ctx.fillRect(-tw/2,-th/2,tw-gap,th);ctx.restore()}
|
||||
@@ -113,7 +113,7 @@ const M={aspect_ratio:"16:9",render_mode:"contain"};let GAME_ID='';
|
||||
// scale nums - larger
|
||||
const sx=Ca/640*W,sy=Cb/480*H,sr=Cr/640*W;
|
||||
ctx.fillStyle='rgba(255,255,255,.2)';ctx.font=`${Math.max(12,W/42)|0}px sans-serif`;ctx.textAlign='center';
|
||||
for(let r=0;r<=max;r+=2000){const p=r/max,a=d2r(As+(Ae-As)*p);ctx.fillText(Math.round(r/1000),sx+(sr-42)*Math.cos(a),sy+(sr-42)*Math.sin(a)+4)}
|
||||
for(let r=0;r<=max;r+=2000){const p=r/max,a=d2r(As+(Ae-As)*p);ctx.fillText(Math.round(r/1000),sx+(sr-54)*Math.cos(a),sy+(sr-54)*Math.sin(a)+4)}
|
||||
|
||||
// RPM number - big, high up
|
||||
ctx.fillStyle='#fff';ctx.font=`200 ${Math.max(48,W/12)|0}px sans-serif`;ctx.textAlign='center';
|
||||
|
||||
Reference in New Issue
Block a user