0.1.8 • Published 8 years ago

floating-delaunay-polygons v0.1.8

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Floating Delaunay Polygons


Floating Polygon Animation.

Install

npm install floating-delaunay-polygons

Usage

import FloatingDelaunayPolygons from 'floating-delaunay-polygons';

// canvas element required
var canvas = document.getElementById("my_canvas");

// optional colors (defaults to balack and gray)
var colors = ['#000000', '#dddddd', '#888888'];

// optional size of polygons (can be int or string such as '250px' or '20%')
var size = 250;

var floatingDelaunayPolygons = new FloatingDelaunayPolygons(canvas, colors, size);

Start the Animation

//start the animation
floatingDelaunayPolygons.start();

Add an Optional Background Image

var src = "/assets/my-image.jpg";

// optional callback for loaded event
var onLoadedCallback = function(){ doSomething(); };

floatingDelaunayPolygons.loadBgImage(src, onLoadedCallback);

Clear All

floatingDelaunayPolygons.clear();
0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago