Skip to main content

Pathfinding

Synced from the repository

This page mirrors the pathfinding README (branch develop). The repository is the source of truth.

A pathfinding library with JavaScript/TypeScript bindings and a web-based testbed application. The pathfinder uses a combination of graph-based and navmesh-based pathfinding that you can mix and match based on your needs.

Project Structure

  • auki-pathfinding-js/ - TypeScript pathfinding library
  • auki-pathfinding-rs/ - Rust implementation (not covered in this README)
  • test-web-wasm/ - React + Vite web application for testing the pathfinding library

Prerequisites

  • Node.js (v22 or higher)
  • npm

Quick Start

2. Build the local pathfinding package

cd auki-pathfinding-js
npm install
npm run build

This command will:

  • Install dependencies for the TypeScript library
  • Build the TypeScript library
  • Install dependencies for the test web application

3. Run the web application

cd test-web-wasm
npm install
npm run dev

The application will be available at http://localhost:5173

Dependencies

The package uses:

  • earcut for polygon triangulation
  • recast-navigation-js for pathfinding algorithms

The testbed uses:

  • React + Vite for the web testbed
  • Tailwind CSS for styling