Reference Source

Pathway Module

The Pathway module smoothly integrates pathfinding into the Vylocity Game Engine, allowing map instances to navigate environments more efficiently.

Uses easystar under the hood.

Installation

ES Module

import { Pathway } from './pathway.mjs';

IIFE (Immediately Invoked Function Expression)

<script src="pathway.js"></script>;
// ...
window.PathwayBundle.Pathway;

CommonJS (CJS) Module

const { Pathway } = require('./pathway.cjs.js');

API

MapInstance Properties

pathwayWeight

Methods

Pathway.to(pInstance, pDestination, pOptions)

Pathway.end(pInstance)

Pathway.setTileSize(pTileSize)

Global Dependency

Pathway relies on the VYLO variable being globally accessible.