Pue JS
v1.0 is outdiscover our new Gaseous Rendering Engine

Next-generation acoustic feedback for modern web applications.

Zero-dependency, strictly typed, purely organic scroll interactions.

npm install @puejs/core
bundle
7.7 kB gzip
dependencies
0
license
Unlicense

Trusted by acoustic engineers at:

  • Gasflare
  • Flatubernetes
  • Sulfabase
  • MethaneDB
  • OpenAir
  • ODORACLE
  • Metha
01 — Capabilities

Engineered for production-grade emissions.

Every layer of the Pue JS runtime has been profiled, benchmarked and hardened to keep emissions on time, in proportion and in budget, at any scroll velocity.

latency

Low-Latency Emission

Motion is detected and the emission scheduled within the same animation frame. Passive listeners and frame-aligned sampling keep your INP untouched.

emission timeline · last 32 eventslead time 5 ms
detection same framescheduling < 1 msclock Web Audio
gain

Dynamic Tonnage Calculation

Volume scales continuously with scroll velocity through a calibrated tonnage curve. Measured reading stays discreet; aggressive flicks are rendered at full amplitude.

  • 120 px/s18%
  • 640 px/s46%
  • 1.8k px/s74%
  • 4.2k px/s100%
consent

Consent First

No emission before an explicit user gesture, and silence for users who prefer reduced motion. Your visitors opt in; nobody is surprised.

  • before a gesturesilent
  • reduced motionsilent
  • user togglepersisted
bundle

Tree-shakable Odors

Each acoustic profile ships as an isolated ES module. Import only the emissions you need — everything else is eliminated at build time.

production bundle · gzip3.8 kB of 20.3 kB
  • odors/staccato2.1 kB
  • odors/sustained1.7 kB
  • odors/sopranoeliminated
  • odors/sforzandoeliminated
  • odors/cathedraleliminated
02 — API

One function. Total acoustic control.

Pue JS exposes a single, declarative entry point. Describe your acoustic profile once — pitch envelope, resonance, duration — and the runtime handles sampling, throttling and scheduling.

  • Fully typed

    Every option is inferred end-to-end. Invalid resonance curves fail at compile time, not in production.

  • Framework agnostic

    Bind to any scroll container, from the window to a single panel. Official React adapter, and plain lifecycle hooks everywhere else.

  • Observable

    Subscribe to emission events and pipe tonnage metrics straight into your telemetry stack.

Explore the API Reference
emitter.ts
TypeScript
import { createEmitter, presets } from "@puejs/core";import type { EmitterOptions } from "@puejs/core"; const options: EmitterOptions = {  preset: presets.organic,  pitch: { min: 0.82, max: 1.24 },  resonance: 0.65,  duration: 420,  throttle: "velocity",}; const emitter = createEmitter(document.documentElement, options); emitter.on("emit", ({ tonnage, latency }) => {  telemetry.track("acoustic_event", { tonnage, latency });});