Skip to content

Sprite

Creates a Sprite

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

API

Sprite Attributes

NameTypeDefaultDescription
blend-mode'normal'The 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 Attributes and Sprite

Sprite Events

NameTypeDescription
effectfunctioncustom render function

more events in Container Events