Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

StainedGlass

Awesome stained pictures are no more exclusivity of church.

For a nice replacement, ensure that you have no particular styles on the img element, or apply the same to .stained-glass.

  new StainedGlass(HTMLImageElement, [options]);

options:

  • deviation: irregularity of the shapes (default 0.2)
  • polygons: number of created polygons (default 100)
  • stroke: default same as the fill color
  • strokeWidth: (default 1.51)
  • triangles: generate Delaunay vertices instead of Voronoï (default false)
  • animated: animate the color of the shapes by selecting colors using original image's point randomly around the original point (default false)
  • animationDuration: transition time between colors, in ms (default 2000)
  • followCursor: animate colors by projecting position of the cursor relatively to the image

About

Awesome stained pictures are no more exclusivity of church

Resources

Packages

No packages published
You can’t perform that action at this time.