Giter Club home page Giter Club logo

particles's Introduction

Spark Particles

version license language issues npm downloads npm min bundle size npm minzip bundle size

Lightweight and fast Particle library written in JavaScript

Zero Dependencies!

Basic example

Installation

  1. npm i spark-particles --save
  2. Done!

Usage

See Basic example

import Particles from 'spark-particles'

const canvas = document.getElementById('particles')

const settings = {
  debug: false, // boolean
  resize: true, // boolean
  particles: {
    amount: 250, // number
    moveDirection: 'random', // 'random' | 'top'  | 'right'  | 'bottom'  | 'left'
    distanceToLink: 150, // number
    linkedParticles: true, // boolean
    maxVelocity: 0.8, // number
    maxRadius: 4, // number
  },
  renderer: {
    transparentBackground: false, // boolean
    backgroundColor: '#186cb6', // color
    linearGradient: {
      x1: 0, // number
      y1: 0, // number
      x2: 1, // number
      y2: 1, // number
      color1: '#327fc2', // color
      color2: '#014987', // color
    },
    width: window.innerWidth, // number
    height: window.innerHeight, // number
  },
}

new Particles(canvas).init(settings).start()

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

1.2.0 New grid structure & optimization

1.0.0 Release

License

MIT

particles's People

Contributors

yuryscript avatar dependabot-preview[bot] avatar dependabot[bot] avatar natriks avatar

Stargazers

 avatar Polupan Anastasia avatar mia avatar Igor Omelchenko avatar Anatoliy B avatar Rustem Feyzkhanov avatar Konstantin Taranov avatar Kirill Snezhko avatar Rail avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.