@react-three/postprocessing 2.13.1 → 2.14.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.
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { FXAAEffect } from 'postprocessing';
3
+ export declare const FXAA: import("react").ForwardRefExoticComponent<Omit<import("@react-three/fiber").ExtendedColors<import("@react-three/fiber").Overwrite<Partial<FXAAEffect>, import("@react-three/fiber").NodeProps<FXAAEffect, typeof FXAAEffect>>> & {
4
+ blendFunction?: import("postprocessing").BlendFunction | undefined;
5
+ } & {
6
+ blendFunction?: import("postprocessing").BlendFunction | undefined;
7
+ opacity?: number | undefined;
8
+ }, "ref"> & import("react").RefAttributes<typeof FXAAEffect>>;
package/dist/index.cjs CHANGED
@@ -511,6 +511,8 @@ const SSAO = React.forwardRef(function SSAO(props, ref) {
511
511
 
512
512
  const SMAA = wrapEffect(postprocessing.SMAAEffect);
513
513
 
514
+ const FXAA = wrapEffect(postprocessing.FXAAEffect);
515
+
514
516
  const Texture = React.forwardRef(function Texture({ textureSrc, texture, ...props }, ref) {
515
517
  const t = fiber.useLoader(THREE.TextureLoader, textureSrc);
516
518
  React.useLayoutEffect(() => {
@@ -767,6 +769,7 @@ exports.DepthOfField = DepthOfField;
767
769
  exports.DotScreen = DotScreen;
768
770
  exports.EffectComposer = EffectComposer;
769
771
  exports.EffectComposerContext = EffectComposerContext;
772
+ exports.FXAA = FXAA;
770
773
  exports.Glitch = Glitch;
771
774
  exports.GodRays = GodRays;
772
775
  exports.Grid = Grid;
package/dist/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export * from './effects/SelectiveBloom';
22
22
  export * from './effects/Sepia';
23
23
  export * from './effects/SSAO';
24
24
  export * from './effects/SMAA';
25
+ export * from './effects/FXAA';
25
26
  export * from './effects/Texture';
26
27
  export * from './effects/ToneMapping';
27
28
  export * from './effects/Vignette';
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import React, { createContext, useState, useMemo, useRef, useContext, useEffect,
3
3
  import * as THREE from 'three';
4
4
  import { HalfFloatType, Vector3, TextureLoader, sRGBEncoding, RepeatWrapping, Uniform, Texture as Texture$1, Color, CanvasTexture, NearestFilter } from 'three';
5
5
  import { useThree, useFrame, useInstanceHandle, extend, createPortal, useLoader, applyProps } from '@react-three/fiber';
6
- import { EffectComposer as EffectComposer$1, RenderPass, NormalPass, DepthDownsamplingPass, Effect, EffectPass, Pass, DepthOfFieldEffect, MaskFunction, DepthPickingPass, CopyPass, BlendFunction, BloomEffect, BrightnessContrastEffect, ChromaticAberrationEffect, ColorAverageEffect, ColorDepthEffect, DepthEffect, DotScreenEffect, GlitchEffect, GlitchMode, GodRaysEffect, GridEffect, HueSaturationEffect, NoiseEffect, OutlineEffect, PixelationEffect, ScanlineEffect, SelectiveBloomEffect, SepiaEffect, SSAOEffect, SMAAEffect, TextureEffect, ToneMappingEffect, VignetteEffect, ShockWaveEffect, LUT3DEffect, TiltShiftEffect as TiltShiftEffect$1, EffectAttribute } from 'postprocessing';
6
+ import { EffectComposer as EffectComposer$1, RenderPass, NormalPass, DepthDownsamplingPass, Effect, EffectPass, Pass, DepthOfFieldEffect, MaskFunction, DepthPickingPass, CopyPass, BlendFunction, BloomEffect, BrightnessContrastEffect, ChromaticAberrationEffect, ColorAverageEffect, ColorDepthEffect, DepthEffect, DotScreenEffect, GlitchEffect, GlitchMode, GodRaysEffect, GridEffect, HueSaturationEffect, NoiseEffect, OutlineEffect, PixelationEffect, ScanlineEffect, SelectiveBloomEffect, SepiaEffect, SSAOEffect, SMAAEffect, FXAAEffect, TextureEffect, ToneMappingEffect, VignetteEffect, ShockWaveEffect, LUT3DEffect, TiltShiftEffect as TiltShiftEffect$1, EffectAttribute } from 'postprocessing';
7
7
  import { isWebGL2Available } from 'three-stdlib';
8
8
  import { easing } from 'maath';
9
9
  import { SSREffect } from 'screen-space-reflections';
@@ -491,6 +491,8 @@ const SSAO = forwardRef(function SSAO(props, ref) {
491
491
 
492
492
  const SMAA = wrapEffect(SMAAEffect);
493
493
 
494
+ const FXAA = wrapEffect(FXAAEffect);
495
+
494
496
  const Texture = forwardRef(function Texture({ textureSrc, texture, ...props }, ref) {
495
497
  const t = useLoader(TextureLoader, textureSrc);
496
498
  useLayoutEffect(() => {
@@ -735,4 +737,4 @@ const N8AO = forwardRef(({ screenSpaceRadius, quality, aoRadius = 5, aoSamples =
735
737
  return jsx("primitive", { ref: ref, object: effect });
736
738
  });
737
739
 
738
- export { ASCII, Autofocus, Bloom, BrightnessContrast, ChromaticAberration, ColorAverage, ColorDepth, Depth, DepthOfField, DotScreen, EffectComposer, EffectComposerContext, Glitch, GodRays, Grid, HueSaturation, LUT, N8AO, Noise, Outline, Pixelation, SMAA, SSAO, SSR, Scanline, Select, Selection, SelectiveBloom, Sepia, ShockWave, Texture, TiltShift, TiltShift2, TiltShiftEffect, ToneMapping, Vignette, resolveRef, selectionContext, useVector2, wrapEffect };
740
+ export { ASCII, Autofocus, Bloom, BrightnessContrast, ChromaticAberration, ColorAverage, ColorDepth, Depth, DepthOfField, DotScreen, EffectComposer, EffectComposerContext, FXAA, Glitch, GodRays, Grid, HueSaturation, LUT, N8AO, Noise, Outline, Pixelation, SMAA, SSAO, SSR, Scanline, Select, Selection, SelectiveBloom, Sepia, ShockWave, Texture, TiltShift, TiltShift2, TiltShiftEffect, ToneMapping, Vignette, resolveRef, selectionContext, useVector2, wrapEffect };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/postprocessing",
3
- "version": "2.13.1",
3
+ "version": "2.14.0",
4
4
  "description": "postprocessing wrapper for React and @react-three/fiber",
5
5
  "keywords": [
6
6
  "postprocessing",