Files
cyper-desktop/nixos/plymouth/miku/miku.script
2026-03-27 18:11:06 +01:00

31 lines
683 B
Plaintext

# Screen dimensions
screen_width = Window.GetWidth();
screen_height = Window.GetHeight();
# Load frames
frame_count = 53;
frames = [];
for (i = 0; i < frame_count; i++) {
num = String(i);
if (i < 10) num = "000" + num;
else if (i < 100) num = "00" + num;
else num = "0" + num;
frames[i] = Image("frames/frame_" + num + ".png");
}
# Position centered
x = (screen_width - 498) / 2;
y = (screen_height - 498) / 2;
# Animation state
current_frame = 0;
fun refresh_callback() {
sprite = Sprite(frames[current_frame]);
sprite.SetX(x);
sprite.SetY(y);
current_frame = (current_frame + 1) % frame_count;
}
Plymouth.SetRefreshFunction(refresh_callback);