package im.bci.nanim;

option java_outer_classname = "NanimParser";

message Frame {
    required string imageName = 1;
    required int32 duration = 2;
    required float u1 = 3;
    required float v1 = 4;
    required float u2 = 5;
    required float v2 = 6;
    extensions 1000 to max;
}

message Animation {
    required string name = 1;
    repeated Frame frames = 2;
    extensions 1000 to max;
}

enum PixelFormat {
    RGB_888 = 1;
    RGBA_8888 = 2;
}

message Image {
    required string name = 1;
    required int32 width = 2;
    required int32 height = 3;
    required PixelFormat format = 4;
    required bytes pixels = 5;
    extensions 1000 to max;
}

message Nanim {
    repeated Image images = 1;
    repeated Animation animations = 2;
    optional string author = 3;
    optional string license = 4;
    extensions 1000 to max;
};


