npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

three-pathfinding-3d

v1.0.9

Published

A 3D pathfinding library for Three.js, supporting navigation meshes (navmeshes) and various pathfinding algorithms.

Downloads

406

Readme

three-pathfinding-3d

基于 three-pathfinding 优化的 3D 导航网格路径查找库,专为 Three.js 场景设计。

📌 项目背景

原库 three-pathfinding 目前已停止维护,社区提交的 Pull Request 长期未被合并。
为此,我们 fork 并重构了该项目,修复了多个关键问题,提升其在 3D 复杂场景 中的稳定性和准确性。

📧 联系作者:[email protected]


🔧 主要修复与优化

本项目基于原始库代码进行了深度改进,解决了以下核心问题:

  1. 修复 funnel 算法缺失首通道的问题
    原算法遗漏第一个通道顶点,导致最终路径偏移甚至错误,现已修正。

  2. 针对 3D 场景优化 funnel 算法
    原始实现仅适用于 2D 投影,在高度变化明显的 3D 场景中路径偏差严重。现通过三维空间计算优化通道处理逻辑,显著提升路径真实感和可用性。

  3. 修正左右通道定义错误
    原算法中左右通道判断逻辑颠倒,造成路径扭曲。已重新校准左右边界判定规则,确保 funnel 正确收缩。


🚀 未来规划

  • ✅ 已完成:Funnel 算法三维化与逻辑修复
  • ⏳ 开发中:新增 BufferPolygon 模块,支持高效多边形数据管理
  • 🔜 计划中:支持 NavMesh 数据结构整体导出,无需每次运行时重建,提升性能与加载速度

💾 安装方式

使用 npm 安装:

npm install three-pathfinding-3d

在项目中引入:

import { Pathfinding, PathfindingHelper } from 'three-pathfinding-3d';

🔍 快速开始(本地演示) 克隆仓库并启动示例项目:

git clone https://gitee.com/yjsdszz/three-pathfinding-3d
pnpm i 
pnpm run demo

示例包含一个简单的 Three.js 场景,展示角色在导航网格上的自动寻路过程。

🤝 贡献指南 欢迎提交 Issue 和 Pull Request! 如果你发现 bug 或有功能建议,请随时联系我们或发起 PR。

📄 许可证 本项目基于 MIT License 开源,自由使用,欢迎二次开发。