@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.cjs CHANGED
@@ -354,6 +354,11 @@ const Glitch = React.forwardRef(function Glitch2({ active = true, ...props }, re
354
354
  effect.mode = active ? props.mode || postprocessing.GlitchMode.SPORADIC : postprocessing.GlitchMode.DISABLED;
355
355
  invalidate();
356
356
  }, [active, effect, invalidate, props.mode]);
357
+ React.useEffect(() => {
358
+ return () => {
359
+ effect.dispose();
360
+ };
361
+ }, [effect]);
357
362
  return /* @__PURE__ */ jsxRuntime.jsx("primitive", { ref, object: effect, dispose: null });
358
363
  });
359
364
  const GodRays = React.forwardRef(function GodRays2(props, ref) {