@react-three/postprocessing 3.0.4 → 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/LICENSE +21 -21
- package/README.md +80 -81
- package/dist/EffectComposer.d.ts +14 -6
- package/dist/EffectGroup.d.ts +9 -0
- package/dist/Selection.d.ts +8 -8
- package/dist/createEffectComponent.d.ts +30 -0
- package/dist/effects/ASCII.d.ts +29 -7
- package/dist/effects/Autofocus.d.ts +8 -7
- package/dist/effects/Bloom.d.ts +10 -5
- package/dist/effects/BrightnessContrast.d.ts +15 -5
- package/dist/effects/ChromaticAberration.d.ts +30 -7
- package/dist/effects/ColorAverage.d.ts +7 -8
- package/dist/effects/ColorDepth.d.ts +8 -5
- package/dist/effects/Depth.d.ts +13 -5
- package/dist/effects/DepthOfField.d.ts +7 -18
- package/dist/effects/DotScreen.d.ts +15 -5
- package/dist/effects/FXAA.d.ts +11 -5
- package/dist/effects/Glitch.d.ts +17 -29
- package/dist/effects/GodRays.d.ts +7 -19
- package/dist/effects/Grid.d.ts +8 -8
- package/dist/effects/HueSaturation.d.ts +15 -5
- package/dist/effects/LUT.d.ts +4 -3
- package/dist/effects/LensFlare.d.ts +52 -11
- package/dist/effects/Noise.d.ts +8 -5
- package/dist/effects/Outline.d.ts +9 -25
- package/dist/effects/Pixelation.d.ts +3 -2
- package/dist/effects/Ramp.d.ts +58 -10
- package/dist/effects/SMAA.d.ts +10 -5
- package/dist/effects/SSAO.d.ts +7 -30
- package/dist/effects/ScanlineEffect.d.ts +13 -5
- package/dist/effects/SelectiveBloom.d.ts +5 -10
- package/dist/effects/Sepia.d.ts +13 -5
- package/dist/effects/ShockWave.d.ts +12 -5
- package/dist/effects/Texture.d.ts +7 -8
- package/dist/effects/TiltShift.d.ts +10 -5
- package/dist/effects/TiltShift2.d.ts +44 -8
- package/dist/effects/ToneMapping.d.ts +9 -7
- package/dist/effects/Vignette.d.ts +19 -5
- package/dist/effects/Water.d.ts +17 -5
- package/dist/index.d.ts +15 -11
- package/dist/index.js +1841 -45
- package/dist/index.js.map +1 -1
- package/dist/passes/DepthPicking.d.ts +11 -0
- package/dist/{effects → passes}/N8AO.d.ts +5 -2
- package/dist/util.d.ts +19 -17
- package/dist/wrapEffect.d.ts +12 -0
- package/package.json +74 -67
- package/src/EffectComposer.tsx +379 -200
- package/src/EffectGroup.tsx +74 -0
- package/src/Selection.tsx +86 -46
- package/src/createEffectComponent.tsx +71 -0
- package/src/effects/ASCII.tsx +183 -135
- package/src/effects/Autofocus.tsx +122 -153
- package/src/effects/Bloom.tsx +34 -6
- package/src/effects/BrightnessContrast.tsx +7 -4
- package/src/effects/ChromaticAberration.tsx +22 -5
- package/src/effects/ColorAverage.tsx +4 -15
- package/src/effects/ColorDepth.tsx +25 -4
- package/src/effects/Depth.tsx +6 -4
- package/src/effects/DepthOfField.tsx +109 -89
- package/src/effects/DotScreen.tsx +7 -4
- package/src/effects/FXAA.tsx +6 -4
- package/src/effects/Glitch.tsx +32 -40
- package/src/effects/GodRays.tsx +104 -16
- package/src/effects/Grid.tsx +27 -21
- package/src/effects/HueSaturation.tsx +7 -4
- package/src/effects/LUT.tsx +25 -26
- package/src/effects/LensFlare.tsx +765 -611
- package/src/effects/Noise.tsx +16 -4
- package/src/effects/Outline.tsx +84 -117
- package/src/effects/Pixelation.tsx +20 -15
- package/src/effects/Ramp.tsx +239 -150
- package/src/effects/SMAA.tsx +20 -4
- package/src/effects/SSAO.tsx +152 -41
- package/src/effects/ScanlineEffect.tsx +7 -7
- package/src/effects/SelectiveBloom.tsx +98 -126
- package/src/effects/Sepia.tsx +6 -4
- package/src/effects/ShockWave.tsx +32 -4
- package/src/effects/Texture.tsx +28 -23
- package/src/effects/TiltShift.tsx +32 -4
- package/src/effects/TiltShift2.tsx +156 -90
- package/src/effects/ToneMapping.tsx +19 -6
- package/src/effects/Vignette.tsx +7 -4
- package/src/effects/Water.tsx +50 -35
- package/src/index.ts +43 -40
- package/src/passes/DepthPicking.tsx +63 -0
- package/src/passes/N8AO.tsx +105 -0
- package/src/tests/Autofocus.test.tsx +38 -0
- package/src/tests/Bloom.test.tsx +76 -0
- package/src/tests/ChromaticAberration.test.tsx +81 -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 +1404 -0
- 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 +211 -0
- package/src/tests/SSAO.test.tsx +140 -0
- package/src/tests/Selection.test.tsx +324 -0
- package/src/tests/SelectiveBloom.test.tsx +166 -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 +238 -0
- package/src/tests/test-utils.tsx +96 -0
- package/src/tests/wrapEffect.test.tsx +209 -0
- package/src/util.tsx +221 -55
- package/src/wrapEffect.tsx +123 -0
- package/src/EffectComposer.test.tsx +0 -126
- package/src/effects/N8AO.tsx +0 -81
package/dist/effects/Glitch.d.ts
CHANGED
|
@@ -1,30 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import { Vector2 } from 'three';
|
|
1
|
+
import type { ReactThreeFiber } from '@react-three/fiber';
|
|
3
2
|
import { GlitchEffect, GlitchMode } from 'postprocessing';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
chromaticAberrationOffset
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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>>;
|
|
3
|
+
import type { Ref } from 'react';
|
|
4
|
+
import { type EffectOptions } from '../createEffectComponent';
|
|
5
|
+
type GlitchOptions = Omit<EffectOptions<typeof GlitchEffect>, 'delay' | 'duration' | 'strength' | 'chromaticAberrationOffset'> & {
|
|
6
|
+
delay?: ReactThreeFiber.Vector2;
|
|
7
|
+
duration?: ReactThreeFiber.Vector2;
|
|
8
|
+
strength?: ReactThreeFiber.Vector2;
|
|
9
|
+
chromaticAberrationOffset?: ReactThreeFiber.Vector2;
|
|
10
|
+
mode?: GlitchMode;
|
|
11
|
+
};
|
|
12
|
+
export type GlitchProps = GlitchOptions & {
|
|
13
|
+
active?: boolean;
|
|
14
|
+
opacity?: number;
|
|
15
|
+
ref?: Ref<GlitchEffect>;
|
|
16
|
+
};
|
|
17
|
+
export declare function Glitch({ active, mode, dtSize, ...props }: GlitchProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import { GodRaysEffect } from 'postprocessing';
|
|
2
|
-
import
|
|
2
|
+
import { Ref, RefObject } from 'react';
|
|
3
3
|
import { Mesh, Points } from 'three';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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>>;
|
|
4
|
+
type GodRaysProps = ConstructorParameters<typeof GodRaysEffect>[2] & {
|
|
5
|
+
sun: Mesh | Points | RefObject<Mesh | Points>;
|
|
6
|
+
ref?: Ref<GodRaysEffect>;
|
|
7
|
+
};
|
|
8
|
+
export declare function GodRays({ sun, blendFunction, density, decay, weight, exposure, clampMax, blur, kernelSize, samples, width, height, resolutionScale, resolutionX, resolutionY, ref, }: GodRaysProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
package/dist/effects/Grid.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { GridEffect } from 'postprocessing';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} & Partial<{
|
|
8
|
-
size: {
|
|
2
|
+
import { type Ref } from 'react';
|
|
3
|
+
import { type EffectOptions } from '../createEffectComponent';
|
|
4
|
+
export type GridProps = EffectOptions<typeof GridEffect> & {
|
|
5
|
+
size?: {
|
|
9
6
|
width: number;
|
|
10
7
|
height: number;
|
|
11
8
|
};
|
|
12
|
-
|
|
9
|
+
opacity?: number;
|
|
10
|
+
ref?: Ref<GridEffect>;
|
|
11
|
+
};
|
|
12
|
+
export declare function Grid({ size, ref, ...props }: GridProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
blendFunction?:
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { HueSaturationEffect } from 'postprocessing';
|
|
2
|
+
export declare const HueSaturation: (props: {
|
|
3
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
4
|
+
hue?: number;
|
|
5
|
+
saturation?: number;
|
|
6
|
+
} & {
|
|
7
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
8
|
+
opacity?: number;
|
|
9
|
+
args?: [({
|
|
10
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
11
|
+
hue?: number;
|
|
12
|
+
saturation?: number;
|
|
13
|
+
} | undefined)?] | undefined;
|
|
14
|
+
ref?: import("react").Ref<HueSaturationEffect> | undefined;
|
|
15
|
+
}) => import("react").JSX.Element;
|
package/dist/effects/LUT.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { BlendFunction, LUT3DEffect } from 'postprocessing';
|
|
2
|
+
import { Ref } from 'react';
|
|
3
3
|
import type { Texture } from 'three';
|
|
4
4
|
export type LUTProps = {
|
|
5
5
|
lut: Texture;
|
|
6
6
|
blendFunction?: BlendFunction;
|
|
7
7
|
tetrahedralInterpolation?: boolean;
|
|
8
|
+
ref?: Ref<LUT3DEffect>;
|
|
8
9
|
};
|
|
9
|
-
export declare
|
|
10
|
+
export declare function LUT({ lut, blendFunction, tetrahedralInterpolation, ref }: LUTProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ReactThreeFiber } from '@react-three/fiber';
|
|
2
2
|
import { BlendFunction, Effect } from 'postprocessing';
|
|
3
|
+
import { type Ref } from 'react';
|
|
4
|
+
import { Color, Texture, Vector2, Vector3 } from 'three';
|
|
3
5
|
type LensFlareEffectOptions = {
|
|
4
6
|
/** The blend function of this effect */
|
|
5
7
|
blendFunction: BlendFunction;
|
|
@@ -8,9 +10,9 @@ type LensFlareEffectOptions = {
|
|
|
8
10
|
/** The glare size */
|
|
9
11
|
glareSize: number;
|
|
10
12
|
/** The position of the lens flare in 3d space */
|
|
11
|
-
lensPosition:
|
|
13
|
+
lensPosition: Vector3;
|
|
12
14
|
/** Effect resolution */
|
|
13
|
-
screenRes:
|
|
15
|
+
screenRes: Vector2;
|
|
14
16
|
/** The number of points for the star */
|
|
15
17
|
starPoints: number;
|
|
16
18
|
/** The flare side */
|
|
@@ -23,10 +25,10 @@ type LensFlareEffectOptions = {
|
|
|
23
25
|
animated: boolean;
|
|
24
26
|
/** Set the appearance to full anamorphic */
|
|
25
27
|
anamorphic: boolean;
|
|
26
|
-
/** Set the color gain for the lens flare. Must be a
|
|
27
|
-
colorGain:
|
|
28
|
+
/** Set the color gain for the lens flare. Must be a Color in RBG format */
|
|
29
|
+
colorGain: Color;
|
|
28
30
|
/** Texture to be used as color dirt for starburst effect */
|
|
29
|
-
lensDirtTexture:
|
|
31
|
+
lensDirtTexture: Texture | null;
|
|
30
32
|
/** The halo scale */
|
|
31
33
|
haloScale: number;
|
|
32
34
|
/** Option to enable/disable secondary ghosts */
|
|
@@ -41,14 +43,53 @@ type LensFlareEffectOptions = {
|
|
|
41
43
|
starBurst: boolean;
|
|
42
44
|
};
|
|
43
45
|
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, }
|
|
46
|
+
constructor({ blendFunction, enabled, glareSize, lensPosition, screenRes, starPoints, flareSize, flareSpeed, flareShape, animated, anamorphic, colorGain, lensDirtTexture, haloScale, secondaryGhosts, aditionalStreaks, ghostScale, opacity, starBurst, }?: Partial<LensFlareEffectOptions>);
|
|
45
47
|
update(_renderer: any, _inputBuffer: any, deltaTime: number): void;
|
|
48
|
+
private u;
|
|
49
|
+
private setU;
|
|
50
|
+
get enabled(): boolean;
|
|
51
|
+
set enabled(value: boolean);
|
|
52
|
+
get glareSize(): number;
|
|
53
|
+
set glareSize(value: number);
|
|
54
|
+
get lensPosition(): Vector3;
|
|
55
|
+
set lensPosition(value: Vector3);
|
|
56
|
+
get screenRes(): Vector2;
|
|
57
|
+
set screenRes(value: Vector2);
|
|
58
|
+
get starPoints(): number;
|
|
59
|
+
set starPoints(value: number);
|
|
60
|
+
get flareSize(): number;
|
|
61
|
+
set flareSize(value: number);
|
|
62
|
+
get flareSpeed(): number;
|
|
63
|
+
set flareSpeed(value: number);
|
|
64
|
+
get flareShape(): number;
|
|
65
|
+
set flareShape(value: number);
|
|
66
|
+
get animated(): boolean;
|
|
67
|
+
set animated(value: boolean);
|
|
68
|
+
get anamorphic(): boolean;
|
|
69
|
+
set anamorphic(value: boolean);
|
|
70
|
+
get colorGain(): Color;
|
|
71
|
+
set colorGain(value: Color);
|
|
72
|
+
get lensDirtTexture(): Texture | null;
|
|
73
|
+
set lensDirtTexture(value: Texture | null);
|
|
74
|
+
get haloScale(): number;
|
|
75
|
+
set haloScale(value: number);
|
|
76
|
+
get secondaryGhosts(): boolean;
|
|
77
|
+
set secondaryGhosts(value: boolean);
|
|
78
|
+
get aditionalStreaks(): boolean;
|
|
79
|
+
set aditionalStreaks(value: boolean);
|
|
80
|
+
get ghostScale(): number;
|
|
81
|
+
set ghostScale(value: number);
|
|
82
|
+
get starBurst(): boolean;
|
|
83
|
+
set starBurst(value: boolean);
|
|
84
|
+
get opacity(): number;
|
|
85
|
+
set opacity(value: number);
|
|
46
86
|
}
|
|
47
|
-
type LensFlareProps = {
|
|
87
|
+
type LensFlareProps = Omit<Partial<LensFlareEffectOptions>, 'lensPosition'> & {
|
|
48
88
|
/** Position of the effect */
|
|
49
|
-
lensPosition?:
|
|
89
|
+
lensPosition?: ReactThreeFiber.Vector3;
|
|
50
90
|
/** The time that it takes to fade the occlusion */
|
|
51
91
|
smoothTime?: number;
|
|
52
|
-
|
|
53
|
-
|
|
92
|
+
ref?: Ref<LensFlareEffect>;
|
|
93
|
+
};
|
|
94
|
+
export declare const LensFlare: (props: LensFlareProps) => import("react").JSX.Element;
|
|
54
95
|
export {};
|
package/dist/effects/Noise.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { NoiseEffect } from 'postprocessing';
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
import { type EffectOptions } from '../createEffectComponent';
|
|
4
|
+
export type NoiseProps = EffectOptions<typeof NoiseEffect> & {
|
|
5
|
+
opacity?: number;
|
|
6
|
+
ref?: Ref<NoiseEffect>;
|
|
7
|
+
};
|
|
8
|
+
export declare function Noise({ blendFunction, ...props }: NoiseProps): import("react").JSX.Element;
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
import { OutlineEffect } from 'postprocessing';
|
|
2
|
-
import { RefObject } from 'react';
|
|
3
|
-
import { Object3D } from 'three';
|
|
4
|
-
type ObjectRef = RefObject<Object3D>;
|
|
5
|
-
|
|
2
|
+
import { Ref, RefObject } from 'react';
|
|
3
|
+
import { Object3D, type ColorRepresentation } from 'three';
|
|
4
|
+
type ObjectRef = RefObject<Object3D | null>;
|
|
5
|
+
type OutlineEffectOptions = NonNullable<ConstructorParameters<typeof OutlineEffect>[2]>;
|
|
6
|
+
export type OutlineProps = Omit<OutlineEffectOptions, 'visibleEdgeColor' | 'hiddenEdgeColor'> & Partial<{
|
|
6
7
|
selection: Object3D | Object3D[] | ObjectRef | ObjectRef[];
|
|
7
8
|
selectionLayer: number;
|
|
9
|
+
visibleEdgeColor: ColorRepresentation;
|
|
10
|
+
hiddenEdgeColor: ColorRepresentation;
|
|
11
|
+
ref?: Ref<OutlineEffect>;
|
|
8
12
|
}>;
|
|
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>>;
|
|
13
|
+
export declare function Outline({ selection, selectionLayer, blendFunction, resolutionScale, resolutionX, resolutionY, ref, ...liveProps }: OutlineProps): import("react").JSX.Element;
|
|
30
14
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PixelationEffect } from 'postprocessing';
|
|
2
|
+
import type { 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
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { Effect } from 'postprocessing';
|
|
1
|
+
import { BlendFunction, Effect } from 'postprocessing';
|
|
2
|
+
import type { Ref } from 'react';
|
|
2
3
|
export declare enum RampType {
|
|
3
4
|
Linear = 0,
|
|
4
5
|
Radial = 1,
|
|
5
6
|
MirroredLinear = 2
|
|
6
7
|
}
|
|
8
|
+
type RampTuple2 = [number, number];
|
|
9
|
+
type RampTuple4 = [number, number, number, number];
|
|
7
10
|
export declare class RampEffect extends Effect {
|
|
8
11
|
constructor({
|
|
9
12
|
/**
|
|
@@ -61,18 +64,63 @@ export declare class RampEffect extends Effect {
|
|
|
61
64
|
*/
|
|
62
65
|
rampInvert, ...params }?: {
|
|
63
66
|
rampType?: RampType | undefined;
|
|
64
|
-
rampStart?:
|
|
65
|
-
rampEnd?:
|
|
66
|
-
startColor?:
|
|
67
|
-
endColor?:
|
|
67
|
+
rampStart?: RampTuple2 | undefined;
|
|
68
|
+
rampEnd?: RampTuple2 | undefined;
|
|
69
|
+
startColor?: RampTuple4 | undefined;
|
|
70
|
+
endColor?: RampTuple4 | undefined;
|
|
68
71
|
rampBias?: number | undefined;
|
|
69
72
|
rampGain?: number | undefined;
|
|
70
73
|
rampMask?: boolean | undefined;
|
|
71
74
|
rampInvert?: boolean | undefined;
|
|
72
75
|
});
|
|
76
|
+
private u;
|
|
77
|
+
private setU;
|
|
78
|
+
get rampType(): RampType;
|
|
79
|
+
set rampType(value: RampType);
|
|
80
|
+
get rampStart(): RampTuple2;
|
|
81
|
+
set rampStart(value: RampTuple2);
|
|
82
|
+
get rampEnd(): RampTuple2;
|
|
83
|
+
set rampEnd(value: RampTuple2);
|
|
84
|
+
get startColor(): RampTuple4;
|
|
85
|
+
set startColor(value: RampTuple4);
|
|
86
|
+
get endColor(): RampTuple4;
|
|
87
|
+
set endColor(value: RampTuple4);
|
|
88
|
+
get rampBias(): number;
|
|
89
|
+
set rampBias(value: number);
|
|
90
|
+
get rampGain(): number;
|
|
91
|
+
set rampGain(value: number);
|
|
92
|
+
get rampMask(): boolean;
|
|
93
|
+
set rampMask(value: boolean);
|
|
94
|
+
get rampInvert(): boolean;
|
|
95
|
+
set rampInvert(value: boolean);
|
|
73
96
|
}
|
|
74
|
-
export
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
97
|
+
export type RampProps = {
|
|
98
|
+
blendFunction?: BlendFunction;
|
|
99
|
+
rampType?: RampType;
|
|
100
|
+
rampStart?: RampTuple2;
|
|
101
|
+
rampEnd?: RampTuple2;
|
|
102
|
+
startColor?: RampTuple4;
|
|
103
|
+
endColor?: RampTuple4;
|
|
104
|
+
rampBias?: number;
|
|
105
|
+
rampGain?: number;
|
|
106
|
+
rampMask?: boolean;
|
|
107
|
+
rampInvert?: boolean;
|
|
108
|
+
ref?: Ref<RampEffect>;
|
|
109
|
+
};
|
|
110
|
+
export declare const Ramp: (props: RampProps & {
|
|
111
|
+
blendFunction?: BlendFunction;
|
|
112
|
+
opacity?: number;
|
|
113
|
+
args?: [({
|
|
114
|
+
rampType?: RampType | undefined;
|
|
115
|
+
rampStart?: RampTuple2 | undefined;
|
|
116
|
+
rampEnd?: RampTuple2 | undefined;
|
|
117
|
+
startColor?: RampTuple4 | undefined;
|
|
118
|
+
endColor?: RampTuple4 | undefined;
|
|
119
|
+
rampBias?: number | undefined;
|
|
120
|
+
rampGain?: number | undefined;
|
|
121
|
+
rampMask?: boolean | undefined;
|
|
122
|
+
rampInvert?: boolean | undefined;
|
|
123
|
+
} | undefined)?] | undefined;
|
|
124
|
+
ref?: Ref<RampEffect> | undefined;
|
|
125
|
+
}) => import("react").JSX.Element;
|
|
126
|
+
export {};
|
package/dist/effects/SMAA.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { SMAAEffect } from 'postprocessing';
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
import { type EffectOptions } from '../createEffectComponent';
|
|
4
|
+
type SMAAOptions = EffectOptions<typeof SMAAEffect>;
|
|
5
|
+
export type SMAAProps = SMAAOptions & {
|
|
6
|
+
opacity?: number;
|
|
7
|
+
ref?: Ref<SMAAEffect>;
|
|
8
|
+
};
|
|
9
|
+
export declare function SMAA({ preset, edgeDetectionMode, predicationMode, ...liveProps }: SMAAProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
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({ blendFunction, samples, rings, distanceThreshold, distanceFalloff, rangeThreshold, rangeFalloff, luminanceInfluence, radius, bias, intensity, color, worldDistanceThreshold, worldDistanceFalloff, worldProximityThreshold, worldProximityFalloff, minRadiusScale, fade, depthAwareUpsampling, resolutionScale, resolutionX, resolutionY, width, height, ref, }: SSAOProps): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
blendFunction?:
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
import { ScanlineEffect } from 'postprocessing';
|
|
2
|
+
export declare const Scanline: (props: {
|
|
3
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
4
|
+
density?: number;
|
|
5
|
+
} & {
|
|
6
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
7
|
+
opacity?: number;
|
|
8
|
+
args?: [({
|
|
9
|
+
blendFunction?: import("postprocessing").BlendFunction;
|
|
10
|
+
density?: number;
|
|
11
|
+
} | undefined)?] | undefined;
|
|
12
|
+
ref?: import("react").Ref<ScanlineEffect> | undefined;
|
|
13
|
+
}) => 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, luminanceThreshold, luminanceSmoothing, mipmapBlur, radius, levels, resolutionScale, resolutionX, resolutionY, ref, ...liveProps }: SelectiveBloomProps): import("react").JSX.Element;
|
|
20
15
|
export {};
|
package/dist/effects/Sepia.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
blendFunction?:
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
import { SepiaEffect } from 'postprocessing';
|
|
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,5 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { ReactThreeFiber } from '@react-three/fiber';
|
|
2
|
+
import { ShockWaveEffect } from 'postprocessing';
|
|
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,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TextureEffect } from 'postprocessing';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
aspectCorrection?: boolean | undefined;
|
|
7
|
-
} & {
|
|
2
|
+
import type { Ref } from 'react';
|
|
3
|
+
import { type EffectOptions } from '../createEffectComponent';
|
|
4
|
+
export type TextureProps = EffectOptions<typeof TextureEffect> & {
|
|
8
5
|
textureSrc: string;
|
|
9
6
|
/** opacity of provided texture */
|
|
10
|
-
opacity?: number
|
|
11
|
-
|
|
7
|
+
opacity?: number;
|
|
8
|
+
ref?: Ref<TextureEffect>;
|
|
9
|
+
};
|
|
10
|
+
export declare function Texture({ textureSrc, texture, opacity, ...props }: TextureProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { TiltShiftEffect } from 'postprocessing';
|
|
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,14 +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
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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,8 +1,10 @@
|
|
|
1
1
|
import { ToneMappingEffect } from 'postprocessing';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
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 {};
|