@react-three/postprocessing 3.0.4 → 3.0.5
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/LICENSE +21 -21
- package/README.md +81 -81
- package/dist/EffectComposer.d.ts +7 -6
- package/dist/Selection.d.ts +8 -8
- package/dist/effects/ASCII.d.ts +5 -4
- package/dist/effects/Autofocus.d.ts +8 -7
- package/dist/effects/Bloom.d.ts +2 -5
- package/dist/effects/BrightnessContrast.d.ts +2 -5
- package/dist/effects/ChromaticAberration.d.ts +7 -7
- package/dist/effects/ColorAverage.d.ts +7 -8
- package/dist/effects/ColorDepth.d.ts +2 -5
- package/dist/effects/Depth.d.ts +2 -5
- package/dist/effects/DepthOfField.d.ts +7 -18
- package/dist/effects/DotScreen.d.ts +2 -5
- package/dist/effects/FXAA.d.ts +2 -5
- package/dist/effects/Glitch.d.ts +4 -21
- package/dist/effects/GodRays.d.ts +7 -19
- package/dist/effects/Grid.d.ts +6 -7
- package/dist/effects/HueSaturation.d.ts +2 -5
- package/dist/effects/LUT.d.ts +4 -3
- package/dist/effects/LensFlare.d.ts +8 -8
- package/dist/effects/N8AO.d.ts +4 -2
- package/dist/effects/Noise.d.ts +2 -5
- package/dist/effects/Outline.d.ts +4 -23
- package/dist/effects/Pixelation.d.ts +3 -2
- package/dist/effects/Ramp.d.ts +1 -5
- package/dist/effects/SMAA.d.ts +2 -5
- package/dist/effects/SSAO.d.ts +7 -30
- package/dist/effects/ScanlineEffect.d.ts +2 -5
- package/dist/effects/SelectiveBloom.d.ts +5 -10
- package/dist/effects/Sepia.d.ts +2 -5
- package/dist/effects/ShockWave.d.ts +2 -5
- package/dist/effects/Texture.d.ts +7 -8
- package/dist/effects/TiltShift.d.ts +2 -5
- package/dist/effects/TiltShift2.d.ts +1 -5
- package/dist/effects/ToneMapping.d.ts +2 -6
- package/dist/effects/Vignette.d.ts +2 -5
- package/dist/effects/Water.d.ts +1 -5
- package/dist/index.d.ts +11 -10
- package/dist/index.js +855 -551
- package/dist/index.js.map +1 -1
- package/dist/tests/test-utils.d.ts +12 -0
- package/dist/util.d.ts +25 -17
- package/dist/wrapEffect.d.ts +12 -0
- package/package.json +73 -67
- package/src/EffectComposer.tsx +278 -200
- package/src/Selection.tsx +86 -46
- package/src/effects/ASCII.tsx +136 -135
- package/src/effects/Autofocus.tsx +175 -153
- package/src/effects/Bloom.tsx +6 -6
- package/src/effects/BrightnessContrast.tsx +4 -4
- package/src/effects/ChromaticAberration.tsx +30 -5
- package/src/effects/ColorAverage.tsx +17 -15
- package/src/effects/ColorDepth.tsx +4 -4
- package/src/effects/Depth.tsx +4 -4
- package/src/effects/DepthOfField.tsx +87 -89
- package/src/effects/DotScreen.tsx +4 -4
- package/src/effects/FXAA.tsx +4 -4
- package/src/effects/Glitch.tsx +37 -40
- package/src/effects/GodRays.tsx +20 -16
- package/src/effects/Grid.tsx +28 -21
- package/src/effects/HueSaturation.tsx +4 -4
- package/src/effects/LUT.tsx +27 -26
- package/src/effects/LensFlare.tsx +611 -611
- package/src/effects/N8AO.tsx +81 -81
- package/src/effects/Noise.tsx +4 -4
- package/src/effects/Outline.tsx +85 -117
- package/src/effects/Pixelation.tsx +17 -15
- package/src/effects/Ramp.tsx +150 -150
- package/src/effects/SMAA.tsx +4 -4
- package/src/effects/SSAO.tsx +44 -41
- package/src/effects/ScanlineEffect.tsx +7 -7
- package/src/effects/SelectiveBloom.tsx +116 -126
- package/src/effects/Sepia.tsx +4 -4
- package/src/effects/ShockWave.tsx +4 -4
- package/src/effects/Texture.tsx +27 -23
- package/src/effects/TiltShift.tsx +4 -4
- package/src/effects/TiltShift2.tsx +90 -90
- package/src/effects/ToneMapping.tsx +6 -6
- package/src/effects/Vignette.tsx +4 -4
- package/src/effects/Water.tsx +35 -35
- package/src/index.ts +41 -40
- package/src/tests/ChromaticAberration.test.tsx +31 -0
- package/src/tests/EffectComposer.test.tsx +911 -0
- package/src/tests/Outline.test.tsx +89 -0
- package/src/tests/Selection.test.tsx +324 -0
- package/src/tests/SelectiveBloom.test.tsx +118 -0
- package/src/tests/effects.smoke.test.tsx +234 -0
- package/src/tests/test-utils.tsx +96 -0
- package/src/tests/wrapEffect.test.tsx +209 -0
- package/src/util.tsx +96 -55
- package/src/wrapEffect.tsx +122 -0
- package/src/EffectComposer.test.tsx +0 -126
|
@@ -1,30 +1,11 @@
|
|
|
1
1
|
import { OutlineEffect } from 'postprocessing';
|
|
2
|
-
import { RefObject } from 'react';
|
|
2
|
+
import { Ref, RefObject } from 'react';
|
|
3
3
|
import { Object3D } from 'three';
|
|
4
|
-
type ObjectRef = RefObject<Object3D>;
|
|
4
|
+
type ObjectRef = RefObject<Object3D | null>;
|
|
5
5
|
export type OutlineProps = ConstructorParameters<typeof OutlineEffect>[2] & Partial<{
|
|
6
6
|
selection: Object3D | Object3D[] | ObjectRef | ObjectRef[];
|
|
7
7
|
selectionLayer: number;
|
|
8
|
+
ref?: Ref<OutlineEffect>;
|
|
8
9
|
}>;
|
|
9
|
-
export declare
|
|
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>>;
|
|
10
|
+
export declare function Outline({ selection, selectionLayer, blendFunction, patternTexture, patternScale, edgeStrength, pulseSpeed, visibleEdgeColor, hiddenEdgeColor, multisampling, resolutionScale, resolutionX, resolutionY, width, height, kernelSize, blur, xRay, ref, }: OutlineProps): import("react").JSX.Element;
|
|
30
11
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PixelationEffect } from 'postprocessing';
|
|
2
|
+
import { Ref } from 'react';
|
|
3
3
|
export type PixelationProps = {
|
|
4
4
|
granularity?: number;
|
|
5
|
+
ref?: Ref<PixelationEffect>;
|
|
5
6
|
};
|
|
6
|
-
export declare
|
|
7
|
+
export declare function Pixelation({ granularity, ref }: PixelationProps): import("react").JSX.Element;
|
package/dist/effects/Ramp.d.ts
CHANGED
|
@@ -71,8 +71,4 @@ export declare class RampEffect extends Effect {
|
|
|
71
71
|
rampInvert?: boolean | undefined;
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
export declare const Ramp: (
|
|
75
|
-
[x: string]: any;
|
|
76
|
-
blendFunction?: any;
|
|
77
|
-
opacity?: any;
|
|
78
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
export declare const Ramp: (props: import("..").EffectProps<typeof RampEffect>) => import("react").JSX.Element;
|
package/dist/effects/SMAA.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
blendFunction?: any;
|
|
4
|
-
opacity?: any;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { SMAAEffect } from 'postprocessing';
|
|
2
|
+
export declare const SMAA: (props: import("..").EffectProps<typeof SMAAEffect>) => import("react").JSX.Element;
|
package/dist/effects/SSAO.d.ts
CHANGED
|
@@ -1,30 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
samples?: number | undefined;
|
|
9
|
-
rings?: number | undefined;
|
|
10
|
-
worldDistanceThreshold?: number | undefined;
|
|
11
|
-
worldDistanceFalloff?: number | undefined;
|
|
12
|
-
worldProximityThreshold?: number | undefined;
|
|
13
|
-
worldProximityFalloff?: number | undefined;
|
|
14
|
-
distanceThreshold?: number | undefined;
|
|
15
|
-
distanceFalloff?: number | undefined;
|
|
16
|
-
rangeThreshold?: number | undefined;
|
|
17
|
-
rangeFalloff?: number | undefined;
|
|
18
|
-
minRadiusScale?: number | undefined;
|
|
19
|
-
luminanceInfluence?: number | undefined;
|
|
20
|
-
radius?: number | undefined;
|
|
21
|
-
intensity?: number | undefined;
|
|
22
|
-
bias?: number | undefined;
|
|
23
|
-
fade?: number | undefined;
|
|
24
|
-
color?: import("three").Color | undefined;
|
|
25
|
-
resolutionScale?: number | undefined;
|
|
26
|
-
resolutionX?: number | undefined;
|
|
27
|
-
resolutionY?: number | undefined;
|
|
28
|
-
width?: number | undefined;
|
|
29
|
-
height?: number | undefined;
|
|
30
|
-
} & import("react").RefAttributes<SSAOEffect>>;
|
|
1
|
+
import { SSAOEffect } from 'postprocessing';
|
|
2
|
+
import { Ref } from 'react';
|
|
3
|
+
type SSAOProps = ConstructorParameters<typeof SSAOEffect>[2] & {
|
|
4
|
+
ref?: Ref<SSAOEffect>;
|
|
5
|
+
};
|
|
6
|
+
export declare function SSAO({ ref, ...props }: SSAOProps): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
blendFunction?: any;
|
|
4
|
-
opacity?: any;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { ScanlineEffect } from 'postprocessing';
|
|
2
|
+
export declare const Scanline: (props: import("..").EffectProps<typeof ScanlineEffect>) => import("react").JSX.Element;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { SelectiveBloomEffect } from 'postprocessing';
|
|
2
1
|
import type { BloomEffectOptions } from 'postprocessing';
|
|
3
|
-
import
|
|
2
|
+
import { SelectiveBloomEffect } from 'postprocessing';
|
|
3
|
+
import { Ref, RefObject } from 'react';
|
|
4
4
|
import { Object3D } from 'three';
|
|
5
|
-
type ObjectRef = RefObject<Object3D>;
|
|
5
|
+
type ObjectRef = RefObject<Object3D | null>;
|
|
6
6
|
export type SelectiveBloomProps = BloomEffectOptions & Partial<{
|
|
7
7
|
lights: Object3D[] | ObjectRef[];
|
|
8
8
|
selection: Object3D | Object3D[] | ObjectRef | ObjectRef[];
|
|
9
9
|
selectionLayer: number;
|
|
10
10
|
inverted: boolean;
|
|
11
11
|
ignoreBackground: boolean;
|
|
12
|
+
ref?: Ref<SelectiveBloomEffect>;
|
|
12
13
|
}>;
|
|
13
|
-
export declare
|
|
14
|
-
lights: Object3D[] | ObjectRef[];
|
|
15
|
-
selection: Object3D | Object3D[] | ObjectRef | ObjectRef[];
|
|
16
|
-
selectionLayer: number;
|
|
17
|
-
inverted: boolean;
|
|
18
|
-
ignoreBackground: boolean;
|
|
19
|
-
}> & React.RefAttributes<SelectiveBloomEffect>>;
|
|
14
|
+
export declare function SelectiveBloom({ selection, selectionLayer, lights, inverted, ignoreBackground, luminanceThreshold, luminanceSmoothing, mipmapBlur, intensity, radius, levels, kernelSize, resolutionScale, width, height, resolutionX, resolutionY, ref, }: SelectiveBloomProps): import("react").JSX.Element;
|
|
20
15
|
export {};
|
package/dist/effects/Sepia.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
blendFunction?: any;
|
|
4
|
-
opacity?: any;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { SepiaEffect } from 'postprocessing';
|
|
2
|
+
export declare const Sepia: (props: import("..").EffectProps<typeof SepiaEffect>) => import("react").JSX.Element;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
blendFunction?: any;
|
|
4
|
-
opacity?: any;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { ShockWaveEffect } from 'postprocessing';
|
|
2
|
+
export declare const ShockWave: (props: import("..").EffectProps<typeof ShockWaveEffect>) => import("react").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TextureEffect } from 'postprocessing';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
texture?: import("three").Texture | undefined;
|
|
6
|
-
aspectCorrection?: boolean | undefined;
|
|
7
|
-
} & {
|
|
2
|
+
import { Ref } from 'react';
|
|
3
|
+
type TextureProps = ConstructorParameters<typeof TextureEffect>[0] & {
|
|
8
4
|
textureSrc: string;
|
|
9
5
|
/** opacity of provided texture */
|
|
10
|
-
opacity?: number
|
|
11
|
-
|
|
6
|
+
opacity?: number;
|
|
7
|
+
ref?: Ref<TextureEffect>;
|
|
8
|
+
};
|
|
9
|
+
export declare function Texture({ textureSrc, texture, opacity, ref, ...props }: TextureProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
blendFunction?: any;
|
|
4
|
-
opacity?: any;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { TiltShiftEffect } from 'postprocessing';
|
|
2
|
+
export declare const TiltShift: (props: import("..").EffectProps<typeof TiltShiftEffect>) => import("react").JSX.Element;
|
|
@@ -15,8 +15,4 @@ export declare class TiltShiftEffect extends Effect {
|
|
|
15
15
|
direction?: number[] | undefined;
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
export declare const TiltShift2: (
|
|
19
|
-
[x: string]: any;
|
|
20
|
-
blendFunction?: any;
|
|
21
|
-
opacity?: any;
|
|
22
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const TiltShift2: (props: import("..").EffectProps<typeof TiltShiftEffect>) => import("react").JSX.Element;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { ToneMappingEffect } from 'postprocessing';
|
|
2
|
-
import { type EffectProps } from '../
|
|
2
|
+
import { type EffectProps } from '../wrapEffect';
|
|
3
3
|
export type ToneMappingProps = EffectProps<typeof ToneMappingEffect>;
|
|
4
|
-
export declare const ToneMapping: (
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
blendFunction?: any;
|
|
7
|
-
opacity?: any;
|
|
8
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const ToneMapping: (props: EffectProps<typeof ToneMappingEffect>) => import("react").JSX.Element;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
blendFunction?: any;
|
|
4
|
-
opacity?: any;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { VignetteEffect } from 'postprocessing';
|
|
2
|
+
export declare const Vignette: (props: import("..").EffectProps<typeof VignetteEffect>) => import("react").JSX.Element;
|
package/dist/effects/Water.d.ts
CHANGED
|
@@ -5,8 +5,4 @@ export declare class WaterEffectImpl extends Effect {
|
|
|
5
5
|
factor?: number | undefined;
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
|
-
export declare const WaterEffect: (
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
blendFunction?: any;
|
|
11
|
-
opacity?: any;
|
|
12
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const WaterEffect: (props: import("..").EffectProps<typeof WaterEffectImpl>) => import("react").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export * from './Selection';
|
|
2
1
|
export * from './EffectComposer';
|
|
2
|
+
export * from './Selection';
|
|
3
3
|
export * from './util';
|
|
4
|
+
export * from './wrapEffect';
|
|
5
|
+
export * from './effects/ASCII';
|
|
4
6
|
export * from './effects/Autofocus';
|
|
5
|
-
export * from './effects/LensFlare';
|
|
6
7
|
export * from './effects/Bloom';
|
|
7
8
|
export * from './effects/BrightnessContrast';
|
|
8
9
|
export * from './effects/ChromaticAberration';
|
|
@@ -11,27 +12,27 @@ export * from './effects/ColorDepth';
|
|
|
11
12
|
export * from './effects/Depth';
|
|
12
13
|
export * from './effects/DepthOfField';
|
|
13
14
|
export * from './effects/DotScreen';
|
|
15
|
+
export * from './effects/FXAA';
|
|
14
16
|
export * from './effects/Glitch';
|
|
15
17
|
export * from './effects/GodRays';
|
|
16
18
|
export * from './effects/Grid';
|
|
17
19
|
export * from './effects/HueSaturation';
|
|
20
|
+
export * from './effects/LensFlare';
|
|
21
|
+
export * from './effects/LUT';
|
|
18
22
|
export * from './effects/Noise';
|
|
19
23
|
export * from './effects/Outline';
|
|
20
24
|
export * from './effects/Pixelation';
|
|
25
|
+
export * from './effects/Ramp';
|
|
21
26
|
export * from './effects/ScanlineEffect';
|
|
22
27
|
export * from './effects/SelectiveBloom';
|
|
23
28
|
export * from './effects/Sepia';
|
|
24
|
-
export * from './effects/
|
|
29
|
+
export * from './effects/ShockWave';
|
|
25
30
|
export * from './effects/SMAA';
|
|
26
|
-
export * from './effects/
|
|
27
|
-
export * from './effects/Ramp';
|
|
31
|
+
export * from './effects/SSAO';
|
|
28
32
|
export * from './effects/Texture';
|
|
29
|
-
export * from './effects/ToneMapping';
|
|
30
|
-
export * from './effects/Vignette';
|
|
31
|
-
export * from './effects/ShockWave';
|
|
32
|
-
export * from './effects/LUT';
|
|
33
33
|
export * from './effects/TiltShift';
|
|
34
34
|
export * from './effects/TiltShift2';
|
|
35
|
-
export * from './effects/
|
|
35
|
+
export * from './effects/ToneMapping';
|
|
36
|
+
export * from './effects/Vignette';
|
|
36
37
|
export * from './effects/Water';
|
|
37
38
|
export * from './effects/N8AO';
|