new Point3(x, y, z)
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
x |
number |
<optional> |
0 | The horizontal X position of this Point. |
y |
number |
<optional> |
0 | The horizontal Y position of this Point. |
z |
number |
<optional> |
0 | The vertical position of this Point. |
Members
-
x
-
y
-
z
Methods
-
add(x, y, z) → {Phaser.Plugin.Isometric.Point3}
-
Adds the given x, y and z values to this Point3.
Parameters:
Name Type Description x
number The value to add to Point3.x.
y
number The value to add to Point3.y.
z
number The value to add to Point3.z.
Returns:
This Point3 object. Useful for chaining method calls.
-
copyFrom(source) → {Phaser.Plugin.Isometric.Point3}
-
Copies the x, y and z properties from any given object to this Point3.
Parameters:
Name Type Description source
any The object to copy from.
Returns:
This Point3 object.
-
copyTo(dest) → {Object}
-
Copies the x, y and z properties from this Point3 to any given object.
Parameters:
Name Type Description dest
any The object to copy to.
Returns:
The dest object.
- Type
- Object
-
divide(x, y, z) → {Phaser.Plugin.Isometric.Point3}
-
Divides Point3.x, Point3.y and Point3.z by the given x, y and z values.
Parameters:
Name Type Description x
number The value to divide Point3.x by.
y
number The value to divide Point3.y by.
z
number The value to divide Point3.z by.
Returns:
This Point3 object. Useful for chaining method calls.
-
equals(a) → {boolean}
-
Determines whether the given object's x/y/z values are equal to this Point3 object.
Parameters:
Name Type Description a
Phaser.Plugin.Isometric.Point3 | any The object to compare with this Point3.
Returns:
A value of true if the x and y points are equal, otherwise false.
- Type
- boolean
-
multiply(x, y, z) → {Phaser.Plugin.Isometric.Point3}
-
Multiplies Point3.x, Point3.y and Point3.z by the given x and y values. Sometimes known as
Scale
.Parameters:
Name Type Description x
number The value to multiply Point3.x by.
y
number The value to multiply Point3.y by.
z
number The value to multiply Point3.z by.
Returns:
This Point3 object. Useful for chaining method calls.
-
set(x, y, z) → {Phaser.Plugin.Isometric.Point3}
-
Sets the x, y and z values of this Point3 object to the given values. If you omit the y and z value then the x value will be applied to all three, for example:
Point3.set(2)
is the same asPoint3.set(2, 2, 2)
If however you set both x and y, but no z, the z value will be set to 0.Parameters:
Name Type Argument Description x
number The x value of this point.
y
number <optional>
The y value of this point. If not given the x value will be used in its place.
z
number <optional>
The z value of this point. If not given and the y value is also not given, the x value will be used in its place.
Returns:
This Point3 object. Useful for chaining method calls.
-
setTo(x, y, z) → {Phaser.Plugin.Isometric.Point3}
-
Sets the x, y and z values of this Point3 object to the given values. If you omit the y and z value then the x value will be applied to all three, for example:
Point3.setTo(2)
is the same asPoint3.setTo(2, 2, 2)
If however you set both x and y, but no z, the z value will be set to 0.Parameters:
Name Type Argument Description x
number The x value of this point.
y
number <optional>
The y value of this point. If not given the x value will be used in its place.
z
number <optional>
The z value of this point. If not given and the y value is also not given, the x value will be used in its place.
Returns:
This Point3 object. Useful for chaining method calls.
-
subtract(x, y, z) → {Phaser.Plugin.Isometric.Point3}
-
Subtracts the given x, y and z values from this Point3.
Parameters:
Name Type Description x
number The value to subtract from Point3.x.
y
number The value to subtract from Point3.y.
z
number The value to subtract from Point3.z.
Returns:
This Point3 object. Useful for chaining method calls.
-
<static> add(a, b, out) → {Phaser.Plugin.Isometric.Point3}
-
Adds the coordinates of two points together to create a new point.
Parameters:
Name Type Argument Description a
Phaser.Plugin.Isometric.Point3 The first Point3 object.
b
Phaser.Plugin.Isometric.Point3 The second Point3 object.
out
Phaser.Plugin.Isometric.Point3 <optional>
Optional Point3 to store the value in, if not supplied a new Point3 object will be created.
Returns:
The new Point3 object.
-
<static> divide(a, b, out) → {Phaser.Plugin.Isometric.Point3}
-
Divides the coordinates of two points to create a new point.
Parameters:
Name Type Argument Description a
Phaser.Plugin.Isometric.Point3 The first Point3 object.
b
Phaser.Plugin.Isometric.Point3 The second Point3 object.
out
Phaser.Plugin.Isometric.Point3 <optional>
Optional Point3 to store the value in, if not supplied a new Point3 object3 will be created.
Returns:
The new Point3 object.
-
<static> equals(a, b) → {boolean}
-
Determines whether the two given Point3 objects are equal. They are considered equal if they have the same x, y and z values.
Parameters:
Name Type Description a
Phaser.Plugin.Isometric.Point3 The first Point3 object.
b
Phaser.Plugin.Isometric.Point3 The second Point3 object.
Returns:
A value of true if the Points3 are equal, otherwise false.
- Type
- boolean
-
<static> multiply(a, b, out) → {Phaser.Plugin.Isometric.Point3}
-
Multiplies the coordinates of two points to create a new point.
Parameters:
Name Type Argument Description a
Phaser.Plugin.Isometric.Point3 The first Point3 object.
b
Phaser.Plugin.Isometric.Point3 The second Point3 object.
out
Phaser.Plugin.Isometric.Point3 <optional>
Optional Point3 to store the value in, if not supplied a new Point3 object will be created.
Returns:
The new Point3 object.
-
<static> subtract(a, b, out) → {Phaser.Plugin.Isometric.Point3}
-
Subtracts the coordinates of two points to create a new point.
Parameters:
Name Type Argument Description a
Phaser.Plugin.Isometric.Point3 The first Point3 object.
b
Phaser.Plugin.Isometric.Point3 The second Point3 object.
out
Phaser.Plugin.Isometric.Point3 <optional>
Optional Point3 to store the value in, if not supplied a new Point3 object will be created.
Returns:
The new Point3 object.