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

react-mesmerizing

v1.0.2

Published

React library with mesmerizing components including BallEscapeCanvas - interactive animation with rotating rings and bouncing ball. Features customizable colors, backgrounds, and themes.

Downloads

8

Readme

React Mesmerizing

A collection of mesmerizing React components for creating engaging user experiences.

🌐 Live Demo & Documentation

Components

BallEscapeCanvas

An interactive animation with rotating rings and a bouncing ball. The goal is to destroy all rings by passing through their gaps. Features include:

  • Configurable ring count, speed, and colors
  • Automatic game restart
  • Customizable background and ball colors
  • Event callbacks for game state changes

RockPaperScissors

An interactive Rock Paper Scissors game with multiple rule sets and animated gameplay. Features include:

  • Multiple Rule Sets: Classic RPS, Lizard-Spock, RPS-7, Fire-Tree-Water, 5 Elements, and more
  • Animated Gameplay: Pieces automatically chase targets and avoid weaknesses
  • Kill Feed: Real-time display of eliminations
  • Score Tracking: Live count of remaining pieces for each type
  • Automatic Restart: Games automatically restart after completion
  • Customizable: Adjustable speed, piece count, canvas size, and colors

Rule Sets

  1. 🦎🖖 Lizard-Spock Expansion - Extended 5-element version
  2. 🧱📄✂️ Classic Rock, Paper, Scissors - Traditional 3-element game
  3. 🔥💨🧽🌊 RPS-7 - Complex 7-element version with intricate relationships
  4. 🔥🌳💧 Fire, Tree, Water - Simple 3-element cycle
  5. 🌎 5 Elements - Traditional Chinese elements with complex interactions
  6. 💑 Boys Chase Girls - Simple 2-element chase game

Game Mechanics

  • Each piece type has specific targets it can eliminate
  • Pieces automatically move toward their closest target
  • When no targets are available, pieces run away from their weaknesses
  • Collision detection eliminates defeated pieces
  • Game continues until only one piece type remains
  • Winner is automatically determined and displayed

Installation

npm install react-mesmerizing

Usage

BallEscapeCanvas

import { BallEscapeCanvas } from 'react-mesmerizing';

function App() {
  return (
    <BallEscapeCanvas
      ringCount={5}
      width={600}
      height={600}
      gameSpeed={1.0}
      onGameComplete={() => console.log('Game completed!')}
    />
  );
}

RockPaperScissors

import { RockPaperScissors } from 'react-mesmerizing';

function App() {
  return (
    <RockPaperScissors
      width={800}
      height={600}
      pieceCount={90}
      speed={3}
      ruleSetId={2} // Classic Rock Paper Scissors
      onGameComplete={(winner) => console.log(`${winner} wins!`)}
      onPieceEliminated={(winner, loser) => console.log(`${winner} eliminated ${loser}`)}
    />
  );
}

Props

BallEscapeCanvas Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | ringCount | number | 5 | Number of rotating rings | | width | number | 600 | Canvas width | | height | number | 600 | Canvas height | | gameSpeed | number | 1.0 | Game speed multiplier | | autoRestartDelay | number | 3000 | Auto restart delay in ms | | backgroundColor | string | "#0a0a0a" | Background color | | ballColor | string | "#ffffff" | Ball color | | ringColors | string[] | undefined | Array of ring colors | | onGameComplete | () => void | undefined | Game completion callback | | onGameStart | () => void | undefined | Game start callback |

RockPaperScissors Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | width | number | 800 | Canvas width | | height | number | 600 | Canvas height |

| speed | number | 1.5 | Movement speed of pieces (lower values = smoother movement) | | touchDistance | number | 3 | Collision detection distance | | pieceCount | number | 90 | Number of game pieces | | autoRestartDelay | number | 5000 | Auto restart delay in ms | | backgroundColor | string | "#888" | Background color | | ruleSetId | number | 1 | Rule set ID (1=Lizard-Spock, 2=Classic RPS, 3=RPS-7, 4=Fire-Tree-Water, 5=5 Elements, 6=Boys Chase Girls) | | onGameStart | () => void | undefined | Game start callback | | onGameComplete | () => void | undefined | Game completion callback | | onPieceEliminated | (winner: string, loser: string) => void | undefined | Piece elimination callback |

Development

Running Tests

npm test

Running Storybook

npm run storybook

Building

npm run build

License

MIT