Creates an animation resource.
Contains a collection of frames and timing information.
See also: About animations
Attribute | Description | Type |
time | Total length of animation in seconds | Float |
loop | Loop animation? | Boolean |
Remarks: time may be omitted if all frames have their respective durations set.
Setting loop to "reverse" will cause the inline sequence to play forwards and backwards repeatedly.
Child tags | Description | Count |
<Sequence> | Animation sequence | |
<Frame> | Animation frame | |
<Region> | Animation frame | |
<Meta> | Meta information |
Attribute | Description | Type |
name | [Required] Unique name for this resource | String |
hidden | Don't show in asset browser. | Boolean |
Contains a collection of frames and timing information.
Attribute | Description | Type |
name | Unique name of this animation sequence | String |
time | Total length of animation in seconds | Float |
loop | Loop animation? | Boolean |
texture | Name of (different) texture asset | String |
Remarks: time may be omitted if all frames have their respective durations set.
Setting loop to "reverse" will cause the sequence to play forwards and backwards repeatedly.
Child tags | Description | Count |
<Frame> | Animation frame | |
<Region> | Animation frame | |
Each frame defines a rectangular region of a texture (in pixels) and the duration this frame should be shown.
Attribute | Description | Type |
rect | [Required] Frame coordinates in pixels ("x, y, width, height") | Vector4 |
time | Duration of frame in seconds. | Float |
Remarks: If time is omitted, the duration of this frame will be the parent animation's time value / number of frames.
If that in turn still results in a zero value, a default of 0.1 is used.
See also: Using animations.
Attribute | Description | Type |
rect | [Required] Region coordinates in pixels ("x, y, width, height") | Vector4 |
frame-size | [Required] Size of frames within the region ("width, height") | Vector2 |
Remarks: For all <Frame> in <Region> the index-attribute overrides rect.
Child tags | Description | Count |
<Frame> | Animation frame | > 0 |
Attribute | Description | Type |
index | [Required] Frame index (zero-based) | Integer |
time | Duration of frame in seconds. | Float |
Remarks: If time is omitted, the duration of this frame will be the parent animation's time value / number of frames.
If that in turn still results in a zero value, a default of 0.1 is used.
<Animation name="My animation">
<!-- Inline sequence -->
<Frame rect="0,0,64,64" time="0.2"/>
<Frame rect="64,0,64,64" time="0.1"/>
<Frame rect="128,0,64,64" time="0.1"/>
<Frame rect="256,0,64,64" time="0.1"/>
<!-- Named sequence -->
<Sequence name="Other" loop="false">
<Frame rect="0,64,64,64" time="0.2"/>
<Frame rect="64,64,64,64" time="0.1"/>
<Sequence/>
</Animation>
Back to top