SpriteCompOpt
:Options for the sprite component.
group
Component Types
frame
?: numberIf the sprite is loaded with multiple frames, or sliced, use the frame option to specify which frame to draw.
tiled
?: booleanIf provided width and height, don't stretch but instead render tiled.
width
?: numberStretch sprite to a certain width.
height
?: numberStretch sprite to a certain height.
anim
?: stringPlay an animation on start.
animSpeed
?: numberSpeed multiplier for all animations (for the actual fps for an anim use .play("anim", { speed: 10 })).
flipX
?: booleanFlip texture horizontally.
flipY
?: booleanFlip texture vertically.
quad
?: QuadThe rectangular sub-area of the texture to render, default to full texture quad(0, 0, 1, 1)
.
fill
?: booleanIf fill the sprite (useful if you only want to render outline with outline() component).