Inherits from AnimationParameters « SpriteParameters |
layers optional | :: array[Animation] | If this property is present, all Animation definitions have to be placed as entries in the array, and they will all be loaded from there. [...] |
If this property is present, all Animation definitions have to be placed as entries in the array, and they will all be loaded from there. [...] | ||
hr_version optional | :: Animation | Only loaded if |
Only loaded if | ||
stripes optional | :: array[Stripe] | Only loaded if |
Only loaded if |
run_mode optional | :: "forward" or "backward" or "forward-then-backward" | |
frame_count optional | :: uint32 | Can't be |
Can't be | ||
line_length optional | :: uint32 | Specifies how many pictures are on each horizontal line in the image file. [...] |
Specifies how many pictures are on each horizontal line in the image file. [...] | ||
animation_speed optional | :: float | Modifier of the animation playing speed, the default of |
Modifier of the animation playing speed, the default of | ||
max_advance optional | :: float | Maximum amount of frames the animation can move forward in one update. [...] |
Maximum amount of frames the animation can move forward in one update. [...] | ||
repeat_count optional | :: uint8 | How many times to repeat the animation to complete an animation cycle. [...] |
How many times to repeat the animation to complete an animation cycle. [...] | ||
dice optional | :: uint8 | Number of slices this is sliced into when using the "optimized atlas packing" option. [...] |
Number of slices this is sliced into when using the "optimized atlas packing" option. [...] | ||
dice_x optional | :: uint8 | Same as |
Same as | ||
dice_y optional | :: uint8 | Same as |
Same as | ||
frame_sequence optional | :: AnimationFrameSequence |
filename[overridden] | :: FileName | The path to the sprite file to use. |
The path to the sprite file to use. | ||
priority optional | :: SpritePriority | |
flags optional | :: SpriteFlags | |
size optional | :: SpriteSizeType or {SpriteSizeType, SpriteSizeType} | The width and height of the sprite. [...] |
The width and height of the sprite. [...] | ||
width optional | :: SpriteSizeType | Mandatory if |
Mandatory if | ||
height optional | :: SpriteSizeType | Mandatory if |
Mandatory if | ||
x optional | :: SpriteSizeType | Horizontal position of the sprite in the source file in pixels. |
Horizontal position of the sprite in the source file in pixels. | ||
y optional | :: SpriteSizeType | Vertical position of the sprite in the source file in pixels. |
Vertical position of the sprite in the source file in pixels. | ||
position optional | :: {SpriteSizeType, SpriteSizeType} | Loaded only when |
Loaded only when | ||
shift optional | :: Vector | The shift in tiles. [...] |
The shift in tiles. [...] | ||
scale optional | :: double | Values other than |
Values other than | ||
draw_as_shadow optional | :: bool | Only one of |
Only one of | ||
draw_as_glow optional | :: bool | Only one of |
Only one of | ||
draw_as_light optional | :: bool | Only one of |
Only one of | ||
mipmap_count optional | :: uint8 | Only loaded if this is an icon, that is it has the flag |
Only loaded if this is an icon, that is it has the flag | ||
apply_runtime_tint optional | :: bool | |
tint optional | :: Color | |
blend_mode optional | :: BlendMode | |
load_in_minimal_mode optional | :: bool | Minimal mode is entered when mod loading fails. [...] |
Minimal mode is entered when mod loading fails. [...] | ||
premul_alpha optional | :: bool | Whether alpha should be pre-multiplied. |
Whether alpha should be pre-multiplied. | ||
generate_sdf optional | :: bool | This property is only used by sprites used in UtilitySprites that have the |
This property is only used by sprites used in UtilitySprites that have the |
-- simple animation
horizontal_animation =
{
filename = "__base__/graphics/entity/steam-engine/steam-engine-H.png",
width = 176,
height = 128,
frame_count = 32,
line_length = 8,
shift = {0.03125, -0.15625}
}
-- animation with hr version
horizontal_animation =
{
filename = "__base__/graphics/entity/steam-engine/steam-engine-H.png",
width = 176,
height = 128,
frame_count = 32,
line_length = 8,
shift = {0.03125, -0.15625},
hr_version =
{
filename = "__base__/graphics/entity/steam-engine/hr-steam-engine-H.png",
width = 352,
height = 257,
frame_count = 32,
line_length = 8,
shift = {0.03125, -0.1484375},
scale = 0.5
}
}
-- animation with layers
horizontal_animation =
{
layers =
{
{
filename = "__base__/graphics/entity/steam-engine/steam-engine-H.png",
width = 176,
height = 128,
frame_count = 32,
line_length = 8,
shift = {0.03125, -0.15625}
},
{
filename = "__base__/graphics/entity/steam-engine/steam-engine-H-shadow.png",
width = 254,
height = 80,
frame_count = 32,
line_length = 8,
draw_as_shadow = true,
shift = {1.5, 0.75}
}
}
}