Skip to main content
Version: Phaser v4.0.0

Phaser.Math.Easing.Cubic

Scope: static

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

Static functions

In

<static> In(v)

Description:

Cubic ease-in. Starts slowly and accelerates sharply, following a cubic curve (v³). This produces a gradual start that builds into a fast finish, making it well suited for animations where an object should appear to gather momentum from rest.

Parameters:

nametypeoptionaldescription
vnumberNoThe value to be eased, typically in the range [0, 1].

Returns: number - The eased value, in the range [0, 1].

Source: src/math/easing/cubic/In.js#L7
Since: 3.0.0


InOut

<static> InOut(v)

Description:

Cubic ease-in/out. Produces an S-curve that accelerates from zero, reaches maximum speed at the midpoint, then decelerates back to zero. The acceleration and deceleration both follow a cubic (t³) curve, giving a stronger ease than the quadratic equivalent. Typically used to animate values that should start and end smoothly while moving briskly through the middle of the transition.

Parameters:

nametypeoptionaldescription
vnumberNoThe value to be eased, in the range [0, 1].

Returns: number - The eased value, in the range [0, 1].

Source: src/math/easing/cubic/InOut.js#L7
Since: 3.0.0


Out

<static> Out(v)

Description:

Cubic ease-out.

Parameters:

nametypeoptionaldescription
vnumberNoThe value to be eased.

Returns: number - The eased value.

Source: src/math/easing/cubic/Out.js#L7
Since: 3.0.0