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-renderer

v0.1.10

Published

Framework-agnostic WebGPU renderer runtime for Plasius projects.

Readme

@plasius/gpu-renderer

npm version Build Status coverage License Code of Conduct Security Policy Changelog

license

Framework-agnostic WebGPU renderer runtime for Plasius projects. This package is intended to replace Three.js-dependent render orchestration with an explicit WebGPU-first runtime that can be consumed from React, vanilla, or worker-driven app surfaces.

Apache-2.0. ESM + CJS builds.

Install

npm install @plasius/gpu-renderer

Usage

import { createGpuRenderer } from "@plasius/gpu-renderer";

const renderer = await createGpuRenderer({
  canvas: document.querySelector("#scene"),
  clearColor: "#102035",
});

renderer.resize(window.innerWidth, window.innerHeight);
renderer.start();

Adaptive Frame Hooks

@plasius/gpu-renderer now exposes frame lifecycle hooks so the app can pass negotiated frame targets from @plasius/gpu-performance and opt into renderer frame sampling for @plasius/gpu-debug.

import { createGpuRenderer, createRendererDebugHooks } from "@plasius/gpu-renderer";

const rendererDebugHooks = createRendererDebugHooks({
  debugSession,
  getTargetFrameTimeMs: () => governor.getSnapshot().targetFrameTimeMs,
});

const renderer = await createGpuRenderer({
  canvas: "#scene",
  frameIdFactory: ({ frame, xrActive }) => `scene.${xrActive ? "xr" : "flat"}.${frame}`,
  ...rendererDebugHooks,
});

Worker DAG Manifests

The renderer also publishes worker-facing frame-stage manifests so @plasius/gpu-performance and @plasius/gpu-worker can reason about renderer work as a multi-root DAG instead of a flat queue.

import { getRendererWorkerManifest } from "@plasius/gpu-renderer";

const realtimeManifest = getRendererWorkerManifest();
const xrManifest = getRendererWorkerManifest("xr");

console.log(realtimeManifest.jobs.map((job) => job.worker.jobType));
console.log(xrManifest.jobs.find((job) => job.key === "lateLatch"));
  • realtime publishes acquire, visibility, mainEncode, postProcess, and submit.
  • xr publishes acquire, visibility, lateLatch, mainEncode, and submit.
  • Jobs include queue class, priority, dependencies, adaptive budget levels, and debug metadata such as allocation tags.

Ray-Tracing-First Planning

The renderer now publishes a stable-snapshot render plan for the premium ray-tracing-first frame model.

import { createRayTracingRenderPlan } from "@plasius/gpu-renderer";

const plan = createRayTracingRenderPlan({
  snapshotId: "visual-snapshot-42",
});

console.log(plan.inputBoundary);
console.log(plan.renderStages.map((stage) => stage.key));
console.log(plan.representationBands);

The plan makes the stable visual snapshot boundary explicit, publishes the required RT-first stage ordering, and exposes representation-band plus acceleration-structure update policy metadata for downstream lighting and performance packages.

XR integration

import { createXrManager } from "@plasius/gpu-xr";
import { createGpuRenderer } from "@plasius/gpu-renderer";

const renderer = await createGpuRenderer({ canvas: "#scene" });
const xr = createXrManager();

renderer.bindXrManager(xr, {
  onSessionStart: () => console.log("XR active"),
  onSessionEnd: () => console.log("XR inactive"),
});

API

  • supportsWebGpu(options)
  • createGpuRenderer(options)
  • createRendererDebugHooks(options)
  • getRendererWorkerProfile(name?)
  • getRendererWorkerManifest(name?)
  • createRayTracingRenderPlan(options)
  • bindRendererToXrManager(renderer, xrManager, options)
  • defaultRendererClearColor
  • rendererDebugOwner
  • rendererWorkerQueueClass
  • defaultRendererWorkerProfile
  • rendererWorkerProfiles
  • rendererWorkerProfileNames
  • rendererWorkerManifests

Demo

Run the demo server from the repo root:

cd gpu-renderer
npm run demo

Then open http://localhost:8000/gpu-renderer/demo/.

The demo now reports explicit canvas state so it is clear whether the renderer is mounted, idle, running, or blocked by secure-context / WebGPU support.

Development Checks

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

Files

  • src/index.js: WebGPU renderer runtime and XR binding helper.
  • src/index.d.ts: public API typings.
  • tests/package.test.js: unit tests for renderer lifecycle behavior.
  • docs/design/worker-manifest-integration.md: renderer frame-stage DAG model.
  • docs/adrs/*: architecture decisions for renderer runtime design.
  • docs/tdrs/*: technical direction for frame hook integration.