gaia-navigation
Installation
SKILL.md
Navgiation with navcat
What is a navigation mesh? A navigation mesh (or navmesh) is a simplified representation of a 3D environment used for pathfinding and AI navigation. It consists of interconnected polygons that define walkable areas. These polygons are connected by edges and off-mesh connections, allowing agents to move from one polygon to another.
Quick Start with Three.js
The navcat/three entrypoint provides utilities to integrate navcat with Three.js. Here's a complete example of generating a navmesh from Three.js geometry and visualizing paths:
import { DEFAULT_QUERY_FILTER, findPath, type Vec3 } from 'navcat'
import { generateSoloNavMesh, type SoloNavMeshInput, type SoloNavMeshOptions } from 'navcat/blocks'
import { createNavMeshHelper, createSearchNodesHelper, getPositionsAndIndices } from 'navcat/three'
import { BoxGeometry, Mesh, MeshStandardMaterial, PlaneGeometry, Scene, SphereGeometry } from 'three'
// create a simple threejs scene
const floor = new Mesh(new PlaneGeometry(10, 10), new MeshStandardMaterial({ color: 0x808080 }))
floor.rotation.x = -Math.PI / 2