Phaser API Documentation

  Version: 

Member of: Phaser.Curves.Path

cubicBezierTo(x, y, control1X, [control1Y], [control2X], [control2Y])

Description:

Creates a cubic bezier curve starting at the previous end point and ending at p3, using p1 and p2 as control points.

Parameters:

name type arguments description
x number | Phaser.Math.Vector2

The x coordinate of the end point. Or, if a Vector2, the p1 value.

y number | Phaser.Math.Vector2

The y coordinate of the end point. Or, if a Vector2, the p2 value.

control1X number | Phaser.Math.Vector2

The x coordinate of the first control point. Or, if a Vector2, the p3 value.

control1Y number <optional>

The y coordinate of the first control point. Not used if Vector2s are provided as the first 3 arguments.

control2X number <optional>

The x coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments.

control2Y number <optional>

The y coordinate of the second control point. Not used if Vector2s are provided as the first 3 arguments.

Returns:
Description:

This Path object.

Since: 3.0.0
Source: src/curves/path/Path.js (Line 195)