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

@icjhd/cj-decimal-rvo

v2.1.14

Published

RVO2 动态避障(定点 Decimal / ORCA)

Readme

@icjhd/cj-decimal-rvo(定点 RVO2 / ORCA)

状态:已实现(源码可用)。 正式 npm release 仍走 vault/pkg:add-local;本地压测可用 cj-pkg/scripts/sync-decimal-rvo-local.mjs sync 到 GameClient。

定位

| 包 | 数值 | 场景 | |----|------|------| | @icjhd/cj-rvo | 浮点 number | 单机表现、编辑器调试 | | @icjhd/cj-decimal-rvo | 定点 Decimal 向量 + number 配置标量 | 帧同步 / 锁步权威避障 |

依赖

  • @icjhd/cj-decimal

源码

| 文件 | 说明 | |------|------| | assets/Common.ts | 定点 Vector2 / RVOMath | | assets/Agent.ts | ORCA + LP1/2/3 | | assets/KdTree.ts | Agent/Obstacle 树 | | assets/Simulator.ts | 与 cj-rvo 同 API |

用法

import { Simulator, type IAgent } from 'db://assets/pkg-export/@icjhd/cj-decimal-rvo';

const sim = Simulator.inst;
const id = sim.addAgent({ x: 0, y: 0 }, { radius: 36, maxSpeed: 200 });
sim.setAgentPrefVelocity(id, vx, vy);
sim.step(1 / 20);
const v = sim.getAgentVelocity(id); // Vector2,分量是 Decimal

本地 sync

cd E:\three-kingdom-3.8.8\cj-pkg
node scripts/sync-decimal-rvo-local.mjs
node scripts/smoke-decimal-rvo.mjs

GameClient

见 ability-editor-dev-v2/doc/runtime-defect-plan-b/experiments/enemy-rvo-avoidance-20260919.md。