@react-three/postprocessing 2.5.3 → 2.6.0

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.
@@ -1,6 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { BloomEffect, BlendFunction } from 'postprocessing';
3
3
  export declare const Bloom: import("react").ForwardRefExoticComponent<{
4
+ mipmapBlur?: boolean;
5
+ radius?: number;
6
+ levels?: number;
4
7
  blendFunction?: BlendFunction;
5
8
  luminanceThreshold?: number;
6
9
  luminanceSmoothing?: number;
package/dist/index.cjs CHANGED
@@ -69,7 +69,7 @@ var useVector2 = function useVector2(props, key) {
69
69
  }, [vec]);
70
70
  };
71
71
 
72
- var Bloom = wrapEffect(postprocessing.BloomEffect, postprocessing.BlendFunction.SCREEN);
72
+ var Bloom = wrapEffect(postprocessing.BloomEffect, postprocessing.BlendFunction.ADD);
73
73
 
74
74
  var BrightnessContrast = wrapEffect(postprocessing.BrightnessContrastEffect);
75
75
 
@@ -482,7 +482,7 @@ var Pixelation = /*#__PURE__*/React.forwardRef(function Pixelation(_ref, ref) {
482
482
 
483
483
  var Scanline = wrapEffect(postprocessing.ScanlineEffect, postprocessing.BlendFunction.OVERLAY);
484
484
 
485
- var _excluded$3 = ["selection", "selectionLayer", "lights", "luminanceThreshold", "luminanceSmoothing", "intensity", "width", "height", "kernelSize", "mipmapBlur"];
485
+ var _excluded$3 = ["selection", "selectionLayer", "lights", "luminanceThreshold", "luminanceSmoothing", "intensity", "width", "height", "kernelSize", "mipmapBlur", "radius", "levels"];
486
486
 
487
487
  var addLight = function addLight(light, effect) {
488
488
  return light.layers.enable(effect.selection.layer);
@@ -506,6 +506,8 @@ var SelectiveBloom = /*#__PURE__*/React.forwardRef(function SelectiveBloom(_ref,
506
506
  height = _ref.height,
507
507
  kernelSize = _ref.kernelSize,
508
508
  mipmapBlur = _ref.mipmapBlur,
509
+ radius = _ref.radius,
510
+ levels = _ref.levels,
509
511
  props = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$3);
510
512
 
511
513
  if (lights.length === 0) {
@@ -522,16 +524,18 @@ var SelectiveBloom = /*#__PURE__*/React.forwardRef(function SelectiveBloom(_ref,
522
524
 
523
525
  var effect = React.useMemo(function () {
524
526
  return new postprocessing.SelectiveBloomEffect(scene, camera, _extends__default["default"]({
525
- blendFunction: postprocessing.BlendFunction.SCREEN,
527
+ blendFunction: postprocessing.BlendFunction.ADD,
526
528
  luminanceThreshold: luminanceThreshold,
527
529
  luminanceSmoothing: luminanceSmoothing,
528
530
  intensity: intensity,
529
531
  width: width,
530
532
  height: height,
531
533
  kernelSize: kernelSize,
532
- mipmapBlur: mipmapBlur
534
+ mipmapBlur: mipmapBlur,
535
+ radius: radius,
536
+ levels: levels
533
537
  }, props));
534
- }, [camera, height, intensity, kernelSize, luminanceSmoothing, luminanceThreshold, scene, width, height, mipmapBlur]);
538
+ }, [camera, height, intensity, kernelSize, luminanceSmoothing, luminanceThreshold, scene, width, height, mipmapBlur, radius, levels]);
535
539
  var api = React.useContext(selectionContext);
536
540
  React.useEffect(function () {
537
541
  // Do not allow array selection if declarative selection is active
package/dist/index.js CHANGED
@@ -46,7 +46,7 @@ const useVector2 = (props, key) => {
46
46
  }, [vec]);
47
47
  };
48
48
 
49
- const Bloom = wrapEffect(BloomEffect, BlendFunction.SCREEN);
49
+ const Bloom = wrapEffect(BloomEffect, BlendFunction.ADD);
50
50
 
51
51
  const BrightnessContrast = wrapEffect(BrightnessContrastEffect);
52
52
 
@@ -419,6 +419,8 @@ const SelectiveBloom = /*#__PURE__*/forwardRef(function SelectiveBloom(_ref, for
419
419
  height,
420
420
  kernelSize,
421
421
  mipmapBlur,
422
+ radius,
423
+ levels,
422
424
  ...props
423
425
  } = _ref;
424
426
 
@@ -432,7 +434,7 @@ const SelectiveBloom = /*#__PURE__*/forwardRef(function SelectiveBloom(_ref, for
432
434
  camera
433
435
  } = useContext(EffectComposerContext);
434
436
  const effect = useMemo(() => new SelectiveBloomEffect(scene, camera, {
435
- blendFunction: BlendFunction.SCREEN,
437
+ blendFunction: BlendFunction.ADD,
436
438
  luminanceThreshold,
437
439
  luminanceSmoothing,
438
440
  intensity,
@@ -440,8 +442,10 @@ const SelectiveBloom = /*#__PURE__*/forwardRef(function SelectiveBloom(_ref, for
440
442
  height,
441
443
  kernelSize,
442
444
  mipmapBlur,
445
+ radius,
446
+ levels,
443
447
  ...props
444
- }), [camera, height, intensity, kernelSize, luminanceSmoothing, luminanceThreshold, scene, width, height, mipmapBlur]);
448
+ }), [camera, height, intensity, kernelSize, luminanceSmoothing, luminanceThreshold, scene, width, height, mipmapBlur, radius, levels]);
445
449
  const api = useContext(selectionContext);
446
450
  useEffect(() => {
447
451
  // Do not allow array selection if declarative selection is active
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/postprocessing",
3
- "version": "2.5.3",
3
+ "version": "2.6.0",
4
4
  "description": "postprocessing wrapper for React and @react-three/fiber",
5
5
  "keywords": [
6
6
  "postprocessing",
@@ -39,9 +39,9 @@
39
39
  "typegen": "tsc --emitDeclarationOnly || true"
40
40
  },
41
41
  "dependencies": {
42
- "postprocessing": "^6.28.4",
42
+ "postprocessing": "^6.28.5",
43
43
  "react-merge-refs": "^1.1.0",
44
- "screen-space-reflections": "^2.0.6",
44
+ "screen-space-reflections": "^2.1.1",
45
45
  "three-stdlib": "^2.8.11"
46
46
  },
47
47
  "devDependencies": {