Methods
-
point_create(x, y)
-
Returns a point from the given x/y values.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description x
Number x value for the point
y
Number y value for the point
Code Equivalent:
new Phaser.Point(x, y)
-
point_get_element(element, point)
-
Returns the x or y value of the point.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description element
which value to return
point
point to get the value from
Code Equivalent:
point.element
-
point_set_element(element, point, value)
-
Assigns the x or y value of the point to a number.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description element
which value to set
point
point to set the value for
value
Number value to set the element to
Code Equivalent:
point.element = value;
-
point_set_magnitude(point, value)
-
Sets the magnitude of the point to a number.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to set the magnitude for
value
Number value to set the magnitude to
Code Equivalent:
point.setMagnitude(value);
-
points_add(pointA, pointB)
-
Adds the coordinates of two points and returns a new point with the result.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
first point to add
pointB
second point to add
Code Equivalent:
Phaser.Point.add(pointA, pointB)
-
points_add_member(point, x, y)
-
Adds the given x and y values to the point.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to add values to
x
Number x value to add to the point
y
Number y value to add to the point
Code Equivalent:
point.add(x, y);
-
points_angle_between(pointA, pointB)
-
Calculates the angle between two points and returns the result.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
first angle to calculate
pointB
second angle to calculate
Code Equivalent:
Phaser.Point.angle(pointA, pointB)
-
points_ceil(point)
-
Applies Math.ceil() to the x and y values of the point.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to change the values of
Code Equivalent:
point.ceil();
-
points_centroid(array)
-
Returns a new point with the centroid of the list of points.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description array
Array list of points to calculate the centroid from
Code Equivalent:
Phaser.Point.centroid(array)
-
points_clamp(point, min, max)
-
Clamps the point object values to be between the given minimum and maximum.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to clamp
min
Number the minimum value to clamp the point to
max
Number the maximum value to clamp the point to
Code Equivalent:
point.clamp(min, max);
-
points_clamp_x(point, min, max)
-
Clamp the point object x value to be between the given minimum and maximum.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to clamp
min
Number the minimum value to clamp the value to
max
Number the maximum value to lcmap the value to
Code Equivalent:
point.clampX(min, max);
-
points_clamp_y(point, min, max)
-
Clamp the point object y value to be between the given minimum and maximum.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to clamp
min
Number the minimum value to clamp the value to
max
Number the maximum value to lcmap the value to
Code Equivalent:
point.clampY(min, max);
-
points_clone(point)
-
Returns a new point with the same properties as the original point.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to clone
Code Equivalent:
point.clone()
-
points_copy_from(source, target)
-
Copies values from one point to another, overwriting the original values.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description source
point to get the values from
target
point to copy the values to
Code Equivalent:
target.copyFrom(source);
-
points_cross(pointA, pointB)
-
Calculates the cross product of two points and returns the result.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
left-hand side
pointB
right-hand side
Code Equivalent:
pointA.cross(pointB)
-
points_distance(pointA, pointB)
-
Calculates the distance between two points and returns the result.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
first angle to calculate
pointB
second angle to calculate
Code Equivalent:
Phaser.Point.distance(pointA, pointB)
-
points_divide(pointA, pointB)
-
Divides the coordinates of two points and returns a new point with the result.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
first point to divide
pointB
second point to divide
Code Equivalent:
Phaser.Point.divide(pointA, pointB)
-
points_divide_member(point, x, y)
-
Divides the point values by the given x and y values.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to divide
x
Number x value to divide the point by
y
Number y value to divide the point by
Code Equivalent:
point.divide(x, y);
-
points_dot(pointA, pointB)
-
Calculates the dot product of two points and returns the result.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
left-hand side
pointB
right-hand side
Code Equivalent:
pointA.dot(pointB)
-
points_equals(pointA, pointB)
-
Returns true/false if one point has the same x/y values as another.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
first point to check
pointB
second point to check
Code Equivalent:
Phaser.Point.equals(pointA, pointB)
-
points_floor(point)
-
Applies Math.floor() to the x and y values of the point.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to change the values of
Code Equivalent:
point.floor();
-
points_get_magnitude(point)
-
Returns the length of the point object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to get the magnitude of
Code Equivalent:
point.getMagnitude()
-
points_get_magnitude_squared(point)
-
Returns the length squared of the point object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to get the magnitude squared of
Code Equivalent:
point.getMagnitudeSq()
-
points_interpolate(pointA, pointB, f)
-
Interpolates the two points based on the percent value between 0 and 1.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
first point
pointB
second point
f
Number the level of interpolation between the two points
Code Equivalent:
Phaser.Point.interpolate(pointA, pointB, f)
-
points_invert(point)
-
Inverts the x and y values of the point.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to invert
Code Equivalent:
point.invert();
-
points_is_zero(point)
-
Returns true/false if the point has the values 0,0.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to check
Code Equivalent:
point.isZero()
-
points_limit(point, max)
-
Alters the point so it's magnitude is no more than the given maximum value.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to change
max
Number the value to set the maximum to
Code Equivalent:
point.limit(max);
-
points_multiply(pointA, pointB)
-
Multiplies the coordinates of two points and returns a new point with the result.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
first point to multiply
pointB
second point to multiply
Code Equivalent:
Phaser.Point.multiply(pointA, pointB)
-
points_multiply_member(point, x, y)
-
Multiplies the point values by the given x and y values.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to multiply
x
Number x value to multiply the point by
y
Number y value to multiply the point by
Code Equivalent:
point.multiply(x, y);
-
points_negate(pointA)
-
Creates a new point with negative values of the original point.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
point to get the values from
Code Equivalent:
Phaser.Point.negative(pointA)
-
points_normalize(pointA)
-
Returns a new point of the normalized values of the original.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
point to normalize
Code Equivalent:
Phaser.Point.normalize(pointA)
-
points_perpendicular(pointA)
-
Returns a new point with the perpendicular vector to the original point.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
point to get the vector from
Code Equivalent:
Phaser.Point.perp(pointA)
-
points_set_to_polar(point, degrees, radius)
-
Sets the x and y values of hte point based on the given polar coordinate.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to change the values of
degrees
Number degrees of the polar coordinate
radius
Number radius of the polar coordinate
Code Equivalent:
point.setToPolar(degrees, radius, true);
-
points_subtract(pointA, pointB)
-
Subtracts the coordinates of two points and returns a new point with the result.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description pointA
first point to subtract
pointB
second point to subtract
Code Equivalent:
Phaser.Point.subtract(pointA, pointB)
-
points_subtract_member(point, x, y)
-
Subtracts the given x and y values from the point.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description point
point to subtract values from
x
Number x value to subtract from the point
y
Number y value to subtract from the point
Code Equivalent:
point.subtract(x, y);