Struct · Ara
Sprite
A batched sprite with optional normal-mapped 2D illumination.
public struct Sprite : IComponent<Sprite>Properties
TypeIndex
public static uint TypeIndex { get; }Stable engine component index.
Fields
Atlas
public string Atlas;Atlas asset reference, resolved to a resident texture at extraction.
Default: null.
Region
public string Region;Stable region name in the atlas.
Default: "".
NormalAtlas
public string NormalAtlas;Optional normal atlas, using the same rectangles.
Default: null.
Size
public Vector2 Size;Desired world size in metres; zero selects source size / pixels per metre.
Default: [0,0].
Tint
public Vector4 Tint;Linear, straight-alpha tint.
Default: [1,1,1,1].
SortingLayer
public int SortingLayer;Painter's sorting layer; lower draws first.
Default: 0.
Order
public int Order;Painter's order within a layer; stable identity breaks ties.
Default: 0.
FlipX
public bool FlipX;Mirror horizontally about the pivot.
Default: false.
FlipY
public bool FlipY;Mirror vertically about the pivot.
Default: false.
NineSlice
public bool NineSlice;Apply the region's nine-slice borders when resizing.
Default: false.
Lit
public bool Lit;Opt into normal-mapped local lights and geometric shadows.
Default: false.
Parallax
public Vector2 Parallax;Parallax factor; one follows the world, zero follows the camera.
Default: [1,1].
Methods
Access
public static ref Sprite Access(Entity entity, bool write);No description yet.
Insert
public static void Insert(in Commands commands, Entity entity, in Sprite value);No description yet.
Contains
public static bool Contains(Entity entity);No description yet.