Extends Easing

Easing.Bounce

easing: Easing.Bounce {}

Easing.Bounce is a dynamic easing curve. Animations using a bounce are not subject to the fixed duration set on the animation. Instead, the animation is physically simulated and will take a different amount of time depending on the bounce parameters and the range of the animating value. This makes animations appear more physically realistic.

property Float gravity: 5

property Float elasticity: 0.5

The gravity and elasticity parameters control the bounce's behavior.

Gravity describes how "strong" the pull towards the destination is. Higher gravity values result in a faster bounce.

The elasticity controls how much energy the animation loses on each bounce. A value of 1 means that the bounce loses no energy, and will bounce forever. A value of 0 means that the bounce loses all its energy and will not bounce at all.