New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rodikh/particle-lines

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rodikh/particle-lines

particle-lines ============== Inspired by Topaz's Particle Lines http://www.topaz1008.com/

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

particle-lines

Inspired by Topaz's Particle Lines http://www.topaz1008.com/

Particle Lines is an interactive animation built with using HTML5 Canvas and no other third party runtime libraries.

It implements a particle engine that creates random moving particles, and draws colorful lines between close neighbours.

It is enclosed in a module for easy usage within any HTML.

Usage

Instantiate the ParticleLines class and pass a canvas element to it's constructor.

<body>
    <canvas id="main"></canvas>

    <script type="module">
        import ParticleLines from 'particle-lines'
    
        const canvas = document.getElementById('main');
        new ParticleLines(canvas, {particlesAmount: 100, maxDistance: 150});
    </script>
</body>

Options

You can pass an options object to the constructor:

OptionDescriptionDefault Value
maxDistanceDetermines the maximum distance between two particles to draw a line between.150
maxVelocityThe maximum velocity in px/frame for randomly spawned particles.1
particlesAmountThe amount of particles to spawn.100
fpsFrames per second for the particle engine and rendering loop.60

FAQs

Package last updated on 15 Jun 2021

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