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

@jgengine/rapier

v0.54.0

Published

Rapier physics backend for JGengine

Readme

@jgengine/rapier

Rapier-backed physics adapter for the @jgengine/core PhysicsBackend seam. It provides native capsules, shapecasts, rotation, CCD, joints, collision queries, and Rapier's own character and ray-cast vehicle controllers.

import { createRapierBackend } from "@jgengine/rapier";

const physics = await createRapierBackend();

What it does

  • Every body, collider and joint sits in a handle map, so a contact or a query hit finds its body in O(1) at any world size.
  • raycast, shapecast and overlap take an optional out object; a hot caller reuses one and allocates nothing.
  • Contacts report the manifold normal from a toward b, the summed impulse, and the closing speed that impulse stopped.
  • step(dt) accumulates real time into fixed fixedDt slices (default 1/60 s), the same as the pure-TS backend.
  • snapshot() / restore() round-trip the world with stable handles; controllers built on it are rebuilt after a restore.

Controllers

Both are optional PhysicsBackend methods; the pure-TS backend has neither and keeps its own behaviour.

  • createCharacterMotion(desc) wraps Rapier's KinematicCharacterController. Use it through createCharacterController({ ..., backendMotion: true }).
  • createRayCastVehicle({ chassis, wheels }) wraps Rapier's DynamicRayCastVehicleController. On a dynamic chassis Rapier owns suspension and tyres; createVehicleBackendLink({ wheels }) uses it on its kinematic chassis for wheel contacts only.

Deterministic build for multiplayer

The default @dimforge/rapier3d-compat build replays the same inputs to the same state on one machine. Lockstep or rollback across different CPUs and browsers needs Rapier's cross-platform deterministic build, which has the same API. Install it under the name this package imports, at the same version:

{
  "dependencies": {
    "@dimforge/rapier3d-compat": "npm:@dimforge/[email protected]"
  }
}

With npm, put the same alias in overrides; with Bun or pnpm, use overrides or pnpm.overrides. Then step every peer with the same fixedDt and the same inputs per tick, and start late joiners from a snapshot().

Part of JGengine. Apache-2.0.