Skip to content
On this page

Sprite

Creates a Sprite

Sprites are the base for all textured objects that are rendered to the screen

API

Sprite Attributes

NameTypeDefaultDescription
blend-modeBLEND_MODES.NORMALThe blend mode to be applied to the sprite.
texturestring objectundefinedThe texture to use on the Sprite.
anchor

number array object

0The anchor sets the origin point of the text.
anchor-xnumber0The x anchor sets the origin point of the text.
anchor-ynumber0The y anchor sets the origin point of the text.

more props in Container Props and PIXI.Sprite

Sprite Events

NameTypeDescription
renderfunctioncustom render function

more events in Container Events