Skip to content

mcwhittemore/glitch-image-tag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glitch Image Tag

Creates an <img> that has been glitched.

Install

npm install glitch-image-tag --save

Usage

<div id='main'></div>
var GlitchImage = require('glitch-image-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
}

About

Creates an <img> tag that will be glitched via byebyte

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published