Home

RotatedSprite

Specifies series of sprites used to visualize different rotations of the object.

Type

struct

Properties

layers

If this property is present, all RotatedSprite definitions have to be placed as entries in the array, and they will all be loaded from there. layers may not be an empty table. Each definition in the array may also have the layers property.

If this property is present, all other properties, including those inherited from SpriteParameters, are ignored.

direction_count

Only loaded, and mandatory if layers is not defined.

Count of direction (frames) specified.

filename

Only loaded if layers is not defined.

The path to the sprite file to use.

filenames

Only loaded, and mandatory if both layers and filename are not defined.

lines_per_file

Only loaded if layers is not defined. Mandatory if filenames is defined.

dice

Only loaded if layers is not defined.

Number of slices this is sliced into when using the "optimized atlas packing" option. If you are a modder, you can just ignore this property. Example: If this is 4, the sprite will be sliced into a 4x4 grid.

dice_x

Only loaded if layers is not defined.

Same as dice above, but this specifies only how many slices there are on the x axis.

dice_y

Only loaded if layers is not defined.

Same as dice above, but this specifies only how many slices there are on the y axis.

generate_sdf

Only loaded if layers is not defined.

Unused.

back_equals_front

Only loaded if layers is not defined.

apply_projection

Only loaded if layers is not defined.

Used to fix the inconsistency of direction of the entity in 3d when rendered and direction on the screen (where the 45 degree angle for projection is used).

counterclockwise

Only loaded if layers is not defined.

Set to true to indicate sprites in the spritesheet are in counterclockwise order.

line_length

Only loaded if layers is not defined.

Once the specified number of pictures is loaded, other pictures are loaded on other line. This is to allow having more sprites in matrix, to input files with too high width. The game engine limits the width of any input files to 8192px, so it is compatible with most graphics cards. 0 means that all the pictures are in one horizontal line.

allow_low_quality_rotation

Only loaded if layers is not defined.

frames

A list of overrides and customizations for each specific frame within the rotated sprite. This can be used to adjust each individual frame's width, height, and other properties. If this property is present, then it must contain at least as many RotatedSpriteFrame as there are sprites in this RotatedSprite.