Class: Point3

.Isometric. Point3

The Point3 object represents a location in a three-dimensional coordinate system, where x and y represent the horizontal axes and z represents the vertical axis. The following code creates a point at (0,0,0): var myPoint = new Phaser.Plugin.Isometric.Point3();

Creates a new Point3 object. If you pass no parameters a Point3 is created set to (0, 0, 0).

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.

Source:

Members

x

Properties:
Name Type Description
x number

The x value of the point.

Source:

y

Properties:
Name Type Description
y number

The y value of the point.

Source:

z

Properties:
Name Type Description
z number

The z value of the point.

Source:

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.

Source:
Returns:

This Point3 object. Useful for chaining method calls.

Type
Phaser.Plugin.Isometric.Point3

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.

Source:
Returns:

This Point3 object.

Type
Phaser.Plugin.Isometric.Point3

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.

Source:
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.

Source:
Returns:

This Point3 object. Useful for chaining method calls.

Type
Phaser.Plugin.Isometric.Point3

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.

Source:
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.

Source:
Returns:

This Point3 object. Useful for chaining method calls.

Type
Phaser.Plugin.Isometric.Point3

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 as Point3.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.

Source:
Returns:

This Point3 object. Useful for chaining method calls.

Type
Phaser.Plugin.Isometric.Point3

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 as Point3.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.

Source:
Returns:

This Point3 object. Useful for chaining method calls.

Type
Phaser.Plugin.Isometric.Point3

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.

Source:
Returns:

This Point3 object. Useful for chaining method calls.

Type
Phaser.Plugin.Isometric.Point3

<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.

Source:
Returns:

The new Point3 object.

Type
Phaser.Plugin.Isometric.Point3

<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.

Source:
Returns:

The new Point3 object.

Type
Phaser.Plugin.Isometric.Point3

<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.

Source:
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.

Source:
Returns:

The new Point3 object.

Type
Phaser.Plugin.Isometric.Point3

<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.

Source:
Returns:

The new Point3 object.

Type
Phaser.Plugin.Isometric.Point3