Nebula
Nebula is a lightweight (1kb compressed) JavaScript library that creates beautiful universe animations.
Including configurable Stars, Nebulas, Comets, Planets and Suns.
Nebula comes with a vanilla JS and a React wrapper.
Compatible with SSR
Installation
npm install @flodlc/nebula
usage
Vanilla JS
const element = document.getElementById("nebula-element");
const nebula = createNebula(element, {
starsCount: 250,
starsRotationSpeed: 3,
nebulasIntensity: 8,
...
});
// ... if needed:
nebula.destroy()">
import { createNebula } from "@flodlc/nebula"; <div id="nebula-element"></div> const element = document.getElementById("nebula-element"); const nebula = createNebula(element, { starsCount: 250, starsRotationSpeed: 3, nebulasIntensity: 8, ... }); // ... if needed: nebula.destroy()