Phaser.Math.Easing.Sine
Scope: static
Source: src/math/easing/sine/index.js#L7
Static functions
In
<static> In(v)
Description:
Applies a sinusoidal ease-in curve to the given value. The motion starts slowly and accelerates toward the end, following the shape of a sine wave. This produces a gentler start than most other ease-in functions, making it well suited for subtle animations such as fading in UI elements or smoothly beginning a camera pan.
The input value v should be in the range 0 to 1, where 0 represents the start and 1 the end of the tween. Values outside this range are not clamped.
Parameters:
| name | type | optional | description |
|---|---|---|---|
| v | number | No | The value to be eased, typically in the range 0 to 1. |
Returns: number - The eased value, in the range 0 to 1.
Source: src/math/easing/sine/In.js#L7
Since: 3.0.0
InOut
<static> InOut(v)
Description:
Applies a sinusoidal ease-in/out to the given value. The motion starts slowly, accelerates through the midpoint, and decelerates back to a stop at the end, producing a smooth S-curve transition. This is useful for animations that need a natural, symmetrical feel with gentle starts and endings.
Parameters:
| name | type | optional | description |
|---|---|---|---|
| v | number | No | The value to be eased, in the range [0, 1]. |
Returns: number - The eased value, in the range [0, 1].
Source: src/math/easing/sine/InOut.js#L7
Since: 3.0.0
Out
<static> Out(v)
Description:
Sinusoidal ease-out. Begins moving quickly and decelerates to a gentle stop, following the curve of a sine wave. Commonly used for smooth deceleration in animations and Tweens.
Parameters:
| name | type | optional | description |
|---|---|---|---|
| v | number | No | The value to be eased, in the range [0, 1]. |
Returns: number - The eased value, in the range [0, 1].
Source: src/math/easing/sine/Out.js#L7
Since: 3.0.0