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

@zakkster/lite-fx

v1.0.3

Published

Complete web VFX engine — deterministic, zero-GC, OKLCH-native particles with force fields, emitter shapes, and preset recipes.

Downloads

454

Readme

@zakkster/lite-fx

npm version npm bundle size npm downloads npm total downloads TypeScript License: MIT

A complete web VFX engine. Deterministic, zero-GC, OKLCH-native particle effects with force fields, emitter shapes, and frozen recipe presets.

The fastest CPU-based deterministic particle engine in JavaScript.

🎬 Live Demo (FXSystem)

https://codepen.io/Zahari-Shinikchiev/debug/QwKpgpg

Why This Library?

| Feature | LiteFX | pixi.js | GSAP | anime.js | |---|---|---|---|---| | Deterministic | Yes | No | No | No | | Zero-GC | Yes | No | No | No | | OKLCH Color | Yes | No | No | No | | SoA Memory Layout | Yes | No | No | No | | Replay-Safe | Yes | No | No | No | | Custom Physics | Yes | Limited | Limited | Limited | | Canvas2D Performance | Excellent | Good | Medium | Medium |

Most particle libraries are object-based (slow), non-deterministic, GC-heavy, not replay-safe, and not color-correct. LiteFX is the opposite.

Performance

Particle Engine Throughput (100,000 particles)

| Engine / Library | Allocs/Frame | Avg Frame (ms) | GC Events (10s) | Deterministic | |---|---|---|---|---| | LiteFX (SoA Core) | 0 | 1.2 | 0 | Yes | | pixi-particles | ~3,000 | 4.8 | 2–3 | No | | tsparticles | ~5,000 | 7.2 | 4–6 | No | | Vanilla OOP | ~100,000 | 12–20 | 10+ | No | | three.js GPU | 0 | 0.8 | 0 | No |

Force Field Cost (100,000 particles, 60 FPS)

| Force Field | Avg Cost (ms) | Allocations | |---|---|---| | Wind | 0.15 | 0 | | DragField | 0.10 | 0 | | GravityWell | 0.32 | 0 | | Vortex | 0.40 | 0 | | Turbulence | 0.55 | 0 |

Full Pipeline (10,000 particles, 3 forces, Canvas2D)

| Stage | Avg Cost (ms) | |---|---| | Force Fields | 0.9 | | Physics Integration | 0.6 | | Rendering | 1.1 | | Total | 2.6 |

Installation

npm install @zakkster/lite-fx

Quick Start

import { FXSystem, Presets } from '@zakkster/lite-fx';

const ctx = canvas.getContext('2d');
const fx = new FXSystem(ctx, { maxParticles: 5000, seed: 42 });

const fire = fx.register(Presets.fire);
const sparks = fx.register(Presets.sparks);

fx.start();

canvas.addEventListener('click', (e) => {
    fx.spawn(e.offsetX, e.offsetY, fire);
    fx.spawn(e.offsetX, e.offsetY, sparks);
});

Recipes

One-Liner Burst

// Register + spawn in one call
fx.burst(x, y, Presets.explosion);

Force Fields

import { FXSystem, Wind, GravityWell, Vortex, Turbulence, DragField, Presets } from '@zakkster/lite-fx';

fx.addForce(new Wind(50, 0));                          // rightward breeze
fx.addForce(new GravityWell(400, 300, 500, 200));      // attractor
fx.addForce(new Vortex(400, 300, 300, 50));            // spinning vortex
fx.addForce(new Turbulence(100, 0.01, 1));             // organic motion
const removeDrag = fx.addForce(new DragField(0.95));   // air resistance

removeDrag(); // disposer removes the force

Emitter Shapes

import { EmitterShape } from '@zakkster/lite-fx';

fx.spawn(x, y, fire, { shape: (rng) => EmitterShape.circle(30, rng) });
fx.spawn(x, y, sparks, { shape: (rng) => EmitterShape.ring(50, rng) });
fx.spawn(x, y, smoke, { shape: (rng) => EmitterShape.line(200, rng) });
fx.spawn(x, y, confetti, { shape: (rng) => EmitterShape.rect(300, 100, rng) });

Debug Mode

const fx = new FXSystem(ctx, { debug: true });
// Shows particle count and force field radii

Deterministic Replay

fx.resetSeed(42);  // same seed = same visual result
fx.burst(400, 300, Presets.explosion);

Available Presets

Presets.fire, Presets.smoke, Presets.sparks, Presets.explosion, Presets.magic, Presets.rain, Presets.snow, Presets.confetti

License

MIT