@react-three/postprocessing 2.12.0 → 2.12.1
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 +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -511,8 +511,8 @@ const SSAO = React.forwardRef(function SSAO(props, ref) {
|
|
|
511
511
|
});
|
|
512
512
|
|
|
513
513
|
const N8AO = React.forwardRef((props, ref) => {
|
|
514
|
-
const { camera, scene
|
|
515
|
-
const effect = React.useMemo(() => new n8ao.N8AOPostPass(scene, camera
|
|
514
|
+
const { camera, scene } = fiber.useThree();
|
|
515
|
+
const effect = React.useMemo(() => new n8ao.N8AOPostPass(scene, camera), []);
|
|
516
516
|
React.useLayoutEffect(() => {
|
|
517
517
|
Object.assign(effect.configuration, props);
|
|
518
518
|
}, [props]);
|
package/dist/index.js
CHANGED
|
@@ -491,8 +491,8 @@ const SSAO = forwardRef(function SSAO(props, ref) {
|
|
|
491
491
|
});
|
|
492
492
|
|
|
493
493
|
const N8AO = forwardRef((props, ref) => {
|
|
494
|
-
const { camera, scene
|
|
495
|
-
const effect = useMemo(() => new N8AOPostPass(scene, camera
|
|
494
|
+
const { camera, scene } = useThree();
|
|
495
|
+
const effect = useMemo(() => new N8AOPostPass(scene, camera), []);
|
|
496
496
|
useLayoutEffect(() => {
|
|
497
497
|
Object.assign(effect.configuration, props);
|
|
498
498
|
}, [props]);
|