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

@aperture-engine/physics

v0.3.0

Published

Backend-neutral physics components, fixed-step scheduling, and backend contracts for Aperture.

Readme

@aperture-engine/physics

Backend-neutral physics components, fixed-step scheduling, and backend contracts for the Aperture engine.

Install

pnpm add @aperture-engine/physics

This package is part of the Aperture WebGPU game engine and is normally used together with the other @aperture-engine/* packages (it depends on @aperture-engine/simulation for the ECS world).

What it does

@aperture-engine/physics provides the engine-agnostic authoring layer for physics: ECS components (rigid bodies, colliders, joints, character controllers, materials), helpers to build their initial data, a deterministic fixed-step clock, and the PhysicsBackend contract that a concrete simulation backend (e.g. Rapier) implements. It also drives the ECS-to-backend sync each tick and writes results back onto the world. No physics solver is bundled here — bring a backend, or use the built-in test backend from the ./testing subpath.

Usage

import {
  registerPhysicsComponents,
  RigidBody,
  Collider,
  createRigidBody,
  createCollider,
  createFixedStepClock,
  advanceFixedStepClock,
  createPhysicsWorldSyncState,
  stepPhysicsWorld,
} from "@aperture-engine/physics";
import { createTestPhysicsBackend } from "@aperture-engine/physics/testing";

// Register the physics components on your ECS world.
registerPhysicsComponents(world);

// Author an entity with a dynamic rigid body and a box collider.
const entity = world.createEntity();
world.addComponent(entity, RigidBody, createRigidBody({ type: "dynamic" }));
world.addComponent(
  entity,
  Collider,
  createCollider({ shape: { kind: "box", halfExtents: [0.5, 0.5, 0.5] } }),
);

// Drive the simulation with a deterministic fixed-step clock and a backend.
const clock = createFixedStepClock({ fixedDelta: 1 / 60 });
const state = createPhysicsWorldSyncState();
const backend = createTestPhysicsBackend();

const advance = advanceFixedStepClock(clock, deltaSeconds);
for (let i = 0; i < advance.substeps; i++) {
  stepPhysicsWorld({
    world,
    backend,
    state,
    fixedDelta: clock.fixedDelta,
    fixedStep: clock.fixedStepIndex,
  });
}

Entry points

  • @aperture-engine/physics — components, authoring helpers, fixed-step clock, ECS sync (stepPhysicsWorld), quaternion/vector math, validation, the PhysicsBackend contract, and worker transport helpers.
  • @aperture-engine/physics/testingcreateTestPhysicsBackend, a pure-TypeScript reference backend useful for tests and headless simulation.

License

Part of the Aperture monorepo. MIT licensed.