Skip to content

IInertiaOptions

Type interface

Represents collection of options for Sprite inertia.

Sources

IInertiaOptions is an interface: it describes a shape of data and is not imported on its own.

Properties

duration

Type number

How long should inertia animation play out.

easing

Type (value: number) => number

Easing function to be used for inertia animation.

factor

Type number

How far should object go by inertia counting from its reference point in trail and its release point. I.e. if there are 100 pixels between reference point and drop point, then it will go another 100 x inertiaFactor pixels by inertia.

time

Type number

When calculating inertia direction and speed, we look back at the log of coordinates. This setting holds number of milliseconds to check back to.