You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I disable the Glitch effect on user input via a checkbox?
Changing the active prop does not work even with a very minimal setup. Is there something I'm missing?
Indeed toggling active props does not take any effect.
Wrapping it e.g. {isActive && <Glitch active />} does work BUT i think this is the wrong approach (also, Safari lags every time it does get toggled on)
Here's a working example of toggling active / disabled Glitch. Note the glitch won't visually appear for 1.5s as this is the default min glitch delay.
[glitch,setGlitch]=useState(false);consttoggleGlitch=()=>setGlitch(!glitch);
...
<buttononClick={toggleGlitch}>{glitch ? "Disable Glitch" : "Enable Glitch"}</button>...<Glitchdelay={[1.5,3.5]}// min and max glitch delayduration={[0.6,1.0]}// min and max glitch durationstrength={[0.3,1.0]}// min and max glitch strengthactive={glitch}// turn on/off the effect (switches between "mode" prop and GlitchMode.DISABLED)ratio={0.85}// Threshold for strong glitches, 0 - no weak glitches, 1 - no strong glitches./>
How can I disable the Glitch effect on user input via a checkbox?
Changing the
active
prop does not work even with a very minimal setup. Is there something I'm missing?The text was updated successfully, but these errors were encountered: