Class: Projector

.Isometric. Projector

Phaser.Plugin.Isometric.Projector

new Projector(game, projectionRatio) → {Phaser.Plugin.Isometric.Cube}

Creates a new Isometric Projector object, which has helpers for projecting x, y and z coordinates into axonometric x and y equivalents.

Parameters:
Name Type Description
game Phaser.Game

The current game object.

projectionRatio number

The ratio of the axonometric projection.

Source:
Returns:

This Cube object.

Type
Phaser.Plugin.Isometric.Cube

Members

anchor

Properties:
Name Type Description
anchor Phaser.Point

The x and y offset multipliers as a ratio of the game world size.

Source:

game

Properties:
Name Type Description
game Phaser.Game

The current game object.

Source:

projectionRatio

Properties:
Name Type Description
projectionRatio number

The ratio of the axonometric projection.

Source:

Methods

project(point3, out) → {Phaser.Point}

Use axonometric projection to transform a 3D Point3 coordinate to a 2D Point coordinate. If given the coordinates will be set into the object, otherwise a brand new Point object will be created and returned.

Parameters:
Name Type Description
point3 Phaser.Plugin.Isometric.Point3

The Point3 to project from.

out Phaser.Point

The Point to project to.

Source:
Returns:

The transformed Point.

Type
Phaser.Point

projectXY(point3, out) → {Phaser.Point}

Use axonometric projection to transform a 3D Point3 coordinate to a 2D Point coordinate, ignoring the z-axis. If given the coordinates will be set into the object, otherwise a brand new Point object will be created and returned.

Parameters:
Name Type Description
point3 Phaser.Plugin.Isometric.Point3

The Point3 to project from.

out Phaser.Point

The Point to project to.

Source:
Returns:

The transformed Point.

Type
Phaser.Point