Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
animated-color-trail
Advanced tools
Readme
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 healthy version release cadence and project activity because the last version was released less than 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.