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

animated-color-trail

v0.0.1

Published

A JavaScript package that creates a visually stunning trail effect that follows the mouse cursor.

Downloads

2

Readme

Animated Color Trail

Animated Color Trail is a JavaScript package that creates a visually stunning trail effect that follows the mouse cursor. It combines the functionality of the mouse-trail-effect and color-palette-creator packages to generate a colorful and animated trail based on various color palette options.

Installation

You can install the package using npm:

npm install animated-color-trail

Usage

To use the Animated Color Trail package, you can import it into your JavaScript file and create an instance of the trail effect:

const createAnimatedColorTrail = require('animated-color-trail');

const options = {
  trailLength: 15,
  trailSize: 30,
  trailDuration: 600,
  colorPalette: 'complementary',
  colorCount: 7,
  colorSeed: 'myCustomSeed',
  trailEffect: 'sparkle',
  trailShape: 'square',
  fps: 30,
  easing: 'easeOutQuart',
};

const colorTrail = createAnimatedColorTrail(options);
colorTrail.start();

Options

The createAnimatedColorTrail function accepts an optional options object with the following properties:

  • trailLength (number, default: 10): The number of trail elements.
  • trailSize (number, default: 20): The size of each trail element in pixels.
  • trailDuration (number, default: 500): The duration of the trail animation in milliseconds.
  • colorPalette (string, default: 'monochromatic'): The color palette to use for the trail. Available options are: 'monochromatic', 'complementary', 'splitComplementary', 'triadic', 'tetradic', 'analogous', 'shades', 'tints'.
  • colorCount (number, default: 5): The number of colors to generate in the color palette.
  • colorSeed (string, default: null): A custom seed value for generating consistent color palettes.
  • trailEffect (string, default: 'gradient'): The visual effect of the trail. Available options are: 'gradient', 'sparkle'.
  • trailShape (string, default: 'circle'): The shape of each trail element. Available options are: 'circle', 'square'.
  • fps (number, default: 60): The frames per second of the trail animation.
  • easing (string, default: 'easeInOutQuad'): The easing function for the trail animation. Available options are: 'linear', 'easeInQuad', 'easeOutQuad', 'easeInOutQuad', 'easeInCubic', 'easeOutCubic', 'easeInOutCubic', 'easeInQuart', 'easeOutQuart', 'easeInOutQuart'.

Methods

The createAnimatedColorTrail function returns an object with the following methods:

  • start(): Starts the animated color trail effect.
  • stop(): Stops the animated color trail effect.
  • setTrailLength(length): Sets the trail length dynamically.
  • setTrailSize(size): Sets the trail size dynamically.
  • setTrailDuration(duration): Sets the trail duration dynamically.
  • setTrailEffect(effect): Sets the trail effect dynamically.
  • setTrailShape(shape): Sets the trail shape dynamically.
  • setFps(fps): Sets the frames per second dynamically.
  • setEasing(easing): Sets the easing function dynamically.

License

This package is released under the MIT License.