Open anzgar01 opened 3 years ago
//draw grid
function drawGrid (context, gridSize, color) { context.lineWidth = 0.5; context.strokeStyle = color || "#CCC";
// Draw vertical grid lines
for (var x = 0; x <= context.canvas.width; x += gridSize) {
context.beginPath();
context.moveTo(x, 0);
context.lineTo(x, context.canvas.height);
context.stroke();
}
// Draw horizontal grid lines
for (var y = 0; y <= context.canvas.height; y += gridSize) {
context.beginPath();
context.moveTo(0, y);
context.lineTo(context.canvas.width, y);
context.stroke();
}
}
Hi there, can anyone point me in the right direction what to do if I wanted to draw the celestial grid as well?
Thanks a lot!