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

@pleasantmachines/kento-frames

v0.1.0

Published

Nested frames, surfaces, carriers, surface locomotion, interaction picking and placement between maps. Depends on the kernel (validation) and `@kento/debug` (the view types `frameEntities` fills). `index.ts` is the public entry. Capabilities: `frames`, `i

Readme

@kento/frames

Nested frames, surfaces, carriers, surface locomotion, interaction picking and placement between maps. Depends on the kernel (validation) and @kento/debug (the view types frameEntities fills). index.ts is the public entry. Capabilities: frames, interaction, placement (kento.json).

applyMat4(m, x, y, z) and applyRigidInverse(m, x, y, z) (matrix.ts) move a point through a column-major 4x4 (three.js's elements order) and back through a rigid one, without three.

Map frames

frameGraph(frames) compiles a detached, validated snapshot of rigid frames (unit quaternions, no scale); its reads return owned copies. assertFramePose(pose) is the same validation for one pose, without the graph or the copies: for hot paths (a box sweep validates every proxy on every call).

The frame tree (frames.ts, frameTree.test.ts). Frames nest to any depth (a world, a creature on it, a city on the creature, a walker in the city, a cabin in the walker). A MapFrame is plain data the game keeps in its state: { id, parent, origin, rotation, velocity?, spin? }, its pose in the parent and its motion (origin velocity and angular velocity) in the parent's coordinates. The graph composes motion as well as pose (v = V + W×(R o) + R v, w = W + R w), and every relation between two frames goes through their lowest common ancestor, never the root: relative(of, from), point, direction, rotation, velocity(from, to, p, v?) and handOff(body, to) (a FramedPoint re-expressed in another frame, keeping its world place and world motion: stepping off a moving deck keeps the deck's velocity). advanceFrames(frames, dt) steps every frame by its own motion (one fixed step); frameMotion(a, b, dt) is the motion that takes pose a to pose b (a game posing frames by rule sets each step's motion from its next pose); reparentFrame re-hangs a frame keeping its place and motion. All of it is deterministic double arithmetic in a fixed order: the same frames give the same bits in Node and the browser.

Inertia (inertia.ts): frameInertia(before, after, frame, point, dt, { still, gravity? }) is what a moving frame does to what stands in it: the acceleration of a point it carries, seen from a frame taken as still (from the two snapshots' point velocities, so spin and its centripetal part count), and the gravity a body at rest there feels in the frame's own axes (true gravity less that acceleration), split into the push across its floor and the normal press into it. A deck lurching ahead pushes its riders back; a listing one tips their gravity toward its low side.

Surfaces (surfaces.ts): surfacePicker(frames, surfaces) casts a ray at gameplay rectangles ({ id, frame, width, depth, priority? }, on their frame's y=0 from its origin) and returns the nearest front-facing hit. Hits within SURFACE_TIE (1 µm) tie, and a tie goes to the higher priority, then to the innermost frame (a lift's floor flush with the barge deck it stands on is the lift's), then to the lower id, so the result never depends on how surfaces are named or listed (frames.test.ts). Known gap: a rectangle starts at its frame's origin (no offset).

Scale and precision (frameTree.test.ts): the math is f64, so frame-relative work is exact far from the root (two decks 2 km or 1000 km out give bit-identical relative poses). The limit is downstream, in f32 consumers: a navmesh or a renderer is precise within about 2 km of the frame it is rooted at, so a host roots each at the frame its bodies live in and never works in root coordinates far out. The frame math is tested from a 0.3 m crate in a cabin at the rim of a turning 300 m city, and a frame much larger than 2 km must be split into several frames. Rotations are unit quaternions with no scale: a frame cannot shrink or grow its contents.