Jump to content

Template:Animation/doc

From Creopedia

This is the documentation page for Template:Animation.

This template displays an animation using multiple images as frames.

The template uses CSS to shuffle between images like a film strip.

Generally, it is more preferrable to use animated WebP or GIF instead.

Usage

Basic

{{Animation
|fps=4
|size=80px
|acerth_down_walk_0 - evocreo2.png
|acerth_down_walk_1 - evocreo2.png
}}

Changing container size

{{Animation
|fps=4
|size=80px
|width=40px
|height=40px
|acerth_down_walk_0 - evocreo2.png
|acerth_down_walk_1 - evocreo2.png
}}

Offseting frame position

{{Animation
|fps=4
|size=80px
|width=40px
|height=40px
|offsetTop = -4px
|offsetLeft = -1px
|offsetRight = -2px
|offsetBottom = 1px
|acerth_down_walk_0 - evocreo2.png
|acerth_down_walk_1 - evocreo2.png
}}

TemplateData

Displays an animation using multiple images as frames

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Frame 11

Image for the first frame

Example
acerth_down_walk_0 - evocreo2.png
Filerequired
Frame 22

Image for the second frame

Example
acerth_down_walk_1 - evocreo2.png
Filerequired
Sizesize

Size of the image

Default
80px
Example
80px
Stringoptional
FPSfps

FPS of the animation

Default
12
Example
12
Numberoptional
Container widthwidth

The width of the container containing the frame. This is useful for clipping whitespace from the animation. Default to the size parameter.

Example
40px
Stringoptional
Container heightheight

The height of the container containing the frame. This is useful for clipping whitespace from the animation. Default to the size parameter.

Example
40px
Stringoptional
Top offsetoffsetTop

Top position offset for the frame

Default
0
Example
-2px
Stringoptional
Bottom offsetoffsetBottom

Bottom position offset for the frame

Default
0
Example
-2px
Stringoptional
Left offsetoffsetLeft

Left position offset for the frame

Default
0
Example
-2px
Stringoptional
Right offsetoffsetRight

Right position offset for the frame

Default
0
Example
-2px
Stringoptional