@react-three/postprocessing 2.3.1 → 2.3.2
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.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -65,7 +65,7 @@ var wrapEffect = function wrapEffect(effectImpl, defaultBlendMode) {
|
|
|
65
65
|
return new effectImpl(props);
|
|
66
66
|
}, [props]);
|
|
67
67
|
React.useLayoutEffect(function () {
|
|
68
|
-
effect.blendMode.blendFunction = blendFunction
|
|
68
|
+
effect.blendMode.blendFunction = !blendFunction && blendFunction !== 0 ? defaultBlendMode : blendFunction;
|
|
69
69
|
if (opacity !== undefined) effect.blendMode.opacity.value = opacity;
|
|
70
70
|
invalidate();
|
|
71
71
|
}, [blendFunction, effect.blendMode, opacity]);
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ const wrapEffect = function (effectImpl, defaultBlendMode) {
|
|
|
24
24
|
const invalidate = useThree(state => state.invalidate);
|
|
25
25
|
const effect = useMemo(() => new effectImpl(props), [props]);
|
|
26
26
|
useLayoutEffect(() => {
|
|
27
|
-
effect.blendMode.blendFunction = blendFunction
|
|
27
|
+
effect.blendMode.blendFunction = !blendFunction && blendFunction !== 0 ? defaultBlendMode : blendFunction;
|
|
28
28
|
if (opacity !== undefined) effect.blendMode.opacity.value = opacity;
|
|
29
29
|
invalidate();
|
|
30
30
|
}, [blendFunction, effect.blendMode, opacity]);
|