@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/effects/N8AO.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ type N8AOProps = {
|
|
|
10
10
|
denoiseRadius?: number;
|
|
11
11
|
color?: ReactThreeFiber.Color;
|
|
12
12
|
screenSpaceRadius?: boolean;
|
|
13
|
+
renderMode?: 0 | 1 | 2 | 3 | 4;
|
|
13
14
|
};
|
|
14
15
|
export declare const N8AO: import("react").ForwardRefExoticComponent<N8AOProps & import("react").RefAttributes<N8AOPostPass>>;
|
|
15
16
|
export {};
|
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) {
|
|
@@ -1702,7 +1707,8 @@ const N8AO = React.forwardRef(
|
|
|
1702
1707
|
denoiseRadius = 12,
|
|
1703
1708
|
distanceFalloff = 1,
|
|
1704
1709
|
intensity = 1,
|
|
1705
|
-
color
|
|
1710
|
+
color,
|
|
1711
|
+
renderMode = 0
|
|
1706
1712
|
}, ref) => {
|
|
1707
1713
|
const { camera, scene } = fiber.useThree();
|
|
1708
1714
|
const effect = React.useMemo(() => new $87431ee93b037844$export$2489f9981ab0fa82(scene, camera), []);
|
|
@@ -1715,9 +1721,20 @@ const N8AO = React.forwardRef(
|
|
|
1715
1721
|
aoSamples,
|
|
1716
1722
|
denoiseSamples,
|
|
1717
1723
|
denoiseRadius,
|
|
1718
|
-
screenSpaceRadius
|
|
1724
|
+
screenSpaceRadius,
|
|
1725
|
+
renderMode
|
|
1719
1726
|
});
|
|
1720
|
-
}, [
|
|
1727
|
+
}, [
|
|
1728
|
+
screenSpaceRadius,
|
|
1729
|
+
color,
|
|
1730
|
+
aoRadius,
|
|
1731
|
+
distanceFalloff,
|
|
1732
|
+
intensity,
|
|
1733
|
+
aoSamples,
|
|
1734
|
+
denoiseSamples,
|
|
1735
|
+
denoiseRadius,
|
|
1736
|
+
renderMode
|
|
1737
|
+
]);
|
|
1721
1738
|
React.useLayoutEffect(() => {
|
|
1722
1739
|
if (quality)
|
|
1723
1740
|
effect.setQualityMode(quality.charAt(0).toUpperCase() + quality.slice(1));
|