crystal.graphics

This modules contains components related to displaying graphics. It is recommended to use them in combination with a DrawSystem.

Entities can have any number of Drawable components on them. The order in which they are drawn is decided in part by the presence of a DrawOrder component, and in part by the draw order modifier settings on the drawable. The resulting order may intertwine drawables from multiple entities.

Not every love.Drawable has a corresponding Drawable component. However, you are encouraged to make your own Drawable classes when necessary. If making classes is too much ceremony, you can also overwrite the draw method on Drawable instances.

Classes

Name Description
crystal.AnimatedSprite A Drawable component that can draw animations from a Spritesheet.
crystal.Color A color, with RGBA components.
crystal.Drawable A base Component for anything that can draw on the screen.
crystal.DrawEffect A Component that can affect how Drawable components on this entity are drawn.
crystal.DrawOrder A Component that determines in what order entities are drawn.
crystal.DrawSystem A System that updates and draws Drawable components.
crystal.Sprite A Drawable component that can draw a love.Texture.
crystal.SpriteBatch A Drawable component that can draw a love.SpriteBatch.
crystal.WorldWidget A Drawable component that can draw a UI Widget.

This site uses Just the Docs, a documentation theme for Jekyll.