Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

glitch-image-tag

mcwhittemore6MIT1.0.0

glitch an tag

glitch, html, img, byte, swap

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 or shuffle.
  • 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
}