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

@eluvade/rift-echoes

v1.1.0

Published

Lightweight WebGL module for rendering interactive loot drops with rarity-based visuals.

Readme

Rift Echoes renders animated, rarity-tiered loot-drop effects ("cargo caches") in the browser. It's a self-contained WebGL2 + TypeScript module with zero runtime dependencies — no three.js, no PixiJS. Each drop is composed from additively-blended emitter layers rendered into an HDR framebuffer and finished with bloom and ACES tonemapping.

Built for Abyssal Rift — a 2D space exploration MMORPG.

▶ Live demo  ·  Layer × rarity grid  ·  npm

Features

  • Six rarity tiers — Common, Uncommon, Rare, Epic, Legendary, Unique — each with its own colour, star shape, and particle density.
  • Pure WebGL2 instanced rendering; emitters of the same kind batch into a single draw call across every live drop.
  • HDR pipeline (RGBA16F → bloom → ACES) so emissive cores can bloom past 1.0.
  • Many drops share one canvas and one renderer; place each by x/y.

Install

npm install @eluvade/rift-echoes

Without a build step (CDN)

The package is a native ES module with zero dependencies, so you can import it straight from a CDN inside a plain <script type="module"> — no bundler, no package manager, just an HTML file:

<script type="module">
  import { RiftRenderer, Rarity } from 'https://esm.sh/@eluvade/[email protected]';

  // Omit `canvas` and a full-screen one is created and appended for you.
  // All textures are generated procedurally — nothing is fetched.
  const renderer = new RiftRenderer();
  await renderer.ready();

  const dpr = window.devicePixelRatio || 1;
  renderer.createCargoCache({
    rarity: Rarity.Unique,
    x: (innerWidth / 2) * dpr,   // createCargoCache uses device pixels
    y: (innerHeight / 2) * dpr,
    size: 1.5,
  });
</script>

esm.sh is used above; jsDelivr (https://cdn.jsdelivr.net/npm/@eluvade/[email protected]/+esm) and unpkg (https://unpkg.com/@eluvade/[email protected]) serve the same module. Pin @1.0.0 for reproducibility, or drop it to track latest.

Usage

import { RiftRenderer, Rarity } from '@eluvade/rift-echoes';

// Pass your own canvas, or omit it to have one appended full-screen.
const renderer = new RiftRenderer();

// Renderer init is async (GL setup); wait before spawning.
await renderer.ready();

const drop = renderer.createCargoCache({
  rarity: Rarity.Legendary,
  x: 400,   // device pixels
  y: 300,
  size: 1.0,
});

// When the drop is collected / despawned:
drop.destroy();

API

new RiftRenderer(options)

new RiftRenderer() works with no arguments; the only option is optional.

| option | type | description | | ------------- | ------------------- | ------------------------------------------------------------------ | | canvas | HTMLCanvasElement | Optional. If omitted, a full-screen canvas is created and appended. |

  • renderer.ready(): Promise<void> — resolves once textures are loaded and the render loop is running.
  • renderer.createCargoCache(params): CargoCache — spawns a drop. params: { rarity, x?, y?, size? }.
  • renderer.destroy() — tears down GL resources and stops the loop.

CargoCache

  • cache.x, cache.y — mutable; move a live drop by assigning.
  • cache.destroy() — plays the despawn and removes the drop.
  • cache.finishedtrue once the despawn has fully played out.

Rarity / RARITY_CONFIGS

Rarity is an enum (CommonUnique). RARITY_CONFIGS exposes the layer recipe for each tier (colour + ordered emitter layers) if you want to inspect or fork the visual definitions.

Examples

Two live harnesses live under examples/ and are deployed to GitHub Pages:

  • Single-drop tuning harnessexamples/index.html. Spawn one drop and tune it live: pick the rarity, toggle individual layers, override a layer's DMP, and respawn / destroy. URL params: ?rarity=<Rarity>, ?layers=<i,j>, ?dmp=<a,b,c,d>, ?freeze=<radians>. Exposes window.riftRenderer / window.riftCache.
  • Layer × rarity gridexamples/grid.html. Every layer isolated against every rarity tier in one canvas, with per-row sliders to tune each layer.

To run them locally: npm run build, then serve the repo root with any static server (e.g. npx serve .) and open examples/index.html or examples/grid.html.

Development

npm run build                     # tsc → dist/
node scripts/shoot.mjs <label> <Rarity> [layers]   # single headless screenshot
node scripts/contact.mjs <label>  # per-layer × per-rarity contact sheet (PNG)

License

MIT