Easing#

class arcade.easing.EasingData(start_period: float, cur_period: float, end_period: float, start_value: float, end_value: float, ease_function: Callable)[source]#

Bases:

Data class for holding information about easing.

reset()[source]#
cur_period: float#
ease_function: Callable#
end_period: float#
end_value: float#
start_period: float#
start_value: float#
arcade.easing.ease_angle(start_angle: float, end_angle: float, *, time=None, rate=None, ease_function: ~typing.Callable = <function linear>) EasingData | None[source]#

Set up easing for angles.

arcade.easing.ease_angle_update(easing_data: EasingData, delta_time: float) Tuple[source]#

Update angle easing.

arcade.easing.ease_in(percent: float) float[source]#

Function for quadratic ease-in easing.

arcade.easing.ease_in_back(percent: float) float[source]#

Function for ease_in easing which moves back before moving forward.

arcade.easing.ease_in_out(percent: float) float[source]#

Function for quadratic easing in and out.

arcade.easing.ease_in_out_sin(percent: float) float[source]#

Function for easing in and out using a sin wave

arcade.easing.ease_in_sin(percent: float) float[source]#

Function for ease_in easing using a sin wave

arcade.easing.ease_out(percent: float) float[source]#

Function for quadratic ease-out easing.

arcade.easing.ease_out_back(percent: float) float[source]#

Function for ease_out easing which moves back before moving forward.

arcade.easing.ease_out_bounce(percent: float) float[source]#

Function for a bouncy ease-out easing.

arcade.easing.ease_out_elastic(percent: float) float[source]#

Function for elastic ease-out easing.

arcade.easing.ease_out_sin(percent: float) float[source]#

Function for ease_out easing using a sin wave

arcade.easing.ease_position(start_position, end_position, *, time=None, rate=None, ease_function=<function linear>)[source]#

Get an easing position

arcade.easing.ease_update(easing_data: EasingData, delta_time: float) Tuple[source]#

Update easing between two values/

arcade.easing.ease_value(start_value: float, end_value: float, *, time=None, rate=None, ease_function=<function linear>)[source]#

Get an easing value

arcade.easing.easing(percent: float, easing_data: EasingData) float[source]#

Function for calculating return value for easing, given percent and easing data.

arcade.easing.linear(percent: float) float[source]#

Function for linear easing.

arcade.easing.smoothstep(percent: float) float[source]#

Function for smoothstep easing.