v2.0.0
🔥 Release preview
New major version to support glitching any DOM element, add animation control callbacks, click
play mode, add jest testing with >99%
statement coverage and improve documentation/playground.
🚀 Features
- Made possible to glitch any DOM element (image, button, div containing anything, etc).
- Made
PowerGlitch.glitch()
return{ containers, startGlitch, stopGlitch }
containers
: Containers for each glitched element.startGlitch()
: Manually start the glitch.stopGlitch()
: Manually stop the glitch.
- Removed
hover-triggered
play mode for simplicity and symmetry withclick
, since the effect could be achieved with animation control callbacks. - Added
click
play mode. - Added
manual
play mode (never plays until the animation control callbacks are called). - Added support for switching play modes in playground.
- Added support for passing a
NodeList
(result from querySelectorAll) as the elements to glitch inPowerGlitch.glitch()
- Added support for passing an array of
HTMLElement
as the elements to glitch inPowerGlitch.glitch()
- Improved homepage to add examples reflecting the new features
🤔 Changes
- Updated documentation and playground to reflect the new changes.
- Removed
imageUrl
option, replaced withhtml
and now accepts any valid html string.
💻 Code quality
- Added
jest
testing with>99%
statement coverage.
🐞 Bug fixes
N/A