Coder Social home page Coder Social logo

particles.js's Introduction

particles.js

A lightweight JavaScript library for creating particles.

Load particles.js and configure the particles:

index.html

<div id="particles-js"></div>

<script src="particles.js"></script>

app.js

/* particlesJS('dom-id', params);
/* @dom-id : set the html tag id [string, optional, default value : particles-js]
/* @params: set the params [object, optional, default values : check particles.js] */

particlesJS('particles-js', {
	particles: {
	    color: '#fff',
	    shape: 'circle', // "circle", "edge" or "triangle"
		opacity: 0.5,
		size: 2,
		size_random: true,
		nb: 200,
		line_linked: {
			enable_auto: true,
			distance: 250,
			color: '#fff',
			opacity: 0.5,
			width: 1,
			condensed_mode: {
				enable: true,
				rotateX: 600,
				rotateY: 600
			}
		},
		anim: {
			enable: true,
			speed: 2
		}
	},
	interactivity: {
		enable: false,
		mouse: {
			distance: 250
		},
		detect_on: 'canvas', // "canvas" or "window"
		mode: 'grab'
	},
	/* Retina Display Support */
	retina_detect: false
});

Live Demo

CodePen demo

particles.js's People

Contributors

vincentgarreau avatar dipree avatar pborreli avatar victorbstan avatar xavhan avatar

Watchers

9629831527 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.