@react-three/postprocessing 3.0.2 → 3.0.4

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.
Files changed (82) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +81 -81
  3. package/dist/EffectComposer.d.ts +27 -0
  4. package/dist/Selection.d.ts +17 -0
  5. package/dist/effects/ASCII.d.ts +18 -0
  6. package/dist/effects/Autofocus.d.ts +22 -0
  7. package/dist/effects/Bloom.d.ts +5 -0
  8. package/dist/effects/BrightnessContrast.d.ts +5 -0
  9. package/dist/effects/ChromaticAberration.d.ts +8 -0
  10. package/dist/effects/ColorAverage.d.ts +8 -0
  11. package/dist/effects/ColorDepth.d.ts +5 -0
  12. package/dist/effects/Depth.d.ts +5 -0
  13. package/dist/effects/DepthOfField.d.ts +25 -0
  14. package/dist/effects/DotScreen.d.ts +5 -0
  15. package/dist/effects/FXAA.d.ts +5 -0
  16. package/dist/effects/Glitch.d.ts +30 -0
  17. package/dist/effects/GodRays.d.ts +21 -0
  18. package/dist/effects/Grid.d.ts +12 -0
  19. package/dist/effects/HueSaturation.d.ts +5 -0
  20. package/dist/effects/LUT.d.ts +9 -0
  21. package/dist/effects/LensFlare.d.ts +54 -0
  22. package/dist/effects/N8AO.d.ts +17 -0
  23. package/dist/effects/Noise.d.ts +5 -0
  24. package/dist/effects/Outline.d.ts +30 -0
  25. package/dist/effects/Pixelation.d.ts +6 -0
  26. package/dist/effects/Ramp.d.ts +78 -0
  27. package/dist/effects/SMAA.d.ts +5 -0
  28. package/dist/effects/SSAO.d.ts +30 -0
  29. package/dist/effects/ScanlineEffect.d.ts +5 -0
  30. package/dist/effects/SelectiveBloom.d.ts +20 -0
  31. package/dist/effects/Sepia.d.ts +5 -0
  32. package/dist/effects/ShockWave.d.ts +5 -0
  33. package/dist/effects/Texture.d.ts +11 -0
  34. package/dist/effects/TiltShift.d.ts +5 -0
  35. package/dist/effects/TiltShift2.d.ts +22 -0
  36. package/dist/effects/ToneMapping.d.ts +8 -0
  37. package/dist/effects/Vignette.d.ts +5 -0
  38. package/dist/effects/Water.d.ts +12 -0
  39. package/dist/index.d.ts +37 -0
  40. package/dist/index.js +555 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/util.d.ts +17 -0
  43. package/package.json +67 -68
  44. package/src/EffectComposer.test.tsx +126 -126
  45. package/src/EffectComposer.tsx +200 -200
  46. package/src/Selection.tsx +46 -46
  47. package/src/effects/ASCII.tsx +135 -135
  48. package/src/effects/Autofocus.tsx +153 -153
  49. package/src/effects/Bloom.tsx +6 -6
  50. package/src/effects/BrightnessContrast.tsx +4 -4
  51. package/src/effects/ChromaticAberration.tsx +5 -5
  52. package/src/effects/ColorAverage.tsx +15 -15
  53. package/src/effects/ColorDepth.tsx +4 -4
  54. package/src/effects/Depth.tsx +4 -4
  55. package/src/effects/DepthOfField.tsx +89 -89
  56. package/src/effects/DotScreen.tsx +4 -4
  57. package/src/effects/FXAA.tsx +4 -4
  58. package/src/effects/Glitch.tsx +40 -40
  59. package/src/effects/GodRays.tsx +16 -16
  60. package/src/effects/Grid.tsx +21 -21
  61. package/src/effects/HueSaturation.tsx +4 -4
  62. package/src/effects/LUT.tsx +26 -26
  63. package/src/effects/LensFlare.tsx +611 -611
  64. package/src/effects/N8AO.tsx +81 -81
  65. package/src/effects/Noise.tsx +4 -4
  66. package/src/effects/Outline.tsx +117 -117
  67. package/src/effects/Pixelation.tsx +15 -15
  68. package/src/effects/Ramp.tsx +150 -150
  69. package/src/effects/SMAA.tsx +4 -4
  70. package/src/effects/SSAO.tsx +41 -41
  71. package/src/effects/ScanlineEffect.tsx +7 -7
  72. package/src/effects/SelectiveBloom.tsx +126 -126
  73. package/src/effects/Sepia.tsx +4 -4
  74. package/src/effects/ShockWave.tsx +4 -4
  75. package/src/effects/Texture.tsx +23 -23
  76. package/src/effects/TiltShift.tsx +4 -4
  77. package/src/effects/TiltShift2.tsx +90 -90
  78. package/src/effects/ToneMapping.tsx +6 -6
  79. package/src/effects/Vignette.tsx +4 -4
  80. package/src/effects/Water.tsx +35 -35
  81. package/src/index.ts +40 -40
  82. package/src/util.tsx +55 -55
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 react-spring
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020 react-spring
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,81 +1,81 @@
1
- # react-postprocessing
2
-
3
- [![Version](https://img.shields.io/npm/v/@react-three/postprocessing?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/@react-three/postprocessing)
4
- [![Storybook](https://img.shields.io/static/v1?message=Storybook&style=flat&colorA=000000&colorB=000000&label=&logo=storybook&logoColor=ffffff)](https://pmndrs.github.io/react-postprocessing)
5
- [![Downloads](https://img.shields.io/npm/dt/@react-three/postprocessing.svg?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/@react-three/postprocessing)
6
- [![Discord Shield](https://img.shields.io/discord/740090768164651008?style=flat&colorA=000000&colorB=000000&label=discord&logo=discord&logoColor=ffffff)](https://discord.gg/ZZjjNvJ)
7
- [![Open in GitHub Codespaces](https://img.shields.io/static/v1?&message=Open%20in%20%20Codespaces&style=flat&colorA=000000&colorB=000000&label=GitHub&logo=github&logoColor=ffffff)](https://github.com/codespaces/new?template_repository=pmndrs%2Freact-postprocessing)
8
-
9
- `react-postprocessing` is a
10
- [postprocessing](https://github.com/pmndrs/postprocessing) wrapper for
11
- [@react-three/fiber](https://github.com/pmndrs/react-three-fiber). This is not
12
- (yet) meant for complex orchestration of effects, but can save you
13
- [hundreds of LOC](https://twitter.com/0xca0a/status/1289501594698960897) for a
14
- straight forward effects-chain.
15
-
16
- ```bash
17
- npm install @react-three/postprocessing
18
- ```
19
-
20
- <p align="center">
21
- <a href="https://pqrpl.csb.app" target="_blank"><img width="274" src="bubbles.jpg" alt="Bubbles" /></a>
22
- <a href="https://5jgjz.csb.app" target="_blank"><img width="274" src="control.jpg" alt="Take Control" /></a>
23
- </p>
24
- <p align="middle">
25
- <i>These demos are real, you can click them! They contain the full code, too. 📦</i>
26
- </p>
27
-
28
- #### Why postprocessing and not three/examples/jsm/postprocessing?
29
-
30
- From
31
- [https://github.com/pmndrs/postprocessing](https://github.com/pmndrs/postprocessing#performance)
32
-
33
- > This library provides an EffectPass which automatically organizes and merges
34
- > any given combination of effects. This minimizes the amount of render
35
- > operations and makes it possible to combine many effects without the
36
- > performance penalties of traditional pass chaining. Additionally, every effect
37
- > can choose its own blend function.
38
- >
39
- > All fullscreen render operations also use a single triangle that fills the
40
- > screen. Compared to using a quad, this approach harmonizes with modern GPU
41
- > rasterization patterns and eliminates unnecessary fragment calculations along
42
- > the screen diagonal. This is especially beneficial for GPGPU passes and
43
- > effects that use complex fragment shaders.
44
-
45
- Postprocessing also supports gamma correction out of the box, as well as WebGL2
46
- MSAA (multi sample anti aliasing), which is react-postprocessing's default, you
47
- get high performance crisp results w/o jagged edges.
48
-
49
- #### What does it look like?
50
-
51
- Here's an example combining a couple of effects
52
- ([live demo](https://codesandbox.io/s/react-postprocessing-dof-blob-pqrpl?)).
53
-
54
- <a href="https://codesandbox.io/s/react-postprocessing-dof-blob-pqrpl?" target="_blank" rel="noopener">
55
- <img src="bubbles.jpg" alt="Bubbles Demo" />
56
- </a>
57
-
58
- ```jsx
59
- import React from 'react'
60
- import { Bloom, DepthOfField, EffectComposer, Noise, Vignette } from '@react-three/postprocessing'
61
- import { Canvas } from '@react-three/fiber'
62
-
63
- function App() {
64
- return (
65
- <Canvas>
66
- {/* Your regular scene contents go here, like always ... */}
67
- <EffectComposer>
68
- <DepthOfField focusDistance={0} focalLength={0.02} bokehScale={2} height={480} />
69
- <Bloom luminanceThreshold={0} luminanceSmoothing={0.9} height={300} />
70
- <Noise opacity={0.02} />
71
- <Vignette eskil={false} offset={0.1} darkness={1.1} />
72
- </EffectComposer>
73
- </Canvas>
74
- )
75
- }
76
- ```
77
-
78
- ## Documentation
79
-
80
- - [react-postprocessing docs](https://docs.pmnd.rs/react-postprocessing)
81
- - [postprocessing docs](https://pmndrs.github.io/postprocessing/public/docs/)
1
+ # react-postprocessing
2
+
3
+ [![Version](https://img.shields.io/npm/v/@react-three/postprocessing?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/@react-three/postprocessing)
4
+ [![Storybook](https://img.shields.io/static/v1?message=Storybook&style=flat&colorA=000000&colorB=000000&label=&logo=storybook&logoColor=ffffff)](https://pmndrs.github.io/react-postprocessing)
5
+ [![Downloads](https://img.shields.io/npm/dt/@react-three/postprocessing.svg?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/@react-three/postprocessing)
6
+ [![Discord Shield](https://img.shields.io/discord/740090768164651008?style=flat&colorA=000000&colorB=000000&label=discord&logo=discord&logoColor=ffffff)](https://discord.gg/ZZjjNvJ)
7
+ [![Open in GitHub Codespaces](https://img.shields.io/static/v1?&message=Open%20in%20%20Codespaces&style=flat&colorA=000000&colorB=000000&label=GitHub&logo=github&logoColor=ffffff)](https://github.com/codespaces/new?template_repository=pmndrs%2Freact-postprocessing)
8
+
9
+ `react-postprocessing` is a
10
+ [postprocessing](https://github.com/pmndrs/postprocessing) wrapper for
11
+ [@react-three/fiber](https://github.com/pmndrs/react-three-fiber). This is not
12
+ (yet) meant for complex orchestration of effects, but can save you
13
+ [hundreds of LOC](https://twitter.com/0xca0a/status/1289501594698960897) for a
14
+ straight forward effects-chain.
15
+
16
+ ```bash
17
+ npm install @react-three/postprocessing
18
+ ```
19
+
20
+ <p align="center">
21
+ <a href="https://pqrpl.csb.app" target="_blank"><img width="274" src="bubbles.jpg" alt="Bubbles" /></a>
22
+ <a href="https://5jgjz.csb.app" target="_blank"><img width="274" src="control.jpg" alt="Take Control" /></a>
23
+ </p>
24
+ <p align="middle">
25
+ <i>These demos are real, you can click them! They contain the full code, too. 📦</i>
26
+ </p>
27
+
28
+ #### Why postprocessing and not three/examples/jsm/postprocessing?
29
+
30
+ From
31
+ [https://github.com/pmndrs/postprocessing](https://github.com/pmndrs/postprocessing#performance)
32
+
33
+ > This library provides an EffectPass which automatically organizes and merges
34
+ > any given combination of effects. This minimizes the amount of render
35
+ > operations and makes it possible to combine many effects without the
36
+ > performance penalties of traditional pass chaining. Additionally, every effect
37
+ > can choose its own blend function.
38
+ >
39
+ > All fullscreen render operations also use a single triangle that fills the
40
+ > screen. Compared to using a quad, this approach harmonizes with modern GPU
41
+ > rasterization patterns and eliminates unnecessary fragment calculations along
42
+ > the screen diagonal. This is especially beneficial for GPGPU passes and
43
+ > effects that use complex fragment shaders.
44
+
45
+ Postprocessing also supports gamma correction out of the box, as well as WebGL2
46
+ MSAA (multi sample anti aliasing), which is react-postprocessing's default, you
47
+ get high performance crisp results w/o jagged edges.
48
+
49
+ #### What does it look like?
50
+
51
+ Here's an example combining a couple of effects
52
+ ([live demo](https://codesandbox.io/s/react-postprocessing-dof-blob-pqrpl?)).
53
+
54
+ <a href="https://codesandbox.io/s/react-postprocessing-dof-blob-pqrpl?" target="_blank" rel="noopener">
55
+ <img src="bubbles.jpg" alt="Bubbles Demo" />
56
+ </a>
57
+
58
+ ```jsx
59
+ import React from 'react'
60
+ import { Bloom, DepthOfField, EffectComposer, Noise, Vignette } from '@react-three/postprocessing'
61
+ import { Canvas } from '@react-three/fiber'
62
+
63
+ function App() {
64
+ return (
65
+ <Canvas>
66
+ {/* Your regular scene contents go here, like always ... */}
67
+ <EffectComposer>
68
+ <DepthOfField focusDistance={0} focalLength={0.02} bokehScale={2} height={480} />
69
+ <Bloom luminanceThreshold={0} luminanceSmoothing={0.9} height={300} />
70
+ <Noise opacity={0.02} />
71
+ <Vignette eskil={false} offset={0.1} darkness={1.1} />
72
+ </EffectComposer>
73
+ </Canvas>
74
+ )
75
+ }
76
+ ```
77
+
78
+ ## Documentation
79
+
80
+ - [react-postprocessing docs](https://docs.pmnd.rs/react-postprocessing)
81
+ - [postprocessing docs](https://pmndrs.github.io/postprocessing/public/docs/)
@@ -0,0 +1,27 @@
1
+ import type { TextureDataType, Camera, Scene } from 'three';
2
+ import { type JSX } from 'react';
3
+ import { EffectComposer as EffectComposerImpl, NormalPass, DepthDownsamplingPass } from 'postprocessing';
4
+ export declare const EffectComposerContext: import("react").Context<{
5
+ composer: EffectComposerImpl;
6
+ normalPass: NormalPass | null;
7
+ downSamplingPass: DepthDownsamplingPass | null;
8
+ camera: Camera;
9
+ scene: Scene;
10
+ resolutionScale?: number | undefined;
11
+ }>;
12
+ export type EffectComposerProps = {
13
+ enabled?: boolean;
14
+ children: JSX.Element | JSX.Element[];
15
+ depthBuffer?: boolean;
16
+ /** Only used for SSGI currently, leave it disabled for everything else unless it's needed */
17
+ enableNormalPass?: boolean;
18
+ stencilBuffer?: boolean;
19
+ autoClear?: boolean;
20
+ resolutionScale?: number;
21
+ multisampling?: number;
22
+ frameBufferType?: TextureDataType;
23
+ renderPriority?: number;
24
+ camera?: Camera;
25
+ scene?: Scene;
26
+ };
27
+ export declare const EffectComposer: import("react").NamedExoticComponent<EffectComposerProps & import("react").RefAttributes<EffectComposerImpl>>;
@@ -0,0 +1,17 @@
1
+ import * as THREE from 'three';
2
+ import React from 'react';
3
+ import { type ThreeElements } from '@react-three/fiber';
4
+ export type Api = {
5
+ selected: THREE.Object3D[];
6
+ select: React.Dispatch<React.SetStateAction<THREE.Object3D[]>>;
7
+ enabled: boolean;
8
+ };
9
+ export type SelectApi = Omit<ThreeElements['group'], 'ref'> & {
10
+ enabled?: boolean;
11
+ };
12
+ export declare const selectionContext: React.Context<Api | null>;
13
+ export declare function Selection({ children, enabled }: {
14
+ enabled?: boolean;
15
+ children: React.ReactNode;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ export declare function Select({ enabled, children, ...props }: SelectApi): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { Texture } from 'three';
3
+ import { Effect } from 'postprocessing';
4
+ interface IASCIIEffectProps {
5
+ font?: string;
6
+ characters?: string;
7
+ fontSize?: number;
8
+ cellSize?: number;
9
+ color?: string;
10
+ invert?: boolean;
11
+ }
12
+ declare class ASCIIEffect extends Effect {
13
+ constructor({ font, characters, fontSize, cellSize, color, invert, }?: IASCIIEffectProps);
14
+ /** Draws the characters on a Canvas and returns a texture */
15
+ createCharactersTexture(characters: string, font: string, fontSize: number): Texture;
16
+ }
17
+ export declare const ASCII: import("react").ForwardRefExoticComponent<IASCIIEffectProps & import("react").RefAttributes<ASCIIEffect>>;
18
+ export {};
@@ -0,0 +1,22 @@
1
+ import * as THREE from 'three';
2
+ import React, { RefObject } from 'react';
3
+ import { type Vector3 } from '@react-three/fiber';
4
+ import { DepthOfFieldEffect } from 'postprocessing';
5
+ import { DepthOfField } from './DepthOfField';
6
+ export type AutofocusProps = React.ComponentProps<typeof DepthOfField> & {
7
+ target?: Vector3;
8
+ /** should the target follow the pointer */
9
+ mouse?: boolean;
10
+ /** size of the debug green point */
11
+ debug?: number;
12
+ /** manual update */
13
+ manual?: boolean;
14
+ /** approximate time to reach the target */
15
+ smoothTime?: number;
16
+ };
17
+ export type AutofocusApi = {
18
+ dofRef: RefObject<DepthOfFieldEffect | null>;
19
+ hitpoint: THREE.Vector3;
20
+ update: (delta: number, updateTarget: boolean) => void;
21
+ };
22
+ export declare const Autofocus: React.ForwardRefExoticComponent<Omit<AutofocusProps, "ref"> & React.RefAttributes<AutofocusApi>>;
@@ -0,0 +1,5 @@
1
+ export declare const Bloom: ({ blendFunction, opacity, ...props }: {
2
+ [x: string]: any;
3
+ blendFunction?: any;
4
+ opacity?: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const BrightnessContrast: ({ blendFunction, opacity, ...props }: {
2
+ [x: string]: any;
3
+ blendFunction?: any;
4
+ opacity?: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { ChromaticAberrationEffect } from 'postprocessing';
2
+ import { type EffectProps } from '../util';
3
+ export type ChromaticAberrationProps = EffectProps<typeof ChromaticAberrationEffect>;
4
+ export declare const ChromaticAberration: ({ blendFunction, opacity, ...props }: {
5
+ [x: string]: any;
6
+ blendFunction?: any;
7
+ opacity?: any;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { ColorAverageEffect, BlendFunction } from 'postprocessing';
2
+ import React from 'react';
3
+ export type ColorAverageProps = Partial<{
4
+ blendFunction: BlendFunction;
5
+ }>;
6
+ export declare const ColorAverage: React.ForwardRefExoticComponent<Partial<{
7
+ blendFunction: BlendFunction;
8
+ }> & React.RefAttributes<ColorAverageEffect>>;
@@ -0,0 +1,5 @@
1
+ export declare const ColorDepth: ({ blendFunction, opacity, ...props }: {
2
+ [x: string]: any;
3
+ blendFunction?: any;
4
+ opacity?: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const Depth: ({ blendFunction, opacity, ...props }: {
2
+ [x: string]: any;
3
+ blendFunction?: any;
4
+ opacity?: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ import { DepthOfFieldEffect } from 'postprocessing';
3
+ import { ReactThreeFiber } from '@react-three/fiber';
4
+ import { type Texture, Vector3 } from 'three';
5
+ export declare const DepthOfField: import("react").ForwardRefExoticComponent<{
6
+ blendFunction?: import("postprocessing").BlendFunction | undefined;
7
+ worldFocusDistance?: number | undefined;
8
+ worldFocusRange?: number | undefined;
9
+ focusDistance?: number | undefined;
10
+ focalLength?: number | undefined;
11
+ focusRange?: number | undefined;
12
+ bokehScale?: number | undefined;
13
+ resolutionScale?: number | undefined;
14
+ resolutionX?: number | undefined;
15
+ resolutionY?: number | undefined;
16
+ width?: number | undefined;
17
+ height?: number | undefined;
18
+ } & Partial<{
19
+ target: ReactThreeFiber.Vector3;
20
+ depthTexture: {
21
+ texture: Texture;
22
+ packing: number;
23
+ };
24
+ blur: number;
25
+ }> & import("react").RefAttributes<DepthOfFieldEffect>>;
@@ -0,0 +1,5 @@
1
+ export declare const DotScreen: ({ blendFunction, opacity, ...props }: {
2
+ [x: string]: any;
3
+ blendFunction?: any;
4
+ opacity?: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const FXAA: ({ blendFunction, opacity, ...props }: {
2
+ [x: string]: any;
3
+ blendFunction?: any;
4
+ opacity?: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import { Vector2 } from 'three';
3
+ import { GlitchEffect, GlitchMode } from 'postprocessing';
4
+ import { ReactThreeFiber } from '@react-three/fiber';
5
+ export type GlitchProps = ConstructorParameters<typeof GlitchEffect>[0] & Partial<{
6
+ mode: GlitchMode;
7
+ active: boolean;
8
+ delay: ReactThreeFiber.Vector2;
9
+ duration: ReactThreeFiber.Vector2;
10
+ chromaticAberrationOffset: ReactThreeFiber.Vector2;
11
+ strength: ReactThreeFiber.Vector2;
12
+ }>;
13
+ export declare const Glitch: import("react").ForwardRefExoticComponent<{
14
+ blendFunction?: import("postprocessing").BlendFunction | undefined;
15
+ chromaticAberrationOffset?: Vector2 | undefined;
16
+ delay?: Vector2 | undefined;
17
+ duration?: Vector2 | undefined;
18
+ strength?: Vector2 | undefined;
19
+ perturbationMap?: import("three").Texture | undefined;
20
+ dtSize?: number | undefined;
21
+ columns?: number | undefined;
22
+ ratio?: number | undefined;
23
+ } & Partial<{
24
+ mode: GlitchMode;
25
+ active: boolean;
26
+ delay: ReactThreeFiber.Vector2;
27
+ duration: ReactThreeFiber.Vector2;
28
+ chromaticAberrationOffset: ReactThreeFiber.Vector2;
29
+ strength: ReactThreeFiber.Vector2;
30
+ }> & import("react").RefAttributes<GlitchEffect>>;
@@ -0,0 +1,21 @@
1
+ import { GodRaysEffect } from 'postprocessing';
2
+ import React from 'react';
3
+ import { Mesh, Points } from 'three';
4
+ export declare const GodRays: React.ForwardRefExoticComponent<{
5
+ blendFunction?: import("postprocessing").BlendFunction | undefined;
6
+ samples?: number | undefined;
7
+ density?: number | undefined;
8
+ decay?: number | undefined;
9
+ weight?: number | undefined;
10
+ exposure?: number | undefined;
11
+ clampMax?: number | undefined;
12
+ resolutionScale?: number | undefined;
13
+ resolutionX?: number | undefined;
14
+ resolutionY?: number | undefined;
15
+ width?: number | undefined;
16
+ height?: number | undefined;
17
+ kernelSize?: import("postprocessing").KernelSize | undefined;
18
+ blur?: boolean | undefined;
19
+ } & {
20
+ sun: Mesh | Points | React.RefObject<Mesh | Points>;
21
+ } & React.RefAttributes<GodRaysEffect>>;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { GridEffect } from 'postprocessing';
3
+ export declare const Grid: React.ForwardRefExoticComponent<{
4
+ blendFunction?: import("postprocessing").BlendFunction | undefined;
5
+ scale?: number | undefined;
6
+ lineWidth?: number | undefined;
7
+ } & Partial<{
8
+ size: {
9
+ width: number;
10
+ height: number;
11
+ };
12
+ }> & React.RefAttributes<GridEffect>>;
@@ -0,0 +1,5 @@
1
+ export declare const HueSaturation: ({ blendFunction, opacity, ...props }: {
2
+ [x: string]: any;
3
+ blendFunction?: any;
4
+ opacity?: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { LUT3DEffect, BlendFunction } from 'postprocessing';
2
+ import React from 'react';
3
+ import type { Texture } from 'three';
4
+ export type LUTProps = {
5
+ lut: Texture;
6
+ blendFunction?: BlendFunction;
7
+ tetrahedralInterpolation?: boolean;
8
+ };
9
+ export declare const LUT: React.ForwardRefExoticComponent<LUTProps & React.RefAttributes<LUT3DEffect>>;
@@ -0,0 +1,54 @@
1
+ import * as THREE from 'three';
2
+ import { BlendFunction, Effect } from 'postprocessing';
3
+ type LensFlareEffectOptions = {
4
+ /** The blend function of this effect */
5
+ blendFunction: BlendFunction;
6
+ /** Boolean to enable/disable the effect */
7
+ enabled: boolean;
8
+ /** The glare size */
9
+ glareSize: number;
10
+ /** The position of the lens flare in 3d space */
11
+ lensPosition: THREE.Vector3;
12
+ /** Effect resolution */
13
+ screenRes: THREE.Vector2;
14
+ /** The number of points for the star */
15
+ starPoints: number;
16
+ /** The flare side */
17
+ flareSize: number;
18
+ /** The flare animation speed */
19
+ flareSpeed: number;
20
+ /** Changes the appearance to anamorphic */
21
+ flareShape: number;
22
+ /** Animated flare */
23
+ animated: boolean;
24
+ /** Set the appearance to full anamorphic */
25
+ anamorphic: boolean;
26
+ /** Set the color gain for the lens flare. Must be a THREE.Color in RBG format */
27
+ colorGain: THREE.Color;
28
+ /** Texture to be used as color dirt for starburst effect */
29
+ lensDirtTexture: THREE.Texture | null;
30
+ /** The halo scale */
31
+ haloScale: number;
32
+ /** Option to enable/disable secondary ghosts */
33
+ secondaryGhosts: boolean;
34
+ /** Option to enable/disable aditional streaks */
35
+ aditionalStreaks: boolean;
36
+ /** Option to enable/disable secondary ghosts */
37
+ ghostScale: number;
38
+ /** TODO The opacity for this effect */
39
+ opacity: number;
40
+ /** Boolean to enable/disable the start burst effect. Can be disabled to improve performance */
41
+ starBurst: boolean;
42
+ };
43
+ export declare class LensFlareEffect extends Effect {
44
+ constructor({ blendFunction, enabled, glareSize, lensPosition, screenRes, starPoints, flareSize, flareSpeed, flareShape, animated, anamorphic, colorGain, lensDirtTexture, haloScale, secondaryGhosts, aditionalStreaks, ghostScale, opacity, starBurst, }: LensFlareEffectOptions);
45
+ update(_renderer: any, _inputBuffer: any, deltaTime: number): void;
46
+ }
47
+ type LensFlareProps = {
48
+ /** Position of the effect */
49
+ lensPosition?: THREE.Vector3;
50
+ /** The time that it takes to fade the occlusion */
51
+ smoothTime?: number;
52
+ } & Partial<LensFlareEffectOptions>;
53
+ export declare const LensFlare: ({ smoothTime, blendFunction, enabled, glareSize, lensPosition, screenRes, starPoints, flareSize, flareSpeed, flareShape, animated, anamorphic, colorGain, lensDirtTexture, haloScale, secondaryGhosts, aditionalStreaks, ghostScale, opacity, starBurst, }: LensFlareProps) => import("react/jsx-runtime").JSX.Element;
54
+ export {};
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { ReactThreeFiber } from '@react-three/fiber';
3
+ export type N8AOProps = {
4
+ aoRadius?: number;
5
+ distanceFalloff?: number;
6
+ intensity?: number;
7
+ quality?: 'performance' | 'low' | 'medium' | 'high' | 'ultra';
8
+ aoSamples?: number;
9
+ denoiseSamples?: number;
10
+ denoiseRadius?: number;
11
+ color?: ReactThreeFiber.Color;
12
+ halfRes?: boolean;
13
+ depthAwareUpsampling?: boolean;
14
+ screenSpaceRadius?: boolean;
15
+ renderMode?: 0 | 1 | 2 | 3 | 4;
16
+ };
17
+ export declare const N8AO: import("react").ForwardRefExoticComponent<N8AOProps & import("react").RefAttributes<N8AOPostPass>>;
@@ -0,0 +1,5 @@
1
+ export declare const Noise: ({ blendFunction, opacity, ...props }: {
2
+ [x: string]: any;
3
+ blendFunction?: any;
4
+ opacity?: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { OutlineEffect } from 'postprocessing';
2
+ import { RefObject } from 'react';
3
+ import { Object3D } from 'three';
4
+ type ObjectRef = RefObject<Object3D>;
5
+ export type OutlineProps = ConstructorParameters<typeof OutlineEffect>[2] & Partial<{
6
+ selection: Object3D | Object3D[] | ObjectRef | ObjectRef[];
7
+ selectionLayer: number;
8
+ }>;
9
+ export declare const Outline: import("react").ForwardRefExoticComponent<{
10
+ blendFunction?: import("postprocessing").BlendFunction | undefined;
11
+ patternTexture?: import("three").Texture | undefined;
12
+ patternScale?: number | undefined;
13
+ edgeStrength?: number | undefined;
14
+ pulseSpeed?: number | undefined;
15
+ visibleEdgeColor?: number | undefined;
16
+ hiddenEdgeColor?: number | undefined;
17
+ multisampling?: number | undefined;
18
+ resolutionScale?: number | undefined;
19
+ resolutionX?: number | undefined;
20
+ resolutionY?: number | undefined;
21
+ width?: number | undefined;
22
+ height?: number | undefined;
23
+ kernelSize?: import("postprocessing").KernelSize | undefined;
24
+ blur?: boolean | undefined;
25
+ xRay?: boolean | undefined;
26
+ } & Partial<{
27
+ selection: Object3D | Object3D[] | ObjectRef | ObjectRef[];
28
+ selectionLayer: number;
29
+ }> & import("react").RefAttributes<OutlineEffect>>;
30
+ export {};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { PixelationEffect } from 'postprocessing';
3
+ export type PixelationProps = {
4
+ granularity?: number;
5
+ };
6
+ export declare const Pixelation: import("react").ForwardRefExoticComponent<PixelationProps & import("react").RefAttributes<PixelationEffect>>;