Phaser API Documentation

  Version: 

Member of: Phaser.Math

<static> CatmullRom(t, p0, p1, p2, p3)

Description:

Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.

Parameters:

name type description
t number

The amount to interpolate by.

p0 number

The first control point.

p1 number

The second control point.

p2 number

The third control point.

p3 number

The fourth control point.

Returns:
Description:

The Catmull-Rom value.

Type:
  • number
Examples:
Since: 3.0.0
Source: src/math/CatmullRom.js (Line 7)