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

antigravity-particle

v1.1.1

Published

An open-source React component featuring the interactive jellyfish particle effect from the Google Antigravity landing page.

Downloads

414

Readme

antigravity-particle

A highly optimized, interactive WebGL particle swarm component for React, originally extracted from the Google Antigravity landing page.

This package provides a drop-in React component built on top of Three.js and React Three Fiber. It renders an interactive, jellyfish-like swarm of particles that gracefully follows the user's cursor with fluid dynamics and organic oscillation.

Installation

Install the package and its peer dependencies using your preferred package manager:

npm install antigravity-particle three @react-three/fiber

Basic Usage

Import the component and its stylesheet, then render it within a container that has a defined width and height.

import React from 'react';
import { Medusae } from 'antigravity-particle';
import 'antigravity-particle/medusae.css';

export default function App() {
  return (
    <div style={{ width: '100vw', height: '100vh', position: 'relative' }}>
      <Medusae />
    </div>
  );
}

Advanced Customization

The component exposes a config prop that accepts a deeply partial configuration object. This allows you to override any specific parameters without redefining the entire configuration.

import React from 'react';
import { Medusae, type MedusaeConfig } from 'antigravity-particle';
import 'antigravity-particle/medusae.css';

const customConfig: Partial<MedusaeConfig> = {
  particles: {
    colorBase: "#000000",
    colorOne: "#ff0000",
    colorTwo: "#00ff00",
    colorThree: "#0000ff",
    baseSize: 0.02,
  },
  cursor: {
    strength: 5,
    dragFactor: 0.02,
  },
  background: {
    color: "transparent",
  }
};

export default function CustomApp() {
  return (
    <div style={{ width: '100vw', height: '100vh' }}>
      <Medusae config={customConfig} />
    </div>
  );
}

API Reference

MedusaeConfig

The config prop accepts a DeepPartial<MedusaeConfig> object. Below are the default values and types for all available properties.

cursor

Configuration for cursor interaction physics.

  • radius (number): Interaction radius around the cursor. Default: 0.065
  • strength (number): Attraction/Repulsion strength. Default: 3
  • dragFactor (number): Speed at which particles follow the cursor. Default: 0.015

halo

Configuration for the macroscopic structure of the swarm.

  • outerOscFrequency (number): Frequency of the outer boundary oscillation. Default: 2.6
  • outerOscAmplitude (number): Amplitude of the outer boundary oscillation. Default: 0.76
  • outerOscJitterStrength (number): Jitter intensity of the outer boundary. Default: 0.025
  • outerOscJitterSpeed (number): Speed of the jitter effect. Default: 0.3
  • radiusBase (number): Base radius of the swarm halo. Default: 2.4
  • radiusAmplitude (number): Amplitude of the halo's breathing effect. Default: 0.5
  • shapeAmplitude (number): Amplitude of structural noise. Default: 0.75
  • rimWidth (number): Thickness of the active particle rim. Default: 1.8
  • outerStartOffset (number): Inner boundary offset for outer oscillation. Default: 0.4
  • outerEndOffset (number): Outer boundary offset for outer oscillation. Default: 2.2
  • scaleX (number): Horizontal scale factor of the halo. Default: 1.3
  • scaleY (number): Vertical scale factor of the halo. Default: 1

particles

Configuration for individual particles.

  • baseSize (number): Base size of dormant particles. Default: 0.016
  • activeSize (number): Size multiplier for active particles. Default: 0.044
  • blobScaleX (number): Horizontal stretch of individual particles. Default: 1
  • blobScaleY (number): Vertical stretch of individual particles. Default: 0.6
  • rotationSpeed (number): Speed of particle rotation. Default: 0.1
  • rotationJitter (number): Jitter applied to rotation. Default: 0.2
  • cursorFollowStrength (number): Strength of individual particle tracking. Default: 1
  • oscillationFactor (number): Speed of individual particle oscillation. Default: 1
  • colorBase (string): HEX color for dormant particles. Default: "#0000ff"
  • colorOne (string): Primary active HEX color. Default: "#4285f5"
  • colorTwo (string): Secondary active HEX color. Default: "#eb4236"
  • colorThree (string): Tertiary active HEX color. Default: "#faba03"

background

Configuration for the canvas background.

  • color (string): HEX color or "transparent". Default: "#ffffff"

License

MIT