Skip to content

A wrapper for the RecastDetour navigation library for node and the browser

Notifications You must be signed in to change notification settings

CedricGuillemet/recast.js

 
 

Repository files navigation

What is this all about

In a game context, Recast.js is meant to be used with a file describing a scene geometry. Using the recastnavigation library, it will deduce a navigation mesh - a set of polygons on which your characters can move.

Once this navigation mesh is computed, it is possible to use built-in pathfinding operations like "find the shortest path between point A and point B", taking into account various variables like obstacles, slopes, and off-mesh connections.

If you decide to use it to animate your scene characters - aka "agents", it also provides a complete crowd system capable of managing all your agents movements using per-agent settings (speed, radius, ...)

What can you do with it

  • load any mesh in .obj format
  • compute and extract its navigation mesh with options
  • save this navigation mesh
  • load this blob without recompute it
  • find a random point guaranteed to be navigable
  • find the nearest path from one point to another
  • place obstacles with a radius
  • add agents on the navigation mesh
  • make them move with their own speed

Is it for WebGL, Three.js or Babylon.js ?

It is designed to work along a WebGL software but it's completely library agnostic. It only manages a mesh and its properties.

Included tests and demos use Three.js, though.

About

A wrapper for the RecastDetour navigation library for node and the browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 89.1%
  • C 7.3%
  • C++ 2.9%
  • Objective-C 0.2%
  • Makefile 0.2%
  • HTML 0.1%
  • Other 0.2%