Skip to content

Is there a way to remove the glitch from an element? I'm facing breaking issues with my project. #24

Answered by 7PH
Ashlc asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there @Ashlc , there are a few things to consider here:

  1. You are not supposed to call PowerGlitch.glitch(..) multiple times, in general - I think that's what's causing the error here

  2. In your case, as you are using iterations: 1, calling startGlitch(..) will only play the animation once, so there's no need to call stopGlitch(..)

  3. (General advice) You should restrict to glitching small elements, because glitching relies on cloning DOM nodes. If you are trying to glitch the whole <body />, I expect you'll encounter visual artefacts at best, errors at worst, especially if used with a framework

  4. Since you are using React, you should probably take a look at the React wrapper, react-pow…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Ashlc
Comment options

@7PH
Comment options

Answer selected by Ashlc
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants