glitch-image-tag
v1.0.0
Published
glitch an <img> tag
Downloads
8
Readme
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
destroy
orshuffle
. - opts.animate (optional). A boolean for if the image should be continually reglitched on animation frame. Default is true.
- please consult
byebyte
for command specific options
Default Opts
{
command: 'destroy',
min: .3,
max: .8,
animate: true
}