Rotate grid numbers.

This commit is contained in:
yukirij 2024-09-05 23:42:43 -07:00
parent 5d0315482f
commit 010713f503

View File

@ -599,16 +599,26 @@ const INTERFACE = {
ctx.fillText(letters[i + 5], x, y); ctx.fillText(letters[i + 5], x, y);
} }
ctx.textAlign = "right"; ctx.textAlign = "center";
for(let i = 0; i < 5; ++i) { for(let i = 0; i < 5; ++i) {
let x = basis_x - (0.85 * radius); let x = basis_x - (1.15 * radius);
let y = basis_y - (gui_scale * (0.9 + (2 * i))); let y = basis_y - (gui_scale * (0.75 + (2 * i)));
ctx.fillText(numbers[i], x, y);
ctx.save();
ctx.translate(x, y);
ctx.rotate(-Math.PI / 3);
ctx.fillText(numbers[i], 0, 0);
ctx.restore();
} }
for(let i = 0; i < 4; ++i) { for(let i = 0; i < 4; ++i) {
let x = basis_x + (1.5 * radius * (i + 0.45)); let x = basis_x + (1.5 * radius * (i + 0.25));
let y = basis_y - (gui_scale * (9.9 + i)); let y = basis_y - (gui_scale * (9.75 + i));
ctx.fillText(numbers[i + 5], x, y);
ctx.save();
ctx.translate(x, y);
ctx.rotate(-Math.PI / 3);
ctx.fillText(numbers[i + 5], 0, 0);
ctx.restore();
} }