@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.
- package/LICENSE +21 -21
- package/README.md +81 -81
- package/dist/EffectComposer.d.ts +27 -0
- package/dist/Selection.d.ts +17 -0
- package/dist/effects/ASCII.d.ts +18 -0
- package/dist/effects/Autofocus.d.ts +22 -0
- package/dist/effects/Bloom.d.ts +5 -0
- package/dist/effects/BrightnessContrast.d.ts +5 -0
- package/dist/effects/ChromaticAberration.d.ts +8 -0
- package/dist/effects/ColorAverage.d.ts +8 -0
- package/dist/effects/ColorDepth.d.ts +5 -0
- package/dist/effects/Depth.d.ts +5 -0
- package/dist/effects/DepthOfField.d.ts +25 -0
- package/dist/effects/DotScreen.d.ts +5 -0
- package/dist/effects/FXAA.d.ts +5 -0
- package/dist/effects/Glitch.d.ts +30 -0
- package/dist/effects/GodRays.d.ts +21 -0
- package/dist/effects/Grid.d.ts +12 -0
- package/dist/effects/HueSaturation.d.ts +5 -0
- package/dist/effects/LUT.d.ts +9 -0
- package/dist/effects/LensFlare.d.ts +54 -0
- package/dist/effects/N8AO.d.ts +17 -0
- package/dist/effects/Noise.d.ts +5 -0
- package/dist/effects/Outline.d.ts +30 -0
- package/dist/effects/Pixelation.d.ts +6 -0
- package/dist/effects/Ramp.d.ts +78 -0
- package/dist/effects/SMAA.d.ts +5 -0
- package/dist/effects/SSAO.d.ts +30 -0
- package/dist/effects/ScanlineEffect.d.ts +5 -0
- package/dist/effects/SelectiveBloom.d.ts +20 -0
- package/dist/effects/Sepia.d.ts +5 -0
- package/dist/effects/ShockWave.d.ts +5 -0
- package/dist/effects/Texture.d.ts +11 -0
- package/dist/effects/TiltShift.d.ts +5 -0
- package/dist/effects/TiltShift2.d.ts +22 -0
- package/dist/effects/ToneMapping.d.ts +8 -0
- package/dist/effects/Vignette.d.ts +5 -0
- package/dist/effects/Water.d.ts +12 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +555 -0
- package/dist/index.js.map +1 -0
- package/dist/util.d.ts +17 -0
- package/package.json +67 -68
- package/src/EffectComposer.test.tsx +126 -126
- package/src/EffectComposer.tsx +200 -200
- package/src/Selection.tsx +46 -46
- package/src/effects/ASCII.tsx +135 -135
- package/src/effects/Autofocus.tsx +153 -153
- package/src/effects/Bloom.tsx +6 -6
- package/src/effects/BrightnessContrast.tsx +4 -4
- package/src/effects/ChromaticAberration.tsx +5 -5
- package/src/effects/ColorAverage.tsx +15 -15
- package/src/effects/ColorDepth.tsx +4 -4
- package/src/effects/Depth.tsx +4 -4
- package/src/effects/DepthOfField.tsx +89 -89
- package/src/effects/DotScreen.tsx +4 -4
- package/src/effects/FXAA.tsx +4 -4
- package/src/effects/Glitch.tsx +40 -40
- package/src/effects/GodRays.tsx +16 -16
- package/src/effects/Grid.tsx +21 -21
- package/src/effects/HueSaturation.tsx +4 -4
- package/src/effects/LUT.tsx +26 -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 +117 -117
- package/src/effects/Pixelation.tsx +15 -15
- package/src/effects/Ramp.tsx +150 -150
- package/src/effects/SMAA.tsx +4 -4
- package/src/effects/SSAO.tsx +41 -41
- package/src/effects/ScanlineEffect.tsx +7 -7
- package/src/effects/SelectiveBloom.tsx +126 -126
- package/src/effects/Sepia.tsx +4 -4
- package/src/effects/ShockWave.tsx +4 -4
- package/src/effects/Texture.tsx +23 -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 +40 -40
- package/src/util.tsx +55 -55
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Effect } from 'postprocessing';
|
|
2
|
+
export declare enum RampType {
|
|
3
|
+
Linear = 0,
|
|
4
|
+
Radial = 1,
|
|
5
|
+
MirroredLinear = 2
|
|
6
|
+
}
|
|
7
|
+
export declare class RampEffect extends Effect {
|
|
8
|
+
constructor({
|
|
9
|
+
/**
|
|
10
|
+
* Type of ramp gradient.
|
|
11
|
+
*/
|
|
12
|
+
rampType,
|
|
13
|
+
/**
|
|
14
|
+
* Starting point of the ramp gradient in normalized coordinates.
|
|
15
|
+
*
|
|
16
|
+
* Ranges from `[0 - 1]` as `[x, y]`. Default is `[0.5, 0.5]`.
|
|
17
|
+
*/
|
|
18
|
+
rampStart,
|
|
19
|
+
/**
|
|
20
|
+
* Ending point of the ramp gradient in normalized coordinates.
|
|
21
|
+
*
|
|
22
|
+
* Ranges from `[0 - 1]` as `[x, y]`. Default is `[1, 1]`
|
|
23
|
+
*/
|
|
24
|
+
rampEnd,
|
|
25
|
+
/**
|
|
26
|
+
* Color at the starting point of the gradient.
|
|
27
|
+
*
|
|
28
|
+
* Default is black: `[0, 0, 0, 1]`
|
|
29
|
+
*/
|
|
30
|
+
startColor,
|
|
31
|
+
/**
|
|
32
|
+
* Color at the ending point of the gradient.
|
|
33
|
+
*
|
|
34
|
+
* Default is white: `[1, 1, 1, 1]`
|
|
35
|
+
*/
|
|
36
|
+
endColor,
|
|
37
|
+
/**
|
|
38
|
+
* Bias for the interpolation curve when both bias and gain are 0.5.
|
|
39
|
+
*
|
|
40
|
+
* Ranges from `[0 - 1]`. Default is `0.5`.
|
|
41
|
+
*/
|
|
42
|
+
rampBias,
|
|
43
|
+
/**
|
|
44
|
+
* Gain for the interpolation curve when both bias and gain are 0.5.
|
|
45
|
+
*
|
|
46
|
+
* Ranges from `[0 - 1]`. Default is `0.5`.
|
|
47
|
+
*/
|
|
48
|
+
rampGain,
|
|
49
|
+
/**
|
|
50
|
+
* When enabled, the ramp gradient is used as an effect mask, and colors are ignored.
|
|
51
|
+
*
|
|
52
|
+
* Default is `false`.
|
|
53
|
+
*/
|
|
54
|
+
rampMask,
|
|
55
|
+
/**
|
|
56
|
+
* Controls whether the ramp gradient is inverted.
|
|
57
|
+
*
|
|
58
|
+
* When disabled, rampStart is transparent and rampEnd is opaque.
|
|
59
|
+
*
|
|
60
|
+
* Default is `false`.
|
|
61
|
+
*/
|
|
62
|
+
rampInvert, ...params }?: {
|
|
63
|
+
rampType?: RampType | undefined;
|
|
64
|
+
rampStart?: number[] | undefined;
|
|
65
|
+
rampEnd?: number[] | undefined;
|
|
66
|
+
startColor?: number[] | undefined;
|
|
67
|
+
endColor?: number[] | undefined;
|
|
68
|
+
rampBias?: number | undefined;
|
|
69
|
+
rampGain?: number | undefined;
|
|
70
|
+
rampMask?: boolean | undefined;
|
|
71
|
+
rampInvert?: boolean | undefined;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export declare const Ramp: ({ blendFunction, opacity, ...props }: {
|
|
75
|
+
[x: string]: any;
|
|
76
|
+
blendFunction?: any;
|
|
77
|
+
opacity?: any;
|
|
78
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SSAOEffect, BlendFunction } from 'postprocessing';
|
|
3
|
+
export declare const SSAO: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
blendFunction?: BlendFunction | undefined;
|
|
5
|
+
distanceScaling?: boolean | undefined;
|
|
6
|
+
depthAwareUpsampling?: boolean | undefined;
|
|
7
|
+
normalDepthBuffer?: import("three").Texture | undefined;
|
|
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>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SelectiveBloomEffect } from 'postprocessing';
|
|
2
|
+
import type { BloomEffectOptions } from 'postprocessing';
|
|
3
|
+
import React, { RefObject } from 'react';
|
|
4
|
+
import { Object3D } from 'three';
|
|
5
|
+
type ObjectRef = RefObject<Object3D>;
|
|
6
|
+
export type SelectiveBloomProps = BloomEffectOptions & Partial<{
|
|
7
|
+
lights: Object3D[] | ObjectRef[];
|
|
8
|
+
selection: Object3D | Object3D[] | ObjectRef | ObjectRef[];
|
|
9
|
+
selectionLayer: number;
|
|
10
|
+
inverted: boolean;
|
|
11
|
+
ignoreBackground: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const SelectiveBloom: React.ForwardRefExoticComponent<BloomEffectOptions & Partial<{
|
|
14
|
+
lights: Object3D[] | ObjectRef[];
|
|
15
|
+
selection: Object3D | Object3D[] | ObjectRef | ObjectRef[];
|
|
16
|
+
selectionLayer: number;
|
|
17
|
+
inverted: boolean;
|
|
18
|
+
ignoreBackground: boolean;
|
|
19
|
+
}> & React.RefAttributes<SelectiveBloomEffect>>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextureEffect } from 'postprocessing';
|
|
3
|
+
export declare const Texture: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
blendFunction?: import("postprocessing").BlendFunction | undefined;
|
|
5
|
+
texture?: import("three").Texture | undefined;
|
|
6
|
+
aspectCorrection?: boolean | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
textureSrc: string;
|
|
9
|
+
/** opacity of provided texture */
|
|
10
|
+
opacity?: number | undefined;
|
|
11
|
+
} & import("react").RefAttributes<TextureEffect>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BlendFunction, Effect } from 'postprocessing';
|
|
2
|
+
export declare class TiltShiftEffect extends Effect {
|
|
3
|
+
constructor({ blendFunction, blur, // [0, 1], can go beyond 1 for extra
|
|
4
|
+
taper, // [0, 1], can go beyond 1 for extra
|
|
5
|
+
start, // [0,1] percentage x,y of screenspace
|
|
6
|
+
end, // [0,1] percentage x,y of screenspace
|
|
7
|
+
samples, // number of blur samples
|
|
8
|
+
direction, }?: {
|
|
9
|
+
blendFunction?: BlendFunction | undefined;
|
|
10
|
+
blur?: number | undefined;
|
|
11
|
+
taper?: number | undefined;
|
|
12
|
+
start?: number[] | undefined;
|
|
13
|
+
end?: number[] | undefined;
|
|
14
|
+
samples?: number | undefined;
|
|
15
|
+
direction?: number[] | undefined;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export declare const TiltShift2: ({ blendFunction, opacity, ...props }: {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
blendFunction?: any;
|
|
21
|
+
opacity?: any;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ToneMappingEffect } from 'postprocessing';
|
|
2
|
+
import { type EffectProps } from '../util';
|
|
3
|
+
export type ToneMappingProps = EffectProps<typeof ToneMappingEffect>;
|
|
4
|
+
export declare const ToneMapping: ({ blendFunction, opacity, ...props }: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
blendFunction?: any;
|
|
7
|
+
opacity?: any;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BlendFunction, Effect } from 'postprocessing';
|
|
2
|
+
export declare class WaterEffectImpl extends Effect {
|
|
3
|
+
constructor({ blendFunction, factor }?: {
|
|
4
|
+
blendFunction?: BlendFunction | undefined;
|
|
5
|
+
factor?: number | undefined;
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export declare const WaterEffect: ({ blendFunction, opacity, ...props }: {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
blendFunction?: any;
|
|
11
|
+
opacity?: any;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export * from './Selection';
|
|
2
|
+
export * from './EffectComposer';
|
|
3
|
+
export * from './util';
|
|
4
|
+
export * from './effects/Autofocus';
|
|
5
|
+
export * from './effects/LensFlare';
|
|
6
|
+
export * from './effects/Bloom';
|
|
7
|
+
export * from './effects/BrightnessContrast';
|
|
8
|
+
export * from './effects/ChromaticAberration';
|
|
9
|
+
export * from './effects/ColorAverage';
|
|
10
|
+
export * from './effects/ColorDepth';
|
|
11
|
+
export * from './effects/Depth';
|
|
12
|
+
export * from './effects/DepthOfField';
|
|
13
|
+
export * from './effects/DotScreen';
|
|
14
|
+
export * from './effects/Glitch';
|
|
15
|
+
export * from './effects/GodRays';
|
|
16
|
+
export * from './effects/Grid';
|
|
17
|
+
export * from './effects/HueSaturation';
|
|
18
|
+
export * from './effects/Noise';
|
|
19
|
+
export * from './effects/Outline';
|
|
20
|
+
export * from './effects/Pixelation';
|
|
21
|
+
export * from './effects/ScanlineEffect';
|
|
22
|
+
export * from './effects/SelectiveBloom';
|
|
23
|
+
export * from './effects/Sepia';
|
|
24
|
+
export * from './effects/SSAO';
|
|
25
|
+
export * from './effects/SMAA';
|
|
26
|
+
export * from './effects/FXAA';
|
|
27
|
+
export * from './effects/Ramp';
|
|
28
|
+
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
|
+
export * from './effects/TiltShift';
|
|
34
|
+
export * from './effects/TiltShift2';
|
|
35
|
+
export * from './effects/ASCII';
|
|
36
|
+
export * from './effects/Water';
|
|
37
|
+
export * from './effects/N8AO';
|