The primary way to use PowerGlitch is by calling PowerGlitch.glitch(). This function accepts a selector or element and an optional configuration object to apply glitch animations to one or more DOM elements.
Parameters:
elOrSelector: A CSS selector string, a single HTMLElement, a NodeList, or an Array<HTMLElement>.userOptions: A GlitchPartialOptions object to customize the animation.
Returns:
A GlitchResult object containing:
containers: An array of HTMLDivElement containers created for each glitched element.startGlitch: A function to force-start the animation (overriding the playMode).stopGlitch: A function to force-stop the animation.
Note on SEO: If optimizeSeo is true (default), the effect is automatically disabled if the user agent is detected as a crawler (e.g., Googlebot).