Sprite#

Back To Entity Components

This component renders a sprite image at an entity's position and controls how it appears visually.

Public Methods#

Method Description
setImage Updates the image
setInterpolation Sets the image interpolation setting
setOpacity Sets the image opacity
setWidth Sets the width and computes the height based on the aspect ratio
setHeight Sets the height and computes the width based on the aspect ratio
setSize Sets the width and height, not respecting the aspect ratio
setOffset Sets the center offset of the sprite
setScale Sets the render scale of this sprite
flipX Sets whether the sprite is flipped horizontally
flipY Sets whether the sprite is flipped vertically