Path Finder - WASM module for path finding

Github repo with sources

It contains implementation of path finding algorithm on Python and on AssemblyScript. Algorithm is based on JavaScript addon for Three.JS Three Pathfinding All main ideas are the same, but there are some difference in details.

Features:

  1. Small size. Compiled WASM module is only 46 kb. As other WASM module, It also requires loader. Default AssemblyScript loader is 18 kb.
  2. Open source. For understanding algorithm it will be better to study Python implementation, because it’s more structural.

Limitations:

  1. Does not generate navigation mesh. This mesh should be prepared in any other external application. Module accept only polygonal description of the navigation mesh: vertex coordinates and vertex indexes of polygon corners.
  2. Works only with static navigation mesh. No dynamic obstacles, agent avoidance or something similar.

Short tutorial, which demonstrate, how to use the module is here

Example application is here

8 Likes

Hi @Shekn and welcome!

That looks super nice, and it performs quite well. Happy to see a Python to WebAssembly build running so good, many thanks for sharing.

Very useful! Thank you!

Ohh I’ve been looking for something like this for a while! thanks for sharing!!

I am trying to replicate the proyect with a simple 2 tris mesh and I just can’t make it :S
How do I get the right data structure for a custom mesh? I mean the .txt file.

cheers!

EDIT: Oh wait I got it working! I wasn’t assigning the vertex index correctly in the polys array