1.0.0 • Published 8 years ago
glitch-image-tag v1.0.0
Glitch Image Tag
Creates an <img> that has been glitched.
Install
npm install glitch-img-tag --save
Usage
<div id='main'></div>var GlitchImage = require('glitch-img-tag');
var img = new GlitchImage('https://www.instagram.com/p/BEm1yKquZqk/media/?size=m')
var div = document.getElementById('main');
div.appendChild(img);API
var img = new GlitchImage(url[, opts]);
url is a url to an image.
opts is a config which will be pass directly to byebyte.
- opts.command must be either destroyorshuffle.
- opts.animate (optional). A boolean for if the image should be continually reglitched on animation frame. Default is true.
- please consult byebytefor command specific options
Default Opts
{ 
  command: 'destroy',
  min: .3,
  max: .8,
  animate: true
}1.0.0
8 years ago