Glassy worms
Beautiful worms on background.
Install
NPM:
npm install glassy-wormsBower:
bower install glassy-wormsReleases: all
Usage
Requires jQuery (>1.6) and Sketch.js
Default usage
$('body').glassyWorms();With options
$('body').glassyWorms({ colors: ['#000', '#f00'], numParticles: 800 });Options
number,"auto"numParticles β Nums of worms on element. Default:"auto"numbertailLength β Worm's tail length. Default:12numbermaxForce β Moving force. Default:8numberfriction β Frictions. Default:0.75numbergravity β Gravity. Default:9.81numberinterval β Moving speed. Default:3arraycolors β Array of worm's colors. Default:["#fff"]HTML objectelement β Element for animating. Default:<canvas/>stringclassName β Classname of animating element. Replaces element option, complements id optionstringid β ID of animating element. Replaces element option, complements className optionbooleanuseStyles β Flag for using default styles for animating element. Default:true
Default styles
position: absolute; top: 0; bottom: 0; right: 0; left: 0;Methods
$('body').glassyWorms('destroy');- stop β Stops animating
- start β Resume animating
- clear βΒ Clear screen
- destroy β Remove worms