Skip to main content
Version: Phaser v4.0.0

Phaser.Math.Easing

Scope: static

Source: src/math/easing/index.js#L7

Static functions

Static functions

Linear

<static> Linear(v)

Description:

Linear easing (no variation).

Parameters:

nametypeoptionaldescription
vnumberNoThe value to be eased.

Returns: number - The eased value.

Source: src/math/easing/linear/Linear.js#L7
Since: 3.0.0


Stepped

<static> Stepped(v, [steps])

Description:

A stepped easing function that quantizes the input value into a discrete number of evenly-spaced steps, creating a staircase progression rather than a smooth curve. The output jumps instantly between step values instead of interpolating, which is useful for frame-by-frame animations, grid-snapped movement, or any effect that should advance in distinct increments.

Parameters:

nametypeoptionaldefaultdescription
vnumberNoThe value to be eased.
stepsnumberYes1The number of steps in the ease.

Returns: number - The eased value.

Source: src/math/easing/stepped/Stepped.js#L7
Since: 3.0.0