Constructor method for the main PIXI.Container class to hold all views within the engine and all map related logic.
{TEngineConfiguration} configuration object for the isometric engine instance
Variable holding the parsed and processed map data
MoveEngine instance to handle all animations and tweens
ReadonlytileHalf-height of a single isometric tile
ReadonlytileHalf-width of a single isometric tile
callback function that will be called once everything is loaded and engine instance is ready
callback function that will be called when any moving object reaches its destination. Call param will be the moving object itself.
callback function that will be called when a tile with an interactive map-object on it is selected. Call param will be the object selected.
callback function that will be called every time an objects direction or position changed
callback function that will be called when any moving object is in move and there are other objects on the next tile. Call params will be the moving object and an array of objects on the next tile.
FunctionEnables adding external custom display objects to the specified location. This method should be used for the objects that are not already defined in json file and don't have a type-id. The resulting object will be independent of engine mechanics apart from depth controls.
{PIXI.DisplayObject} object to be added to location
{TColumnRowPair} position object including row and column coordinates
the newly added object
FunctionAdds an already-created object to the map.
{ObjectView} a map-object to add to the map and the given location
{TColumnRowPair} position object including row and column coordinates
the newly added object
FunctionExternal center is the central point of the frame defined by the user to be used as the visual size of the engine. This method centralizes the EngineView instance with respect to this external center-point.
{boolean} specifies if the camera move will be animated or instant
Centralizes the EngineView instance to the map location specified by row and column index.
{number} the column index of the map location
{number} the row index of the map location
OptionalinstantRelocate: boolean{boolean} specifies if the camera move will be animated or instant
Centralizes the EngineView instance to the object specified.
{ObjectView} the object that map will be centralized with respect to
FunctionCentralizes the EngineView instance to the points specified.
{number} the x coordinate of the center point with respect to EngineView frame
{number} the y coordinate of the center point with respect to EngineView frame
{boolean} specifies if the relocation will be animated or instant
Sets alphas of the map-objects referenced to the given location.
{number} alpha value, should be between 0 and 1
{TColumnRowPair} position object including row and column coordinates
FunctionChecks for a path and moves the map-object on map if there is an available path
{ObjectView} map-object that is being moved
{TColumnRowPair} object including row and column coordinates for the target location
{number} speed of the map-object to be used during movement, if not defined it uses previous speed or the MoveEngine's default speed, default null
if there is an available path to move to the target tile
FunctionChecks for a path and moves the map-object on map if there is an available path
{ObjectView} map-object that is being moved
{TileView} target map-tile or any custom object that has 'mapPos' and 'isMovableTo' defined
{number} speed of the map-object to be used during movement, if not defined it uses previous speed or the MoveEngine's default speed, default null
if there is an available path to move to the target tile
FunctionCreates and adds a predefined (in json file) map-object to the map using the specified object type-id.
{number} type-id of the object as defined in the json file
{TColumnRowPair} position object including row and column coordinates
the newly created map-object
Centralizes and zooms the EngineView instance to the map location specified by row and column index.
{number} the column index of the map location
{number} the row index of the map location
{number} targeted zoom level for focusing
Centralizes and zooms the EngineView instance to the object specified.
{ObjectView} the object that map will be focused with respect to
FunctionReturns all the ObjectView instances referenced to the given location.
{TColumnRowPair} position object including row and column coordinates
an array of map-objects referenced to the given location
FunctionReturns all the ObjectView instances referenced to the given location with the specified row and column indices.
{number} the row index of the map location
{number} the column index of the map location
an array of map-objects referenced to the given location
FunctionSearches and returns a path between two locations if there is one.
{TColumnRowPair} object including row and column coordinates of the source location
{TColumnRowPair} object including row and column coordinates of the target location
an array of path items defining the path
FunctionReturns the TileView instance that sits in the location given by row and column indices.
{number} row index of the tile
{number} column index of the tile
the tile in the location given
FunctionFinds the nearest tile to the point given in the map's local scope.
{TPositionPair} Point to check
The nearest map-tile if there is one. Otherwise null
FunctionMoves the current controllable map-object to a location if available.
{TColumnRowPair} object including row and column coordinates for the target location
{number} speed of the map-object to be used during movement, if not defined it uses previous speed or the MoveEngine's default speed, default null
if there is an available path to move to the target tile
FunctionMoves the current controllable map-object to one of the adjacent available tiles of the map-object specified.
{ObjectView} target map-object
{number} speed of the map-object to be used during movement, if not defined it uses previous speed or the MoveEngine's default speed, default null
if there is an available path to move to the target map-object
FunctionRemoves the object and its references from the map.
{ObjectView} Either an external display object or a map-object (ObjectView)
{TColumnRowPair} position object including row and column coordinates. If not defined, the engine will use obj.mapPos to remove the map-object
FunctionRepositions the content according to user settings. Call this method whenever you want to change the size or position of the engine.
{TPositionFrame} frame to position the engine, default is the previously set posFrame and if not set, it is { x : 0, y : 0, w : 800, h : 600 }
Sets a map-object as the current controllable. This object will be moving in further relevant user interactions.
{ObjectView} object to be set as current controllable
FunctionSets all the parameters related to zooming in and out.
{number} minimum scale that the PIXI.Container for the map can get, default 0.5
{number} maximum scale that the PIXI.Container for the map can get, default 1.5
{number} used to calculate zoom increment, defined by user, default 5
{number} initial zoom level of the map, default 0
{boolean} specifies whether to zoom instantly or with a tween animation, default false
Main PIXI.Container class to hold all views within the engine and all map related logic.
EngineView