Anime

Anime is a feature to play layer-based animations via the anime tag.

Anime File

An anime file is a text file which describes sequences of layer transforms.

Sequence

To move the message box 100px right in a second, write the following sequence in an anime file.

# A block describes a sequence for animation.
# The name of a block can be whatever you like and it won't affect anything.
move {
    # This is a layer specifier.
    layer: msg;

    # These are time specifiers. (in second)
    start: 0.0;
    end: 1.0;

    # These are origin position specifiers. 'r0' means relative '0'.
    from-x: r0;
    from-y: r0;

    # This is an origin alpha specifier.
    from-a: 255;

    # These are final position specifiers. 'r100' means relative '100'.
    to-x: r100;
    to-y: r0;

    # This is a final alpha specifier.
    to-a: 255;
}

Layer Structure

The following is our layer structure in the bottom-to-top order.

Layer NameDescription
bgbackground
bg2second background (for seemless scrolling)
efb1effect on back 1
efb2effect on back 2
efb3effect on back 3
efb4effect on back 4
chbcharacter at back center
chb-eyecharacter at back center
chb-lipcharacter at back center
chlcharacter at left
chl-eyecharacter at left
chl-lipcharacter at left
chlccharacter at left center
chlc-eyecharacter at left center
chlc-lipcharacter at left center
chrcharacter at right
chr-eyecharacter at right
chr-lipcharacter at right
chrccharacter at right center
chrc-eyecharacter at right center
chrc-lipcharacter at right center
eff1effect on front 1
eff2effect on front 2
eff3effect on front 3
eff4effect on front 4
msgboxmessage box
nameboxname box
choose1-idlechoose box 1 (idle)
choose1-hoverchoose box 1 (hover)
choose2-idlechoose box 2 (idle)
choose2-hoverchoose box 2 (hover)
choose3-idlechoose box 3 (idle)
choose3-hoverchoose box 3 (hover)
choose4-idlechoose box 4 (idle)
choose4-hoverchoose box 4 (hover)
choose5-idlechoose box 5 (idle)
choose5-hoverchoose box 5 (hover)
choose6-idlechoose box 6 (idle)
choose6-hoverchoose box 6 (hover)
choose7-idlechoose box 7 (idle)
choose7-hoverchoose box 7 (hover)
choose8-idlechoose box 8 (idle)
choose8-hoverchoose box 8 (hover)
chfcharacter face
chf-eyecharacter face
chf-lipcharacter face
clickclick animation
autoauto mode banner
skipskip mode banner
text1text layer 1
text2text layer 2
text3text layer 3
text4text layer 4
text5text layer 5
text6text layer 6
text7text layer 7
text8text layer 8
gui-button-1GUI button ID 1
gui-button-2GUI button ID 2
gui-button-3GUI button ID 3
gui-button-4GUI button ID 4
gui-button-5GUI button ID 5
gui-button-6GUI button ID 6
gui-button-7GUI button ID 7
gui-button-8GUI button ID 8
gui-button-9GUI button ID 9
gui-button-10GUI button ID 10
gui-button-11GUI button ID 11
gui-button-12GUI button ID 12
gui-button-13GUI button ID 13
gui-button-14GUI button ID 14
gui-button-15GUI button ID 15
gui-button-16GUI button ID 16
gui-button-17GUI button ID 17
gui-button-18GUI button ID 18
gui-button-19GUI button ID 19
gui-button-20GUI button ID 20
gui-button-21GUI button ID 21
gui-button-22GUI button ID 22
gui-button-23GUI button ID 23
gui-button-24GUI button ID 24
gui-button-25GUI button ID 25
gui-button-26GUI button ID 26
gui-button-27GUI button ID 27
gui-button-28GUI button ID 28
gui-button-29GUI button ID 29
gui-button-30GUI button ID 30
gui-button-31GUI button ID 31
gui-button-32GUI button ID 32

Scaling and Rotation

# Scale-up and rotate the `effect1` layer to 2.0x and 360 deg in 3 seconds.
test1 {
    layer: effect1;
 
    start: 0.0;
    end: 3.0;

    from-x: 0;
    from-y: 400;
    from-a: 255;

    to-x: 0;
    to-y: 400;
    to-a: 255;

    # Scaling and rotation origin
    center-x: 600;
    center-y: 100;

    # Scaling factors
    from-scale-x: 1.0;
    from-scale-y: 1.0;
    to-scale-x: 2.0;
    to-scale-y: 2.0;
 
    # Rotation (+ for right, - for left)
    from-rotate: 0.0;
    to-rotate: -360;
}

# Reverse.
test2 {
    layer: effect1;

    start: 3.0;
    end: 6.0;

    from-x: 0;
    from-y: 400;
    from-a: 255;

    to-x: 0;
    to-y: 400;
    to-a: 255;

    center-x: 600;
    center-y: 100;

    from-scale-x: 2.0;
    to-scale-x: 1.0;

    from-scale-y: 2.0;
    to-scale-y: 1.0;

    from-rotate: -360;
    to-rotate: 0;
}