SpriteProps
NodeProps, and the frame to show.
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Properties
Section titled “Properties”
optionalx?:number
Position in the parent, stage units (y downwards).
Inherited from
Section titled “Inherited from”
optionaly?:number
Position in the parent, stage units (y downwards).
Inherited from
Section titled “Inherited from”rotation?
Section titled “rotation?”
optionalrotation?:number
Radians, clockwise.
Inherited from
Section titled “Inherited from”scale?
Section titled “scale?”
optionalscale?:number
Both scales at once.
Inherited from
Section titled “Inherited from”scaleX?
Section titled “scaleX?”
optionalscaleX?:number
Horizontal scale (negative: mirrored).
Inherited from
Section titled “Inherited from”scaleY?
Section titled “scaleY?”
optionalscaleY?:number
Vertical scale.
Inherited from
Section titled “Inherited from”alpha?
Section titled “alpha?”
optionalalpha?:number
0–1, multiplied down the tree.
Inherited from
Section titled “Inherited from”visible?
Section titled “visible?”
optionalvisible?:boolean
Hidden nodes and their children are not drawn.
Inherited from
Section titled “Inherited from”
optionaltint?:ColorLike
A colour multiplied with the pixels (white: none), as 0xRRGGBB or CSS.
Inherited from
Section titled “Inherited from”blend?
Section titled “blend?”
optionalblend?:Blend
‘add’ for glows and sparks.
Inherited from
Section titled “Inherited from”
optionalz?:number
Drawing order among siblings: higher on top (equal: order of adding).
Inherited from
Section titled “Inherited from”anchor?
Section titled “anchor?”
optionalanchor?:number| {x:number;y:number; }
Anchor, 0–1 of the size: 0 top-left, 0.5 the middle. A number sets both.
Inherited from
Section titled “Inherited from”width?
Section titled “width?”
optionalwidth?:number
Local width, stage units (sprites and shapes: stretched to it).
Inherited from
Section titled “Inherited from”height?
Section titled “height?”
optionalheight?:number
Local height, stage units.
Inherited from
Section titled “Inherited from”hitRadius?
Section titled “hitRadius?”
optionalhitRadius?:number
Hit tests use a circle of this radius (local units) around the origin instead of the rectangle.
Inherited from
Section titled “Inherited from”
optionalclip?:ClipRect|null
Clips the node and its children to this rectangle, in the node’s own units (null: no clip).
Inherited from
Section titled “Inherited from”
optionalmask?:Node|null
Shows the node and its children only where this node is opaque (null: no mask). See Node.mask.
Inherited from
Section titled “Inherited from”filters?
Section titled “filters?”
optionalfilters?:Filter[] |null
Filters, in order (null: none). See Node.filters.
Inherited from
Section titled “Inherited from”frame?
Section titled “frame?”
optionalframe?:string|Frame
An atlas frame, or the name of a loaded or baked one.
slice?
Section titled “slice?”
optionalslice?:number|Insets
Nine-slice insets in frame pixels: one number for all sides, or [top, right, bottom, left]. The corners keep their size when the sprite is resized, the edges and the middle stretch. Default: the frame’s own (an atlas’s scale9Borders), else none.