drawEarth method
DrawEarth
Draws the earth
Draws the earth based on it's calculated position Shadow is drawn as a overlay, opposite the sun's position
Implementation
void drawEarth(
Canvas canvas, Size size, SpaceViewModel viewModel, SpaceConfig config) {
_imageMap["earth"]?.drawRotatedSquare(
canvas: canvas,
size: viewModel.earthSize,
offset: viewModel.earthOffset,
rotation: viewModel.earthRotation,
paint: standardPaint);
_imageMap["shadow"]?.drawRotatedSquare(
canvas: canvas,
size: viewModel.earthSize,
offset: viewModel.earthOffset,
rotation: viewModel.sunRotation,
paint: standardPaint);
}