@react-three/postprocessing 2.14.6 → 2.14.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -336,6 +336,11 @@ const Glitch = forwardRef(function Glitch2({ active = true, ...props }, ref) {
336
336
  effect.mode = active ? props.mode || GlitchMode.SPORADIC : GlitchMode.DISABLED;
337
337
  invalidate();
338
338
  }, [active, effect, invalidate, props.mode]);
339
+ useEffect(() => {
340
+ return () => {
341
+ effect.dispose();
342
+ };
343
+ }, [effect]);
339
344
  return /* @__PURE__ */ jsx("primitive", { ref, object: effect, dispose: null });
340
345
  });
341
346
  const GodRays = forwardRef(function GodRays2(props, ref) {