A Flutter package to generate pixel art sprites from an optional template.
| Humanoids | Robots | Spaceships |
|---|---|---|
final template = generateRandomPixelDataTemplate(
5,
5,
mirrorX: true,
mirrorY: false,
outline: true,
);
final pixelData = generateRandomPixelData(
1,
template,
).first;A set of predefined templates are available here.
// load templates from assets/templates.json
final jsonString = await rootBundle.loadString('assets/templates.json');
final templates = loadPixelTemplatesFromJson(jsonString);
final humanoidTemplate = templates[...];
final pixelData = generateRandomPixelData(9, humanoidTemplate);Created by @albemala (Twitter)
Inspired by Pixel Sprite Generator