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

v0.1.1

Published

Continuity-aware cloth simulation and rendering contracts for Plasius WebGPU stacks.

Readme

@plasius/gpu-cloth

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

Continuity-aware cloth simulation and rendering contracts for Plasius WebGPU stacks.

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

Install

npm install @plasius/gpu-cloth

Browser Demo

npm run demo

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

npm run demo now serves a browser-based 3D harbor validation scene from @plasius/gpu-shared, focused on cloth continuity. The existing console example remains available via npm run demo:example.

What It Solves

  • Defines near, mid, far, and horizon cloth representation bands.
  • Preserves silhouette, broad motion, and pinned-anchor continuity so garments do not pop or collapse when range selection changes.
  • Separates stable physics snapshot inputs from derived visual cloth state.
  • Emits worker-manifest DAGs compatible with @plasius/gpu-worker.
  • Emits performance metadata compatible with @plasius/gpu-performance.
  • Keeps the first package slice focused on contracts, planning, and integration surfaces rather than pretending to ship a full solver on day one.

Usage

import {
  createClothRepresentationPlan,
  createClothSimulationPlan,
  getClothWorkerManifest,
  selectClothRepresentationBand,
} from "@plasius/gpu-cloth";

const representationPlan = createClothRepresentationPlan({
  garmentId: "hero-cape",
  kind: "cape",
  profile: "interactive",
  supportsRayTracing: true,
  nearFieldMaxMeters: 18,
  midFieldMaxMeters: 55,
  farFieldMaxMeters: 180,
});

const activeBand = selectClothRepresentationBand(32, representationPlan.thresholds);
const activeRepresentation = representationPlan.representations.find(
  (entry) => entry.band === activeBand
);

console.log(activeBand, activeRepresentation?.continuity);

const simulationPlan = createClothSimulationPlan("interactive");
const workerManifest = getClothWorkerManifest("interactive");

console.log(simulationPlan.snapshotSource.stage, workerManifest.jobs.length);

Continuity Model

Cloth bands share a continuity group and motion field identity. Each band retains a non-zero silhouette floor and broad-motion floor from the same shared source so the garment still reads as the same object when the view changes:

  • near: full live simulation, highest mesh density, highest update rate
  • mid: reduced live simulation, lower wrinkle detail, same broad motion
  • far: pose or sway proxy, same silhouette and pinned-anchor identity
  • horizon: silhouette impression with retained directional motion

The continuity model is designed so the visual answer changes in fidelity, not in whether the cloth still appears attached, moving, or present.

Worker and Performance Integration

The package emits multi-root DAG manifests rather than flat FIFO job lists.

Typical roots:

  • snapshot-ingest
  • wind-field-advance

Typical downstream joins:

  • near-cloth depends on both the stable physics snapshot and the current cloth solve state
  • wrinkle-history depends on both near-cloth and mid-cloth

Each job carries:

  • worker queue metadata for @plasius/gpu-worker
  • performance levels and ray-tracing-first metadata for @plasius/gpu-performance
  • debug metadata suitable for future @plasius/gpu-debug adoption

Package Scope

@plasius/gpu-cloth currently provides:

  • cloth representation-band planning
  • continuity envelope generation
  • stable snapshot and scene-preparation planning
  • worker-manifest and budget-contract generation

It does not yet provide:

  • a production cloth solver
  • actual GPU kernels
  • renderer pass execution
  • debug transport or analytics delivery

Development

npm ci
npm run lint
npm run typecheck
npm test
npm run build