Line.intersects()

<static> intersects(a, b, asSegment, result) → {Phaser.Point} Checks for intersection between two lines.If asSegment is true it will check for segment intersection.If asSegment is false it will check for line intersection.Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.Adapted from code by Keith Hair Parameters Name Type Argument Default Description a Phaser.Line The first Line to be checked. b Phaser.Line The second Line to be

Line#y

[readonly] y : number Gets the y coordinate of the top left of the bounds around this line. Source code: geom/Line.js (Line 424)

Line#x

[readonly] x : number Gets the x coordinate of the top left of the bounds around this line. Source code: geom/Line.js (Line 411)

Line#width

[readonly] width : number Gets the width of this bounds of this line. Source code: geom/Line.js (Line 489)

Line#type

[readonly] type : number The const type of this object. Source code: geom/Line.js (Line 38)

Line#top

[readonly] top : number Gets the top-most point of this line. Source code: geom/Line.js (Line 463)

Line#start

start : Phaser.Point The start point of the line. Source code: geom/Line.js (Line 27)

Line#slope

[readonly] slope : number Gets the slope of the line (y/x). Source code: geom/Line.js (Line 385)

Line#setTo()

setTo(x1, y1, x2, y2) → {Phaser.Line} Sets the components of the Line to the specified values. Parameters Name Type Argument Default Description x1 number <optional> 0 The x coordinate of the start of the line. y1 number <optional> 0 The y coordinate of the start of the line. x2 number <optional> 0 The x coordinate of the end of the line. y2 number <optional> 0 The y coordinate of the end of the line. Returns Phaser.Line - This line object

Line#rotateAround()

rotateAround(x, y, angle, asDegrees) → {Phaser.Line} Rotates the line by the amount specified in angle. Rotation takes place around the coordinates given. Parameters Name Type Argument Default Description x number The x coordinate to offset the rotation from. y number The y coordinate to offset the rotation from. angle number The angle in radians (unless asDegrees is true) to rotate the line by. asDegrees boolean <optional> false Is the given angle in radians (fa