Skip to content

rq.SpriteMotion ​

since 1.10.0

The values Sprite:to moves to, and how.

Fields ​

NameTypeDescription
x (optional)numberLeft edge to move to.
y (optional)numberTop edge to move to.
w (optional)numberWidth to move to.
h (optional)numberHeight to move to.
scale (optional)numberScale to move to, both ways.
scale_x (optional)numberHorizontal scale to move to.
scale_y (optional)numberVertical scale to move to.
rotate (optional)numberTurn to move to, in degrees.
alpha (optional)integerOpacity to move to.
tint (optional){r: integer, g: integer, b: integer}Tint to move to.
add (optional){r: integer, g: integer, b: integer}Added color to move to.
ms (optional)numberHow long, in ms. Default 0, a jump.
delay (optional)numberMs before it starts. Default 0.
ease (optional)"linear"|"in"|"out"|"in_out""in" starts slow, "out" ends slow. Default "linear".
on_end (optional)fun(s: rq.Sprite )Runs once a frame has drawn the last values; it may call to again for the next step.

Used by ​

rq.Sprite:to