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

@yagejs-addons/steering

v0.2.1

Published

Steering (movement AI) for YAGE — seek, flee, arrive, wander, pursue/evade, obstacle avoidance, and flocking, blended into a desired velocity

Readme

@yagejs-addons/steering

Steering (movement AI) for YAGE (@yagejs-addons scope, independently versioned, NOT in the engine fixed group). A headless weighted-sum blend model plus a @yagejs/core Component host. The root entry is pure @yagejs/core; @yagejs-addons/steering/physics adds a RigidBodyComponent-detecting agent.

Install

npm install @yagejs-addons/steering
npm install @yagejs/core # engine peer (single install, reused — not bundled)
npm install @yagejs/physics # only if you import @yagejs-addons/steering/physics

Peers: @yagejs/core (required), @yagejs/physics (optional — the /physics entry only). No runtime deps.

Entry points

No /presenters subpath — steering has no view to swap, only a velocity to compute. The /physics entry exists so the root stays physics-free:

import { SteeringAgent, seek, flee, arrive, wander, pursue, evade, avoidObstacles, separation, alignment, cohesion, followPath, contain, Steering } from "@yagejs-addons/steering";
import { avoidColliders, physicsNeighbors, PhysicsSteeringAgent } from "@yagejs-addons/steering/physics";

5-minute setup

import { SteeringAgent, seek } from "@yagejs-addons/steering";
import { Transform } from "@yagejs/core";

// enemy is an Entity with a Transform. The default output integrates it:
// position += velocity * dt. Nothing else to wire.
enemy.add(
  new SteeringAgent({
    maxSpeed: 120,
    behaviors: [seek(() => player.get(Transform).position)],
  }),
);

Physics body — mount PhysicsSteeringAgent next to a RigidBodyComponent and it drives it. Impulse drive (the default) means real two-way physics: the agent pushes crates, takes knockback, and steering pulls it back on course at maxAcceleration:

import { PhysicsSteeringAgent } from "@yagejs-addons/steering/physics";

enemy.add(
  new PhysicsSteeringAgent({
    maxSpeed: 130,
    maxAcceleration: 500, // default 4x maxSpeed; the per-frame impulse is the capped correction
    behaviors: [arrive(() => waypoint, { slowRadius: 140 })],
  }),
);

Or use the structural body option on the root class — the addon's root entry never imports physics; { setVelocity, getVelocity } is satisfied by RigidBodyComponent as-is, and by any custom mover object:

import { SteeringAgent, arrive } from "@yagejs-addons/steering";
import { RigidBodyComponent } from "@yagejs/physics";

enemy.add(
  new SteeringAgent({
    maxSpeed: 130,
    maxAcceleration: 500,
    behaviors: [arrive(() => waypoint)],
    body: enemy.get(RigidBodyComponent),
  }),
);

See the full docs for blending, obstacle avoidance, flocking, path-following, containment, drive modes, and the headless/manual-drive API.

Live escape hatches

agent.steering.add(flee(() => boss.position, { weight: 4 })); // add behavior live
agent.maxSpeed = 200; // retune
agent.velocity; // Vec2 the agent is steering toward — for a debug arrow
agent.stop(); // halt now: zeroes the model AND the body/output
agent.enabled = false; // pause ticking without removing the component

Not in v1

A bundled debug presenter is deferred — read agent.velocity and draw the arrow yourself. See the steering doc for details.