Skip to content

v2.0.0

Compare
Choose a tag to compare
@7PH 7PH released this 07 Sep 23:47
· 43 commits to master since this release
1a766fd

🔥 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 with click, 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 in PowerGlitch.glitch()
  • Added support for passing an array of HTMLElement as the elements to glitch in PowerGlitch.glitch()
  • Improved homepage to add examples reflecting the new features

🤔 Changes

  • Updated documentation and playground to reflect the new changes.
  • Removed imageUrl option, replaced with html and now accepts any valid html string.

💻 Code quality

  • Added jest testing with >99% statement coverage.

🐞 Bug fixes

N/A