Phaser API Documentation

  Version: 

Member of: Phaser.Geom.Line

setTo([x1], [y1], [x2], [y2])

Description:

Set new coordinates for the line endpoints.

Parameters:

name type arguments description
x1 number <optional>

The x coordinate of the lines starting point.

y1 number <optional>

The y coordinate of the lines starting point.

x2 number <optional>

The x coordinate of the lines ending point.

y2 number <optional>

The y coordinate of the lines ending point.

Returns:
Description:

This Line object.

Since: 3.0.0
Source: src/geom/line/Line.js (Line 146)