# StainedGlass

The church has no more exclusivity on them.

### Apply StainedGlass to a picture

    new StainedGlass(document.getElementById('example-1'));

### Add more/less granularity

    new StainedGlass(document.getElementById('example-2'), {
      polygons: 300 // default: 100
    });

### Play with regularity

    new StainedGlass(document.getElementById('example-3'), {
      deviation: 1 // default: 0.2
    });

    new StainedGlass(document.getElementById('example-3b'), {
      deviation: 0 // default: 0.2
    });

### Add borders

    new StainedGlass(document.getElementById('example-4'), {
      stroke: 'black', // uses the color of the shaped by default
      strokeWidth: 3 // default: 1.52
    });

### Triangles

    new StainedGlass(document.getElementById('example-5'), {
      triangles: true
    });

### Animate

    new StainedGlass(document.getElementById('example-6'), {
      polygons: 500,
      triangles: true,
      animated: true
    });

Requires d3.js

@davinov, from Toucan Toco

Inspired by Trianglify