
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
animated-color-trail
Advanced tools
A JavaScript package that creates a visually stunning trail effect that follows the mouse cursor.
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.
You can install the package using npm:
npm install animated-color-trail
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();
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'.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.This package is released under the MIT License.
FAQs
A JavaScript package that creates a visually stunning trail effect that follows the mouse cursor.
We found that animated-color-trail demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.