πŸ”” Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Glassy Worms is a fancy jQuery plugin that adds worms crawling effects on your background using Html5 canvas element.

background Canvas

Documentation

Glassy worms

Beautiful worms on background.

Demo

Install

NPM:

npm install glassy-worms

Bower:

bower install glassy-worms

Files: dev, min

Releases: 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"
  • number tailLength β€” Worm's tail length. Default: 12
  • number maxForce β€” Moving force. Default: 8
  • number friction β€” Frictions. Default: 0.75
  • number gravity β€” Gravity. Default: 9.81
  • number interval β€” Moving speed. Default: 3
  • array colors β€” Array of worm's colors. Default: ["#fff"]
  • HTML object element β€” Element for animating. Default: <canvas/>
  • string className β€” Classname of animating element. Replaces element option, complements id option
  • string id β€” ID of animating element. Replaces element option, complements className option
  • boolean useStyles β€” 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

You May Also Like