image-glitch
v1.0.0
Published
Glitch images effect
Downloads
2
Readme
#AutoGlitch#
Package : com.danehansen.display Class : public class AutoGlitch Inheritance : AutoGlitch > Glitch > Object
Instances of this class will automatically glitch out a random amount for random amounts of times
##Public Properties##
- cleanTime : Number Maximum duration in milliseconds that the image will remain clean while activated.
- glitchTime : Number Maximum duration in milliseconds that the image will remain glitched while activated.
- fuckLimit : uint Maximum amount of fucked that the image will get while activated.
##Public Methods##
- AutoGlitch(element:Element, cleanTime:Number = 1500, glitchTime:Number = 100, fuckLimit:uint = 5) Creates an AutoGlitch object, using a provided image element or other element with a background-image applied.
- activate() Activates the instance, starts the glitching timeouts.
- deactivate() Deactivates the instance by killing the timeouts and returning the image to its clean state.
// example
import Glitch from 'image-glitch'
const image = new Glitch(document.getElementById('target'), 3000, 100, 26)
Credit
All code, ideas, and everything written by @danehansen. I just repackaged it and published to npm so I could use it.