57 lines
2.9 KiB
Dart
57 lines
2.9 KiB
Dart
import 'dart:io';
|
|
import 'package:image/image.dart' as img;
|
|
|
|
void main() {
|
|
Directory('assets/images/motorcycles').createSync(recursive: true);
|
|
|
|
final image = img.Image(width: 800, height: 450);
|
|
img.fill(image, color: img.ColorRgba8(12, 16, 24, 255));
|
|
|
|
// Studio lighting grid
|
|
for (int y = 0; y < 450; y += 25) {
|
|
img.drawLine(image, x1: 0, y1: y, x2: 800, y2: y, color: img.ColorRgba8(20, 30, 45, 120));
|
|
}
|
|
for (int x = 0; x < 800; x += 25) {
|
|
img.drawLine(image, x1: x, y1: 0, x2: x, y2: 450, color: img.ColorRgba8(20, 30, 45, 120));
|
|
}
|
|
|
|
// Underglow pedestal
|
|
img.drawCircle(image, x: 400, y: 360, radius: 240, color: img.ColorRgba8(0, 229, 255, 60));
|
|
|
|
// Rear Wheel
|
|
img.drawCircle(image, x: 230, y: 310, radius: 70, color: img.ColorRgba8(60, 65, 75, 255));
|
|
img.drawCircle(image, x: 230, y: 310, radius: 55, color: img.ColorRgba8(0, 229, 255, 180));
|
|
img.drawCircle(image, x: 230, y: 310, radius: 25, color: img.ColorRgba8(120, 130, 140, 255));
|
|
|
|
// Front Wheel
|
|
img.drawCircle(image, x: 590, y: 310, radius: 70, color: img.ColorRgba8(60, 65, 75, 255));
|
|
img.drawCircle(image, x: 590, y: 310, radius: 55, color: img.ColorRgba8(0, 229, 255, 180));
|
|
img.drawCircle(image, x: 590, y: 310, radius: 25, color: img.ColorRgba8(120, 130, 140, 255));
|
|
|
|
// Deltabox Frame & Engine Block
|
|
img.fillRect(image, x1: 340, y1: 240, x2: 480, y2: 320, color: img.ColorRgba8(40, 44, 52, 255));
|
|
img.drawLine(image, x1: 300, y1: 220, x2: 470, y2: 200, color: img.ColorRgba8(160, 170, 180, 255), thickness: 6);
|
|
img.drawLine(image, x1: 470, y1: 200, x2: 500, y2: 260, color: img.ColorRgba8(160, 170, 180, 255), thickness: 6);
|
|
img.drawLine(image, x1: 500, y1: 260, x2: 360, y2: 300, color: img.ColorRgba8(160, 170, 180, 255), thickness: 6);
|
|
img.drawLine(image, x1: 230, y1: 310, x2: 360, y2: 300, color: img.ColorRgba8(100, 105, 115, 255), thickness: 8);
|
|
|
|
// Yamaha Blue Bodywork / Tank / Fairing
|
|
img.fillRect(image, x1: 330, y1: 180, x2: 450, y2: 225, color: img.ColorRgba8(18, 70, 180, 255));
|
|
img.fillRect(image, x1: 450, y1: 155, x2: 570, y2: 235, color: img.ColorRgba8(18, 70, 180, 255));
|
|
// Tail Section
|
|
img.fillRect(image, x1: 220, y1: 185, x2: 330, y2: 215, color: img.ColorRgba8(18, 70, 180, 255));
|
|
|
|
// Front Forks
|
|
img.drawLine(image, x1: 530, y1: 150, x2: 590, y2: 310, color: img.ColorRgba8(220, 190, 60, 255), thickness: 7);
|
|
// High-Mount Exhaust
|
|
img.drawLine(image, x1: 310, y1: 310, x2: 440, y2: 250, color: img.ColorRgba8(200, 205, 215, 255), thickness: 8);
|
|
|
|
// Dual Headlights
|
|
img.drawCircle(image, x: 570, y: 175, radius: 8, color: img.ColorRgba8(255, 255, 220, 255));
|
|
img.drawCircle(image, x: 550, y: 185, radius: 8, color: img.ColorRgba8(255, 255, 220, 255));
|
|
|
|
final pngBytes = img.encodePng(image);
|
|
File('assets/images/motorcycles/yamaha_yzf_r6_2001.png').writeAsBytesSync(pngBytes);
|
|
stdout.writeln('Successfully created assets/images/motorcycles/yamaha_yzf_r6_2001.png');
|
|
}
|