Class: MoveTo

Phaser.Curves. MoveTo

[description]


new MoveTo( [x] [, y])

Parameters:
Name Type Argument Description
x number <optional>

[description]

y number <optional>

[description]

Since: 3.0.0
Source: src/curves/path/MoveTo.js (Line 10)

Members


active :boolean

[description]

Type:
  • boolean
Since: 3.0.0
Default Value:
  • false
Source: src/curves/path/MoveTo.js (Line 30)

p0 :Phaser.Math.Vector2

[description]

Type:
Since: 3.0.0
Source: src/curves/path/MoveTo.js (Line 40)

Methods


getLength()

Gets the length of this curve.

Since: 3.0.0
Source: src/curves/path/MoveTo.js (Line 101)
Returns:

The length of this curve. For a MoveTo the value is always 0.

Type
number

getPoint(t [, out])

Get point at relative position in curve according to length.

Parameters:
Name Type Argument Description
t number

The position along the curve to return. Where 0 is the start and 1 is the end.

out Phaser.Math.Vector2 <optional>

A Vector2 object to store the result in. If not given will be created.

Since: 3.0.0
Source: src/curves/path/MoveTo.js (Line 50)
Returns:

The coordinates of the point on the curve. If an out object was given this will be returned.

Type
Phaser.Math.Vector2

getPointAt(u [, out])

[description]

Parameters:
Name Type Argument Description
u number

[description]

out Phaser.Math.Vector2 <optional>

[description]

Since: 3.0.0
Source: src/curves/path/MoveTo.js (Line 70)
Returns:

[description]

Type
Phaser.Math.Vector2

getResolution()

Gets the resolution of this curve.

Since: 3.0.0
Source: src/curves/path/MoveTo.js (Line 88)
Returns:

The resolution of this curve. For a MoveTo the value is always 1.

Type
number

toJSON()

[description]

Since: 3.0.0
Source: src/curves/path/MoveTo.js (Line 114)
Returns:

[description]

Type
JSONCurve