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 🙏

© 2024 – Pkg Stats / Ryan Hefner

particle-ripple

v1.0.2

Published

Class based particle ripple animation for react applications

Downloads

1

Readme

Particle Ripple

This Component was created as visual representation of javascript class base data structures and Algorithism, and uses a constantly refreshing state during the animation and re-rendering particles with data manipulation. Do to the design CPU usage can be extremely heavy when particle density is increased: Represented as O(n^2).

This package includes a React Component ParticleRipple intended to be used as an animated background. This Componet uses a Class based ParticleGrid and Particle to create a ripple effect originating from the point of the initial click. The Component uses a <canvas> html element and is costumizable to users preferences.

To install:

npm install particle-ripple --save

Import into file:

import ParticleRipple from 'particle-ripple';

Using Particle Ripple:

  • ParticleRipple component must be contained within a container that has a position of relative, fixed, or absolute.

  • ParticleRipple is sized to 115% of parent element. Reccomended for parent element to have overflow hidden

<div style="position: relative; overflow: hidden;">
  <ParticleRipple />
</div>

Customizing

  • Particle ripple allows customization in many ways though props
< ParticleRipple
  colSpacing={ 50 }
  rowSpacing={ null }
  particleColor={ [249, 220, 34, .5] }
  particleColorFade={ null }
  rippleSpeed={ 100 }
  particleSpeed={ 15 }
  particleSpeedFunction={ null }
  particleRadiusMax={ 8 }
  particleRadiusFunction={ null }
  maxRadius={ 200 }
  maxRadiusFunction={ null }
  includeStatic={ true }
  staticParticleMaxRadius={ 2 }
  staticParticleColor={ [249, 220, 34, .3] }
/>
  • colSpacing: Width in px of each column of ParticleGrid.

  • rowSpacing: Width in px of each column of ParticleGrid. If left blank rowSpacing will default to be equal to colSpacing

  • particleColor: Color of animated particles. Takes and array of 3 to 4 numbers. The numbers should relate in order to a rgba color code with the final number defaulting to one if not provided.

const particleColor = [249, 220, 34, .5];
//color = rgba(249, 220, 34, .5)
const color = `rgba(${...particleColor})`
  • particleColorFade: Not currently Implemented.

  • rippleSpeed: time in milliseconds between ripple progressions.

  • particleSpeed: Rate at which the particle shrinks and is removed from the grid. Number is equal to the iterations before the particle is removed from grid.

  • particleSpeedFunction: Not currently Implemented.

  • particleRadiusMax: Max size in px of animated Particle

  • particleRadiusFunction: Not currently Implemented.

  • maxRadius: Max radius in grid spaces of the ripple.

  • maxRadiusFunction: Not currently Implemented.

  • includeStatic: If true a static grid will be created with the same dimensions as the dynamic grid.

  • staticParticleRadius Set particle radius of particles in static grid.

  • staticParticleColor Colour of static particles. Uses same input style as particleColor