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

@elata-biosciences/rppg-web

v0.1.2

Published

TypeScript wrapper for the Elata rPPG pipeline

Downloads

134

Readme

@elata-biosciences/rppg-web

TypeScript wrapper for the Elata rPPG pipeline. This package provides a small processor class that delegates to a backend pipeline (WASM or native).

Install

Using pnpm (recommended):

pnpm add @elata-biosciences/rppg-web @elata-biosciences/eeg-web

Using npm:

npm install @elata-biosciences/rppg-web @elata-biosciences/eeg-web

Requirements

  • Node.js >= 18 for builds, tests, and demos.
  • Modern browser with WebAssembly support for using the default WASM backend.
  • Optional: MediaPipe FaceMesh if you use the face-ROI demo helpers.

Key exports

  • RppgProcessor – high-level processor for ingesting samples and computing metrics.
  • DemoRunner – helper for wiring a frame source to a processor in demos.
  • MediaPipeFrameSource, MediaPipeFaceFrameSource – frame sources for camera input.

Usage

import { RppgProcessor } from "@elata-biosciences/rppg-web";
import { initEegWasm, RppgPipeline } from "@elata-biosciences/eeg-web";

await initEegWasm();

const backend = {
  newPipeline: (sampleRate: number, windowSec: number) =>
    new RppgPipeline(sampleRate, windowSec),
};

const processor = new RppgProcessor(backend, 30, 5);
processor.pushSample(Date.now(), 0.42);
console.log(processor.getMetrics());

The backend must expose newPipeline(sampleRate, windowSec) and return an object with push_sample/get_metrics (or camelCase equivalents).

TypeScript layout

  • src/*.ts: source code edited in this repo
  • dist/*.js: emitted runtime files used by consumers
  • dist/*.d.ts: emitted type declarations used by TypeScript consumers
  • demo/*: demo-only files, not part of the package runtime API
  • src/__tests__/*: test-only files, not loaded by consumers

When consuming @elata-biosciences/rppg-web, TypeScript resolves types from dist/index.d.ts and runtime code from dist/index.js.

MediaPipe face ROI

Use MediaPipe FaceMesh to drive a face ROI for sampling:

import { RppgProcessor, DemoRunner, MediaPipeFaceFrameSource, MediaPipeFrameSource, loadFaceMesh } from "@elata-biosciences/rppg-web";
import { initEegWasm, RppgPipeline } from "@elata-biosciences/eeg-web";

await initEegWasm();
const backend = { newPipeline: (sr: number, ws: number) => new RppgPipeline(sr, ws) };
const processor = new RppgProcessor(backend, 30, 6);

const faceMesh = await loadFaceMesh();
const source = faceMesh
  ? new MediaPipeFaceFrameSource(videoEl, faceMesh, 30)
  : new MediaPipeFrameSource(videoEl, { fps: 30 });

const runner = new DemoRunner(source, processor);
await runner.start();

When a face ROI is available, DemoRunner uses it automatically.

TO RUN DEMO

Install dependencies first:

npm --prefix packages/rppg-web install

Then run:

npm --prefix packages/rppg-web run start-demo

This now does all required build steps before serving:

  • builds rppg-wasm for wasm32-unknown-unknown
  • runs wasm-bindgen into packages/rppg-web/demo/pkg
  • bundles packages/rppg-web/demo/main.ts to packages/rppg-web/demo/demo.js

Useful explicit commands:

# build wasm glue only
npm --prefix packages/rppg-web run build:wasm

# bundle demo JS only
npm --prefix packages/rppg-web run bundle:demo

# full build (wasm + bundle), no server
npm --prefix packages/rppg-web run build:demo

# serve existing artifacts without rebuilding
npm --prefix packages/rppg-web run start-demo:quick

Wait a couple seconds before the pipeline starts computing BPM predictions

Release Notes

For package publishing flow, release tags (next then promote to latest), and rollback/deprecate guidance, see docs/releasing.md.