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

@plasius/gpu-interaction

v0.1.3

Published

Browser-safe interaction scripting contracts for 3D gpu-* surfaces.

Readme

@plasius/gpu-interaction

npm version CI CD License

Browser-safe interaction scripting contracts for Plasius gpu-* surfaces.

Apache-2.0. ESM + CJS builds. TypeScript types included.

Installation

npm install @plasius/gpu-interaction

Requirements

  • Node.js 24+
  • npm 11.14.1 (declared via packageManager)

Scope

@plasius/gpu-interaction provides renderer-agnostic helpers for:

  • describing actions on 3D-rendered UI surfaces
  • mapping surface-local hit regions from UV or pixel coordinates
  • consuming normalized renderer hit metadata, including entity-id driven selection
  • dispatching action scripts through registered handlers
  • resolving simple voice phrases to the same action descriptors used by pointer, gaze, or script entry points

The package deliberately does not execute arbitrary JavaScript from script strings. A script is a stable command identifier such as system.openModule("mcc-core"); consumers register handlers for action kinds and decide what state changes are allowed.

Usage

import {
  createGpuInteractionRegistry,
  resolveGpuInteractionActionFromHit,
  resolveGpuInteractionActionAtUv,
} from "@plasius/gpu-interaction";

const actions = [
  {
    id: "module:mcc-core",
    kind: "module",
    label: "MCC Core",
    script: 'system.openModule("mcc-core")',
    surfaceId: "system-nav",
    bounds: { x: 24, y: 120, width: 300, height: 80 },
    payload: { moduleId: "mcc-core" },
    phrases: ["open mcc core"],
  },
] as const;

const registry = createGpuInteractionRegistry({
  actions,
  handlers: {
    module(invocation) {
      console.log(invocation.action.payload);
    },
  },
});

const action = resolveGpuInteractionActionAtUv(actions, {
  u: 0.2,
  v: 0.24,
  width: 420,
  height: 760,
});

if (action) {
  registry.invokeAction(action, { source: "pointer" });
}

registry.invokePhrase("open mcc core", { source: "voice" });

const rendererHit = resolveGpuInteractionActionFromHit(
  [
    {
      ...actions[0],
      entityId: "entity:module-nav",
    },
  ],
  {
    kind: "surface",
    entityId: "entity:module-nav",
    surfaceId: "system-nav",
    uv: { u: 0.2, v: 0.24 },
  },
  {
    width: 420,
    height: 760,
  }
);

if (rendererHit.action) {
  registry.invokeAction(rendererHit.action, {
    source: "pointer",
    point: rendererHit.point,
    uv: rendererHit.uv,
  });
}

resolveGpuInteractionActionFromHit returns the renderer hit classification unchanged. Non-action cases such as miss, environment, emissive, and transparent remain explicit so consumers can branch on them without guessing from undefined coordinates alone.

Governance

Development

npm ci
npm run lint
npm run typecheck
npm run test:coverage
npm run build
npm run pack:check

Release

The canonical source repository is Plasius-LTD/gpu-interaction.

  • Pull requests and pushes to main run .github/workflows/ci.yml.
  • npm publication is allowed only through .github/workflows/cd.yml on main.
  • cd.yml requires the production environment and an NPM_TOKEN secret.
  • Version changes should be committed to main before dispatching the publish workflow.