Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@devil7softwares/react-drifter-stars

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devil7softwares/react-drifter-stars

React version of Drifter Stars by Cory Hughart

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Drifter Stars build npm license min minzip

Drifter Stars by @cr0ybot ported to React with Typescript support

Demo

View Demos @ Storybook

Quick Start

  1. Install package from NPM npm install @devil7softwares/react-drifter-stars
  2. Import drifter stars in your component import DrifterStars from '@devil7softwares/react-drifter-stars'
  3. Add component to your JSX/TSX <DrifterStars />
  4. Import default stylesheet from package for default background. Or use your own css. import '@devil7softwares/react-drifter-stars/dist/styles.css'

Note: The component is transparent by default and takes full width and height of window. And can be used with your existing background.

Options

NOTE: All of the options below are optional.

PropTypeDescription
colorstringColor of particles, flare & lines.
renderMeshbooleanSpecifies whether mesh should be rendered.
blurSizenumberSize of blur for overall canvas.
particleIParticleOptionsParticle related options.
flareIFlareOptionsParticle flare options.
glareIGlareOptionsGlare related options.
linksILinkOptionsLink generation options.
motionIMotionOptionsMotion/movement options.

IParticleOptions

PropTypeDescription
renderbooleanSpecifies whether particles should be rendered.
countnumberCount of the particles to generate.\nNOTE: Particles will be generated even if its not going to be rendered)
sizeBasenumberBase size for particles. Size of particle will be calculated as "Z-Axis x Multiplier + Base".
sizeMultipliernumberMultiplier for particle size calculation. Size of particle will be calculated as "Z-Axis x Multiplier + Base".
flickerSmoothingnumberAmount of smoothing to apply on flickering. Higher Value = Smoother Flicker.

IFlareOptions

PropTypeDescription
renderbooleanSpecifies whether flares should be rendered.
countnumberCount of the flares to render.
sizeBasenumberBase size for flare. Size of flare will be calculated as "Z-Axis x Multiplier + Base".
sizeMultipliernumberMultiplier for flare size calculation. Size of flare will be calculated as "Z-Axis x Multiplier + Base".

IGlareOptions

PropTypeDescription
renderbooleanSpecifies whether particle glare should be rendered.
anglenumberAngle for glare to generate.
opacityMultipliernumberGlare opacity multiplier.

ILinkOptions

PropTypeDescription
renderbooleanSpecifies whether links should be rendered.
lineWidthnumberWidth of link line to generate.
opacitynumberOpactity for link line. A number between 0 & 1.
chancenumberProbability for a new line to appear per frame. Higher Value = Smaller Chance.
fadenumberNumber of frames for link to fade-out.
speednumberDistance a link travels in 1 frame.
minLengthnumberMinimum number of particles to link when a new line is generated.
maxLengthnumberMaximum number of particles to link when a new line is generated.

IMotionOptions

PropTypeDescription
enabledbooleanEnables/disables moving animation of particles.
rationumberAmount of motion to be generated. Default is 0.05.
Used to generate motion based on mouse movement/device orientation changes.
randomMotionbooleanEnables random motions even without user interation.
noiseLengthnumberLength of noice for random motion.
noiseStrengthnumberStrength of noice for random motion.

Credits

  • Cory Hughart (@cr0ybot) - For original Drifter Stars animation.
  • Steve Courtney - For Celsius GS's Drifter poster art

Keywords

FAQs

Package last updated on 23 Nov 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc