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

@gogospace/burn-in

v0.1.2

Published

Configurable fire and smoke burn-in effects for DOM elements, images, canvas, and Vue.

Readme

Burn-In.js

Burn-In.js is a small canvas engine for burning DOM elements into view with configurable fire, smoke, masks, timing, and presets.

It ships as a framework-neutral core with an optional Vue 3 adapter.

Live demo: burn-in.gogospace.cz

npm install @gogospace/burn-in

Quick Start

import { burn } from "@gogospace/burn-in";

const element = document.querySelector(".logo");

if (element instanceof HTMLElement) {
  burn(element, {
    preset: "ritual",
    fire: { intensity: 1.2 },
    smoke: { intensity: 0.8 },
    seed: "launch"
  });
}

Vue

<script setup>
import { ref } from "vue";
import { BurnIn } from "@gogospace/burn-in/vue";

const replayKey = ref(0);
</script>

<template>
  <button type="button" @click="replayKey++">Replay</button>

  <BurnIn
    active
    :replay-key="replayKey"
    :options="{ preset: 'smolder', mask: { source: 'text' }, smoke: { intensity: 1.4 } }"
  >
    <strong>Burn me in</strong>
  </BurnIn>

  <BurnIn
    active
    target-selector="img"
    :replay-key="replayKey"
    :options="{ mask: { source: 'alpha' } }"
  >
    <img src="/logo.png" alt="Logo" />
  </BurnIn>
</template>

Configuration

Burn-In.js keeps the easy path short and the expert path deep. Start with a preset and override only what you need.

burn(element, {
  preset: "wildfire",
  seed: "same-effect-every-time",
  timing: {
    delayMs: 420,
    igniteMs: 420,
    burnMs: 1000,
    fadeMs: 900,
    smokeMs: 2600
  },
  fire: {
    intensity: 1.4,
    lift: 0.014,
    spread: 0.56,
    turbulence: 0.04,
    particleSize: [10, 30],
    colors: [
      { at: 0, color: "rgba(255,255,230,0.42)" },
      { at: 0.24, color: "rgba(255,180,50,0.28)" },
      { at: 0.62, color: "rgba(255,60,10,0.14)" },
      { at: 1, color: "rgba(0,0,0,0)" }
    ]
  },
  smoke: {
    intensity: 0.9,
    drift: 0.6,
    expansion: 2,
    particleLife: [72, 140]
  },
  reveal: {
    startsAt: "burn",
    durationMs: 980
  }
});

seed controls the random particle pattern. Use a stable string or number when you want the same element and options to replay with the same fire and smoke behavior. Omit it when every burn should feel slightly different.

Presets

  • soft - default profile matching the original Burn concept timing and density
  • wildfire - stronger fire and dense smoke
  • smolder - slower reveal with long smoke
  • flash - short, bright ignition
  • ritual - warmer fire with a slightly theatrical smoke profile
  • psycho - saturated color, heavy turbulence, and long colored smoke

Masks

Images and canvas elements can use pixel data automatically. Text elements can use a generated alpha mask while staying real selectable DOM text. Generic DOM elements use their bounds, which means any element can be burned into view without extra dependencies.

burn(imageElement, {
  mask: {
    source: "alpha",
    alphaThreshold: 150,
    stepPx: 3
  }
});
burn(headingElement, {
  mask: {
    source: "text",
    offset: {
      y: 6
    }
  }
});

Text masks are useful for headings, spans, paragraphs, and other real DOM text. The effect uses an internal alpha mask for the fire and smoke, while the original text remains selectable and accessible after reveal.

Use mask.offset.x and mask.offset.y to fine-tune emitter alignment. Positive y moves the burn mask downward, which can make rising fire and smoke feel more natural over text.

Supported mask sources:

  • auto
  • alpha
  • luminance
  • bounds
  • text

Browser Notes

  • The effect requires Canvas 2D and requestAnimationFrame.
  • Reading pixels from cross-origin images needs valid CORS headers.
  • For accessibility, applications should avoid autoplaying heavy effects when prefers-reduced-motion is active.

Local Development

npm install
npm run dev
npm test
npm run build

The demo runs through Vite on port 5177.

License

MIT