Creates the component.
Optionalconfig: SpriteConfig
The component's configuration. Fields marked with DefineField take their values from
config, or its decorated fields keep their initial values.
OptionalactorThe actor that has this component. It is undefined until the component is
added to an actor.
Blending mode for rendering
Color tint applied to the sprite
OptionalcurrentCurrent frame to render
Whether the sprite is disabled and should not render
ReadonlyfitHow the texture should fit within the sprite bounds
Whether to flip the sprite horizontally
Whether to flip the sprite vertically
Height of the sprite in pixels
Opacity from 0 (transparent) to 1 (opaque)
Number of frames in the sprite sheet
Sorting layer name for rendering order
Center point for sorting calculations
Path to the texture image file
Texture sampling offset in pixels. Only applies to fit: 'repeat'.
With flipX/flipY the tile is mirrored, so a positive offset scrolls in
the mirrored direction.
Width of the sprite in pixels
Draws an image, a frame of a sprite sheet, or a tiled image.
See
Sprite