@react-three/postprocessing 3.0.5 → 3.1.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.
- package/README.md +6 -7
- package/dist/EffectComposer.d.ts +9 -2
- package/dist/EffectGroup.d.ts +9 -0
- package/dist/createEffectComponent.d.ts +30 -0
- package/dist/effects/ASCII.d.ts +28 -7
- package/dist/effects/Autofocus.d.ts +1 -1
- package/dist/effects/Bloom.d.ts +9 -1
- package/dist/effects/BrightnessContrast.d.ts +14 -1
- package/dist/effects/ChromaticAberration.d.ts +26 -3
- package/dist/effects/ColorAverage.d.ts +7 -7
- package/dist/effects/ColorDepth.d.ts +7 -1
- package/dist/effects/Depth.d.ts +12 -1
- package/dist/effects/DotScreen.d.ts +14 -1
- package/dist/effects/FXAA.d.ts +10 -1
- package/dist/effects/Glitch.d.ts +16 -11
- package/dist/effects/GodRays.d.ts +1 -1
- package/dist/effects/Grid.d.ts +7 -6
- package/dist/effects/HueSaturation.d.ts +14 -1
- package/dist/effects/LUT.d.ts +1 -1
- package/dist/effects/LensFlare.d.ts +46 -5
- package/dist/effects/Noise.d.ts +7 -1
- package/dist/effects/Outline.d.ts +6 -3
- package/dist/effects/Pixelation.d.ts +1 -1
- package/dist/effects/Ramp.d.ts +58 -6
- package/dist/effects/SMAA.d.ts +9 -1
- package/dist/effects/SSAO.d.ts +1 -1
- package/dist/effects/ScanlineEffect.d.ts +12 -1
- package/dist/effects/SelectiveBloom.d.ts +1 -1
- package/dist/effects/Sepia.d.ts +12 -1
- package/dist/effects/ShockWave.d.ts +11 -1
- package/dist/effects/Texture.d.ts +4 -4
- package/dist/effects/TiltShift.d.ts +9 -1
- package/dist/effects/TiltShift2.d.ts +44 -4
- package/dist/effects/ToneMapping.d.ts +9 -3
- package/dist/effects/Vignette.d.ts +18 -1
- package/dist/effects/Water.d.ts +17 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +2205 -713
- package/dist/index.js.map +1 -1
- package/dist/passes/DepthPicking.d.ts +11 -0
- package/dist/{effects → passes}/N8AO.d.ts +2 -1
- package/dist/util.d.ts +9 -15
- package/dist/wrapEffect.d.ts +3 -3
- package/package.json +4 -3
- package/src/EffectComposer.tsx +143 -42
- package/src/EffectGroup.tsx +74 -0
- package/src/createEffectComponent.tsx +71 -0
- package/src/effects/ASCII.tsx +75 -28
- package/src/effects/Autofocus.tsx +24 -77
- package/src/effects/Bloom.tsx +32 -4
- package/src/effects/BrightnessContrast.tsx +5 -2
- package/src/effects/ChromaticAberration.tsx +13 -21
- package/src/effects/ColorAverage.tsx +3 -16
- package/src/effects/ColorDepth.tsx +23 -2
- package/src/effects/Depth.tsx +4 -2
- package/src/effects/DepthOfField.tsx +48 -26
- package/src/effects/DotScreen.tsx +5 -2
- package/src/effects/FXAA.tsx +4 -2
- package/src/effects/Glitch.tsx +26 -31
- package/src/effects/GodRays.tsx +90 -6
- package/src/effects/Grid.tsx +17 -18
- package/src/effects/HueSaturation.tsx +5 -2
- package/src/effects/LUT.tsx +9 -11
- package/src/effects/LensFlare.tsx +209 -55
- package/src/effects/Noise.tsx +14 -2
- package/src/effects/Outline.tsx +55 -56
- package/src/effects/Pixelation.tsx +11 -8
- package/src/effects/Ramp.tsx +96 -7
- package/src/effects/SMAA.tsx +18 -2
- package/src/effects/SSAO.tsx +130 -22
- package/src/effects/ScanlineEffect.tsx +6 -6
- package/src/effects/SelectiveBloom.tsx +26 -44
- package/src/effects/Sepia.tsx +4 -2
- package/src/effects/ShockWave.tsx +30 -2
- package/src/effects/Texture.tsx +10 -9
- package/src/effects/TiltShift.tsx +30 -2
- package/src/effects/TiltShift2.tsx +72 -6
- package/src/effects/ToneMapping.tsx +16 -3
- package/src/effects/Vignette.tsx +5 -2
- package/src/effects/Water.tsx +21 -6
- package/src/index.ts +4 -2
- package/src/passes/DepthPicking.tsx +63 -0
- package/src/{effects → passes}/N8AO.tsx +28 -4
- package/src/tests/Autofocus.test.tsx +38 -0
- package/src/tests/Bloom.test.tsx +76 -0
- package/src/tests/ChromaticAberration.test.tsx +50 -0
- package/src/tests/ColorDepth.test.tsx +71 -0
- package/src/tests/DepthOfField.test.tsx +130 -0
- package/src/tests/DepthPicking.test.tsx +250 -0
- package/src/tests/EffectComposer.test.tsx +501 -8
- package/src/tests/EffectGroup.test.tsx +337 -0
- package/src/tests/Glitch.test.tsx +56 -0
- package/src/tests/GodRays.test.tsx +101 -0
- package/src/tests/Grid.test.tsx +34 -0
- package/src/tests/LUT.test.tsx +64 -0
- package/src/tests/N8AO.test.tsx +92 -0
- package/src/tests/Outline.test.tsx +122 -0
- package/src/tests/SSAO.test.tsx +140 -0
- package/src/tests/SelectiveBloom.test.tsx +48 -0
- package/src/tests/ShockWave.test.tsx +95 -0
- package/src/tests/TiltShift.test.tsx +76 -0
- package/src/tests/createEffectComponent.test.tsx +286 -0
- package/src/tests/effects.smoke.test.tsx +46 -42
- package/src/util.tsx +148 -23
- package/src/wrapEffect.tsx +3 -2
- package/dist/tests/test-utils.d.ts +0 -12
package/dist/effects/Sepia.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import { SepiaEffect } from 'postprocessing';
|
|
2
|
-
export declare const Sepia: (props:
|
|
2
|
+
export declare const Sepia: (props: {
|
|
3
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
4
|
+
intensity?: number;
|
|
5
|
+
} & {
|
|
6
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
7
|
+
opacity?: number;
|
|
8
|
+
args?: [({
|
|
9
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
10
|
+
intensity?: number;
|
|
11
|
+
} | undefined)?] | undefined;
|
|
12
|
+
ref?: import("react").Ref<SepiaEffect> | undefined;
|
|
13
|
+
}) => import("react").JSX.Element;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
import type { ReactThreeFiber } from '@react-three/fiber';
|
|
1
2
|
import { ShockWaveEffect } from 'postprocessing';
|
|
2
|
-
|
|
3
|
+
import { Ref } from 'react';
|
|
4
|
+
export type ShockWaveProps = {
|
|
5
|
+
position?: ReactThreeFiber.Vector3;
|
|
6
|
+
speed?: number;
|
|
7
|
+
maxRadius?: number;
|
|
8
|
+
waveSize?: number;
|
|
9
|
+
amplitude?: number;
|
|
10
|
+
ref?: Ref<ShockWaveEffect>;
|
|
11
|
+
};
|
|
12
|
+
export declare function ShockWave(props: ShockWaveProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TextureEffect } from 'postprocessing';
|
|
2
|
-
import { Ref } from 'react';
|
|
3
|
-
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
import { type EffectOptions } from '../createEffectComponent';
|
|
4
|
+
export type TextureProps = EffectOptions<typeof TextureEffect> & {
|
|
4
5
|
textureSrc: string;
|
|
5
6
|
/** opacity of provided texture */
|
|
6
7
|
opacity?: number;
|
|
7
8
|
ref?: Ref<TextureEffect>;
|
|
8
9
|
};
|
|
9
|
-
export declare function Texture({ textureSrc, texture, opacity,
|
|
10
|
-
export {};
|
|
10
|
+
export declare function Texture({ textureSrc, texture, opacity, ...props }: TextureProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
import { TiltShiftEffect } from 'postprocessing';
|
|
2
|
-
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
import { type EffectOptions } from '../createEffectComponent';
|
|
4
|
+
type TiltShiftOptions = EffectOptions<typeof TiltShiftEffect>;
|
|
5
|
+
export type TiltShiftProps = TiltShiftOptions & {
|
|
6
|
+
opacity?: number;
|
|
7
|
+
ref?: Ref<TiltShiftEffect>;
|
|
8
|
+
};
|
|
9
|
+
export declare function TiltShift({ blendFunction, kernelSize, resolutionScale, resolutionX, resolutionY, ...liveProps }: TiltShiftProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { BlendFunction, Effect } from 'postprocessing';
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
type Vec2Tuple = [number, number];
|
|
2
4
|
export declare class TiltShiftEffect extends Effect {
|
|
3
5
|
constructor({ blendFunction, blur, // [0, 1], can go beyond 1 for extra
|
|
4
6
|
taper, // [0, 1], can go beyond 1 for extra
|
|
@@ -9,10 +11,48 @@ export declare class TiltShiftEffect extends Effect {
|
|
|
9
11
|
blendFunction?: BlendFunction | undefined;
|
|
10
12
|
blur?: number | undefined;
|
|
11
13
|
taper?: number | undefined;
|
|
12
|
-
start?:
|
|
13
|
-
end?:
|
|
14
|
+
start?: Vec2Tuple | undefined;
|
|
15
|
+
end?: Vec2Tuple | undefined;
|
|
14
16
|
samples?: number | undefined;
|
|
15
|
-
direction?:
|
|
17
|
+
direction?: Vec2Tuple | undefined;
|
|
16
18
|
});
|
|
19
|
+
private u;
|
|
20
|
+
private setU;
|
|
21
|
+
get blur(): number;
|
|
22
|
+
set blur(value: number);
|
|
23
|
+
get taper(): number;
|
|
24
|
+
set taper(value: number);
|
|
25
|
+
get start(): Vec2Tuple;
|
|
26
|
+
set start(value: Vec2Tuple);
|
|
27
|
+
get end(): Vec2Tuple;
|
|
28
|
+
set end(value: Vec2Tuple);
|
|
29
|
+
get samples(): number;
|
|
30
|
+
set samples(value: number);
|
|
31
|
+
get direction(): Vec2Tuple;
|
|
32
|
+
set direction(value: Vec2Tuple);
|
|
17
33
|
}
|
|
18
|
-
export
|
|
34
|
+
export type TiltShift2Props = {
|
|
35
|
+
blendFunction?: BlendFunction;
|
|
36
|
+
blur?: number;
|
|
37
|
+
taper?: number;
|
|
38
|
+
start?: Vec2Tuple;
|
|
39
|
+
end?: Vec2Tuple;
|
|
40
|
+
samples?: number;
|
|
41
|
+
direction?: Vec2Tuple;
|
|
42
|
+
ref?: Ref<TiltShiftEffect>;
|
|
43
|
+
};
|
|
44
|
+
export declare const TiltShift2: (props: TiltShift2Props & {
|
|
45
|
+
blendFunction?: BlendFunction;
|
|
46
|
+
opacity?: number;
|
|
47
|
+
args?: [({
|
|
48
|
+
blendFunction?: BlendFunction | undefined;
|
|
49
|
+
blur?: number | undefined;
|
|
50
|
+
taper?: number | undefined;
|
|
51
|
+
start?: Vec2Tuple | undefined;
|
|
52
|
+
end?: Vec2Tuple | undefined;
|
|
53
|
+
samples?: number | undefined;
|
|
54
|
+
direction?: Vec2Tuple | undefined;
|
|
55
|
+
} | undefined)?] | undefined;
|
|
56
|
+
ref?: Ref<TiltShiftEffect> | undefined;
|
|
57
|
+
}) => import("react").JSX.Element;
|
|
58
|
+
export {};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { ToneMappingEffect } from 'postprocessing';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
import { type EffectOptions } from '../createEffectComponent';
|
|
4
|
+
type ToneMappingOptions = EffectOptions<typeof ToneMappingEffect>;
|
|
5
|
+
export type ToneMappingProps = ToneMappingOptions & {
|
|
6
|
+
opacity?: number;
|
|
7
|
+
ref?: Ref<ToneMappingEffect>;
|
|
8
|
+
};
|
|
9
|
+
export declare function ToneMapping({ minLuminance, maxLuminance, ...liveProps }: ToneMappingProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
import { VignetteEffect } from 'postprocessing';
|
|
2
|
-
export declare const Vignette: (props:
|
|
2
|
+
export declare const Vignette: (props: {
|
|
3
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
4
|
+
technique?: import("postprocessing").VignetteTechnique;
|
|
5
|
+
eskil?: boolean;
|
|
6
|
+
offset?: number;
|
|
7
|
+
darkness?: number;
|
|
8
|
+
} & {
|
|
9
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
10
|
+
opacity?: number;
|
|
11
|
+
args?: [({
|
|
12
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
13
|
+
technique?: import("postprocessing").VignetteTechnique;
|
|
14
|
+
eskil?: boolean;
|
|
15
|
+
offset?: number;
|
|
16
|
+
darkness?: number;
|
|
17
|
+
} | undefined)?] | undefined;
|
|
18
|
+
ref?: import("react").Ref<VignetteEffect> | undefined;
|
|
19
|
+
}) => import("react").JSX.Element;
|
package/dist/effects/Water.d.ts
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import { BlendFunction, Effect } from 'postprocessing';
|
|
2
|
+
import type { Ref } from 'react';
|
|
2
3
|
export declare class WaterEffectImpl extends Effect {
|
|
3
4
|
constructor({ blendFunction, factor }?: {
|
|
4
5
|
blendFunction?: BlendFunction | undefined;
|
|
5
6
|
factor?: number | undefined;
|
|
6
7
|
});
|
|
8
|
+
get factor(): number;
|
|
9
|
+
set factor(value: number);
|
|
7
10
|
}
|
|
8
|
-
export
|
|
11
|
+
export type WaterEffectProps = {
|
|
12
|
+
blendFunction?: BlendFunction;
|
|
13
|
+
factor?: number;
|
|
14
|
+
ref?: Ref<WaterEffectImpl>;
|
|
15
|
+
};
|
|
16
|
+
export declare const WaterEffect: (props: WaterEffectProps & {
|
|
17
|
+
blendFunction?: BlendFunction;
|
|
18
|
+
opacity?: number;
|
|
19
|
+
args?: [({
|
|
20
|
+
blendFunction?: BlendFunction | undefined;
|
|
21
|
+
factor?: number | undefined;
|
|
22
|
+
} | undefined)?] | undefined;
|
|
23
|
+
ref?: Ref<WaterEffectImpl> | undefined;
|
|
24
|
+
}) => import("react").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export * from './createEffectComponent';
|
|
1
2
|
export * from './EffectComposer';
|
|
3
|
+
export * from './EffectGroup';
|
|
2
4
|
export * from './Selection';
|
|
3
5
|
export * from './util';
|
|
4
6
|
export * from './wrapEffect';
|
|
@@ -35,4 +37,5 @@ export * from './effects/TiltShift2';
|
|
|
35
37
|
export * from './effects/ToneMapping';
|
|
36
38
|
export * from './effects/Vignette';
|
|
37
39
|
export * from './effects/Water';
|
|
38
|
-
export * from './
|
|
40
|
+
export * from './passes/DepthPicking';
|
|
41
|
+
export * from './passes/N8AO';
|