`Map with animation
UIS Animation is a part of UIS, any qustions about UIS, refer to the UIS Manual.
According to the UIS Manual, animation is a series of descriptions of motions defined IN ADVANCE, which could be quoted in sprites.
A description of motion should be started with:(colon), each kind of motion status should be descripted within one single line, started from the second line.Sprites quote the descriptions of motions with 'motion'. For instance
In which there is only one single line of motion status in one motion group, an abbreviated method is allowed to write in the place of motion property, only need a !(exclamation mark) behind 'motion='. For instance
`The length of motion group's name may not exceed 40 characters.
`One motion per line. There's no need of semicolon to end the line.
`Only English characters and numbers allowed.
UIS supports group definition of motion group's name. For instance:
Square bracket after sprite's name after a dash means there are three sprites defined together: test-1, test-2 and test-3. They have same properties.
Different sprites could share one motion description, group definition is not necessary in most situations.
Each line of motion definition contains at least two properties: 'name' and 'time', different properties are separated by ','(comma). First property should be 'name', other properties could be placed in any order.
Properties are composed of property name and property value, connected by '='(equal sign), more than one property values should be written in '()' (braparentheses). For instance:
UIS support follow property name:
Four situations determined by property name
`One single number
`Six-digit color number starting with '#'(pound)
Detailed situations are listed below.
Specify the motion type, the types are listed below.
|type||abbreviation||function||arguments needed for from/to|
|move||m||to move object||2|
|scale||s||to scale the subject||1 or 2 (if you want to specify x and y direction differently)|
|size||to change the size of the object||2|
|skew||to do a affine transformation||2|
|width||w||to change the width of the object||1|
|height||h||to change the height of the object||1|
|movex||mx||to move the object by x axis||1|
|movey||my||to move the object by y axis||1|
|scalex||sx||to scale the object by x axis||1|
|scaley||sy||to scale the object by y axis||1|
|skewx||to do a affine transformation by x axis||1|
|skewy||to do a affine transformation by y axis||1|
|rotate||r||to rotate the object||1|
|fade||f||to change the transparent of the object||1, ranged from 1 to 100|
|tint||to change the color of the object||RGB Value, 6 digits|
|show||to show the object||0|
|hide||to hide the object||0|
The difference between time and atime is that the atime follows the music.
That means, if the music was paused, the animation was also paused. But if you use time, then the object could move freely.
The animation in the chart was preferred atime rather than time.
Time/atime supports multiple grammars listed below:
That equals to it starts from 0, ends at A.
That equals to it starts from A, ends at B.
That equals to it starts from A, ends at A+B.
Example for each grammar:
1). atime = 1000
That means it starts from 0 sec, ends at 1 sec.
2). atime = (1000, 2000)
That means it starts from 1 sec, ends at 2 sec.
3). atime = (1000, +1000)
That means it starts from 1 sec, ends at 1+1 = 2 sec.
Be aware that the end timing should be greater than start timing.
trans was responsible for how you control the object move by an algorithm(a.k.a. interpolation method), you could use this website to get a proper value.
repeat controls the times the motion repeated. And it supports multiple grammars listed below:
Repeat A times.
Go back and forth A times.
Repeat A times, before each repeat wait B seconds.
Example for each grammar:
1). repeat = 10
That means the motion repeats 10 times.
2). repeat = r10
That means the motion go back and forth 10 times.
3). repeat = (10,1000)
That means the motion repeat 10 times, and for each repeat waits 1 second.