@react-three/postprocessing 2.14.6 → 2.14.8
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/effects/N8AO.d.ts +1 -0
- package/dist/index.cjs +20 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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) {
|
|
@@ -1684,7 +1689,8 @@ const N8AO = forwardRef(
|
|
|
1684
1689
|
denoiseRadius = 12,
|
|
1685
1690
|
distanceFalloff = 1,
|
|
1686
1691
|
intensity = 1,
|
|
1687
|
-
color
|
|
1692
|
+
color,
|
|
1693
|
+
renderMode = 0
|
|
1688
1694
|
}, ref) => {
|
|
1689
1695
|
const { camera, scene } = useThree();
|
|
1690
1696
|
const effect = useMemo(() => new $87431ee93b037844$export$2489f9981ab0fa82(scene, camera), []);
|
|
@@ -1697,9 +1703,20 @@ const N8AO = forwardRef(
|
|
|
1697
1703
|
aoSamples,
|
|
1698
1704
|
denoiseSamples,
|
|
1699
1705
|
denoiseRadius,
|
|
1700
|
-
screenSpaceRadius
|
|
1706
|
+
screenSpaceRadius,
|
|
1707
|
+
renderMode
|
|
1701
1708
|
});
|
|
1702
|
-
}, [
|
|
1709
|
+
}, [
|
|
1710
|
+
screenSpaceRadius,
|
|
1711
|
+
color,
|
|
1712
|
+
aoRadius,
|
|
1713
|
+
distanceFalloff,
|
|
1714
|
+
intensity,
|
|
1715
|
+
aoSamples,
|
|
1716
|
+
denoiseSamples,
|
|
1717
|
+
denoiseRadius,
|
|
1718
|
+
renderMode
|
|
1719
|
+
]);
|
|
1703
1720
|
useLayoutEffect(() => {
|
|
1704
1721
|
if (quality)
|
|
1705
1722
|
effect.setQualityMode(quality.charAt(0).toUpperCase() + quality.slice(1));
|