Types/RotatedAnimation: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(added hr_version)
(Removed old prototype docs)
Tag: Replaced
 
(23 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Mandatory properties ==
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/RotatedAnimation.html https://lua-api.factorio.com/latest/types/RotatedAnimation.html]


=== width ===
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
'''Type''': [[Types/SpriteSizeType]]
 
Width of one frame in pixels, from 0-8192.
 
=== height ===
'''Type''': [[Types/SpriteSizeType]]
 
Height of one frame in pixels, from 0-8192.
 
=== frame_count ===
'''Type''': [[Types/uint32]]
 
=== direction_count ===
'''Type''': [[Types/uint32]]
 
== Optional properties ==
 
=== layers ===
'''Type''': [[Types/table]] of [[Types/RotatedAnimation]]
 
If this property is present, all RotatedAnimation definitions have to be placed as entries in the array, and they will all be loaded from there. Each item (RotatedAnimation definition) in the array may also have the <code>layers</code> property.
 
If this property is present, all other properties are ignored and the mandatory properties do not have to be defined.
 
=== hr_version ===
'''Type''': [[Types/RotatedAnimation]]
 
If this property exists and high resolution sprites are turned on, its contents are used to load the RotatedAnimation.
 
=== filename ===
'''Type''': [[Types/FileName]]
 
'''Default''': ""
 
=== priority ===
'''Type''': [[Types/string]]
 
'''Default''': "medium"
 
Possible values:
* "extra-high-no-scale"
* "extra-high"
* "high"
* "medium"
* "low"
* "very-low"
 
=== flags ===
'''Type''': [[Types/SpriteFlags]]
 
=== x ===
'''Type''': [[Types/SpriteSizeType]]
 
'''Default''': 0
 
Horizontal position of the animation in the source file in pixels.
 
=== y ===
'''Type''': [[Types/SpriteSizeType]]
 
'''Default''': 0
 
Vertical position of the animation in the source file in pixels.
 
=== shift ===
'''Type''': [[Types/vector]]
 
'''Default''': {0, 0}
 
=== scale ===
'''Type''': [[Types/double]]
 
'''Default''': 1
 
Values different than 1 specify the scale of the animation on default zoom.
Scale 2 means that the picture will be 2 times bigger on screen (and more pixelated).
 
=== draw_as_shadow ===
'''Type''': [[Types/bool]]
 
'''Default''': false
 
=== apply_runtime_tint ===
'''Type''': [[Types/bool]]
 
'''Default''': false
 
=== tint ===
'''Type''': [[Types/Color]]
 
'''Default''': {r=1, g=1, b=1, a=1} (white)
 
=== blend_mode ===
'''Type''': [[Types/string]]
 
'''Default''': "normal"
 
Possible values:
* "normal"
* "additive"
* "additive-soft"
* "multiplicative"
* "overwrite"
 
=== load_in_minimal_mode ===
'''Type''': [[Types/bool]]
 
'''Default''': false
 
=== premul_alpha ===
'''Type''': [[Types/bool]]
 
'''Default''': true
 
=== run_mode ===
'''Type''': [[Types/string]]
 
'''Default''': "forward"
 
Possible values are:
*forward
*backward
*forward-then-backward
 
=== line_length ===
'''Type''': [[Types/uint32]]
 
'''Default''': 0
 
Once the specified number of pictures is loaded, other pictures are loaded on other line.
This is to allow having longer animations in matrix, to avoid pictures with too big width.
The game engine limits the width of any input picture to 2048px, so it is compatible with most graphics cards.
 
=== animation_speed ===
'''Type''': [[Types/float]]
 
'''Default''': 1
 
Modifier of the animation playing speed, the default is 1, which means one animation frame per tick (60 fps).
The speed of playing can often vary depending on the usage (output of steam engine for example). Can't be 0.
 
=== max_advance ===
'''Type''': [[Types/float]]
 
'''Default''': MAX_FLOAT
 
=== repeat_count ===
'''Type''': [[Types/uint8]]
 
'''Default''': 1
 
=== still_frame ===
'''Type''': [[Types/uint32]]
 
'''Default''': 0
 
=== axially_symmetrical ===
'''Type''': [[Types/bool]]
 
'''Default''': false
 
If true, <code>direction_count</code> must be greater than 1.
 
=== counterclockwise ===
'''Type''': [[Types/bool]]
 
'''Default''': false
 
=== middle_orientation ===
'''Type''': [[Types/RealOrientation]]
 
'''Default''': 0.5
 
=== orientation_range ===
'''Type''': [[Types/float]]
 
'''Default''': 1
 
Automatically clamped to be between 0 and 1.
 
=== apply_projection ===
'''Type''': [[Types/bool]]
 
'''Default''': true
 
=== stripes ===

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/RotatedAnimation.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.