@tresjs/post-processing 1.0.0-next.1 → 2.0.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 +0 -4
- package/dist/core/pmndrs/BloomPmndrs.vue.d.ts +61 -0
- package/dist/core/{effects/DepthOfField.vue.d.ts → pmndrs/DepthOfFieldPmndrs.vue.d.ts} +3 -13
- package/dist/core/pmndrs/EffectComposerPmndrs.vue.d.ts +36 -0
- package/dist/core/pmndrs/GlitchPmndrs.vue.d.ts +51 -0
- package/dist/core/pmndrs/NoisePmndrs.vue.d.ts +16 -0
- package/dist/core/{effects/Outline.vue.d.ts → pmndrs/OutlinePmndrs.vue.d.ts} +5 -29
- package/dist/core/pmndrs/PixelationPmndrs.vue.d.ts +12 -0
- package/dist/core/pmndrs/VignettePmndrs.vue.d.ts +20 -0
- package/dist/core/pmndrs/composables/useEffectPmndrs.d.ts +6 -0
- package/dist/core/pmndrs/index.d.ts +10 -0
- package/dist/core/three/EffectComposer.vue.d.ts +20 -0
- package/dist/core/three/Glitch.vue.d.ts +15 -0
- package/dist/core/three/Halftone.vue.d.ts +23 -0
- package/dist/core/three/Output.vue.d.ts +5 -0
- package/dist/core/three/Pixelation.vue.d.ts +10 -0
- package/dist/core/three/SMAA.vue.d.ts +9 -0
- package/dist/core/three/UnrealBloom.vue.d.ts +14 -0
- package/dist/core/three/composables/useEffect.d.ts +9 -0
- package/dist/core/three/index.d.ts +9 -0
- package/dist/index.d.ts +2 -11
- package/dist/tres-post-processing.d.ts +2 -0
- package/dist/tres-post-processing.js +2129 -0
- package/dist/tres-post-processing.umd.cjs +1009 -0
- package/dist/util/prop.d.ts +3 -4
- package/package.json +34 -28
- package/dist/core/EffectComposer.vue.d.ts +0 -73
- package/dist/core/effects/Bloom.vue.d.ts +0 -204
- package/dist/core/effects/Glitch.vue.d.ts +0 -105
- package/dist/core/effects/Noise.vue.d.ts +0 -40
- package/dist/core/effects/Pixelation.vue.d.ts +0 -22
- package/dist/core/effects/Vignette.vue.d.ts +0 -48
- package/dist/core/injectionKeys.d.ts +0 -4
- package/dist/tres-postprocessing.js +0 -345
- package/dist/tres-postprocessing.umd.cjs +0 -8
package/README.md
CHANGED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BlendFunction, KernelSize, BloomEffect } from 'postprocessing';
|
|
2
|
+
export interface BloomPmndrsProps {
|
|
3
|
+
/**
|
|
4
|
+
* The blend function of this effect. This prop is not reactive.
|
|
5
|
+
* @default BlendFunction.SCREEN
|
|
6
|
+
* @type {BlendFunction}
|
|
7
|
+
* @memberof BloomPmndrsProps
|
|
8
|
+
*/
|
|
9
|
+
blendFunction?: BlendFunction;
|
|
10
|
+
/**
|
|
11
|
+
* The intensity of the bloom effect.
|
|
12
|
+
*
|
|
13
|
+
* @default 1
|
|
14
|
+
* @type {number}
|
|
15
|
+
* @memberof BloomProps
|
|
16
|
+
*/
|
|
17
|
+
intensity?: number;
|
|
18
|
+
/**
|
|
19
|
+
* The kernel size.
|
|
20
|
+
*
|
|
21
|
+
* @default KernelSize.LARGE
|
|
22
|
+
*
|
|
23
|
+
* @type {KernelSize}
|
|
24
|
+
* @memberof BloomPmndrsProps
|
|
25
|
+
*/
|
|
26
|
+
kernelSize?: KernelSize;
|
|
27
|
+
/**
|
|
28
|
+
* The luminance threshold. Raise this value to mask out darker elements in the scene. Range is [0, 1].
|
|
29
|
+
*
|
|
30
|
+
* @default 0.9
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof BloomPmndrsProps
|
|
34
|
+
*/
|
|
35
|
+
luminanceThreshold?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Controls the smoothness of the luminance threshold. Range is [0, 1].
|
|
38
|
+
*
|
|
39
|
+
* @default 0.025
|
|
40
|
+
*
|
|
41
|
+
* @type {number}
|
|
42
|
+
* @memberof BloomPmndrsProps
|
|
43
|
+
*/
|
|
44
|
+
luminanceSmoothing?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Enables mip map blur.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof BloomPmndrsProps
|
|
52
|
+
*/
|
|
53
|
+
mipmapBlur?: boolean;
|
|
54
|
+
}
|
|
55
|
+
declare const _default: import('vue').DefineComponent<BloomPmndrsProps, {
|
|
56
|
+
pass: import('vue').ShallowRef<import('postprocessing').EffectPass | null>;
|
|
57
|
+
effect: import('vue').ShallowRef<BloomEffect | null>;
|
|
58
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BloomPmndrsProps> & Readonly<{}>, {
|
|
59
|
+
mipmapBlur: boolean;
|
|
60
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
61
|
+
export default _default;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BlendFunction, DepthOfFieldEffect } from 'postprocessing';
|
|
2
|
-
|
|
3
|
-
export interface DepthOfFieldProps {
|
|
2
|
+
export interface DepthOfFieldPmndrsProps {
|
|
4
3
|
/**
|
|
5
4
|
* The blend function of this effect. This prop is not reactive.
|
|
6
5
|
*/
|
|
@@ -29,17 +28,8 @@ export interface DepthOfFieldProps {
|
|
|
29
28
|
resolutionX?: number;
|
|
30
29
|
resolutionY?: number;
|
|
31
30
|
}
|
|
32
|
-
declare const _default: import('vue').DefineComponent<
|
|
31
|
+
declare const _default: import('vue').DefineComponent<DepthOfFieldPmndrsProps, {
|
|
33
32
|
pass: import('vue').ShallowRef<import('postprocessing').EffectPass | null>;
|
|
34
33
|
effect: import('vue').ShallowRef<DepthOfFieldEffect | null>;
|
|
35
|
-
},
|
|
34
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DepthOfFieldPmndrsProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
35
|
export default _default;
|
|
37
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
38
|
-
type __VLS_TypePropsToOption<T> = {
|
|
39
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
40
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
41
|
-
} : {
|
|
42
|
-
type: import('vue').PropType<T[K]>;
|
|
43
|
-
required: true;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EffectComposer } from 'postprocessing';
|
|
2
|
+
import { InjectionKey, ShallowRef } from 'vue';
|
|
3
|
+
export declare const effectComposerInjectionKey: InjectionKey<ShallowRef<EffectComposer | null>>;
|
|
4
|
+
export interface EffectComposerPmndrsProps {
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
depthBuffer?: boolean;
|
|
7
|
+
disableNormalPass?: boolean;
|
|
8
|
+
stencilBuffer?: boolean;
|
|
9
|
+
resolutionScale?: number;
|
|
10
|
+
autoClear?: boolean;
|
|
11
|
+
multisampling?: number;
|
|
12
|
+
frameBufferType?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<EffectComposerPmndrsProps, {
|
|
15
|
+
composer: ShallowRef<EffectComposer | null>;
|
|
16
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
render: (...args: any[]) => void;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<EffectComposerPmndrsProps> & Readonly<{
|
|
19
|
+
onRender?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
depthBuffer: boolean;
|
|
23
|
+
disableNormalPass: boolean;
|
|
24
|
+
stencilBuffer: boolean;
|
|
25
|
+
autoClear: boolean;
|
|
26
|
+
multisampling: number;
|
|
27
|
+
frameBufferType: number;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
29
|
+
default?(_: {}): any;
|
|
30
|
+
}>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BlendFunction, GlitchEffect, GlitchMode } from 'postprocessing';
|
|
2
|
+
import { Texture, Vector2 } from 'three';
|
|
3
|
+
export interface GlitchPmndrsProps {
|
|
4
|
+
blendFunction?: BlendFunction;
|
|
5
|
+
/**
|
|
6
|
+
* The minimum and maximum delay between glitch activations in seconds.
|
|
7
|
+
*/
|
|
8
|
+
delay?: Vector2;
|
|
9
|
+
/**
|
|
10
|
+
* The minimum and maximum duration of a glitch in seconds.
|
|
11
|
+
*/
|
|
12
|
+
duration?: Vector2;
|
|
13
|
+
/**
|
|
14
|
+
* The strength of weak and strong glitches.
|
|
15
|
+
*/
|
|
16
|
+
strength?: Vector2;
|
|
17
|
+
/**
|
|
18
|
+
* The glitch mode. Can be DISABLED | SPORADIC | CONSTANT_MILD | CONSTANT_WILD.
|
|
19
|
+
*/
|
|
20
|
+
mode?: GlitchMode;
|
|
21
|
+
/**
|
|
22
|
+
* Turn the effect on and off.
|
|
23
|
+
*/
|
|
24
|
+
active?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* The threshold for strong glitches.
|
|
28
|
+
*/
|
|
29
|
+
ratio?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The scale of the blocky glitch columns.
|
|
32
|
+
*/
|
|
33
|
+
columns?: number;
|
|
34
|
+
/**
|
|
35
|
+
* A chromatic aberration offset. If provided, the glitch effect will influence this offset.
|
|
36
|
+
*/
|
|
37
|
+
chromaticAberrationOffset?: Vector2;
|
|
38
|
+
/**
|
|
39
|
+
* A perturbation map. If none is provided, a noise texture will be created.
|
|
40
|
+
*/
|
|
41
|
+
perturbationMap?: Texture;
|
|
42
|
+
/**
|
|
43
|
+
* The size of the generated noise map. Will be ignored if a perturbation map is provided.
|
|
44
|
+
*/
|
|
45
|
+
dtSize?: number;
|
|
46
|
+
}
|
|
47
|
+
declare const _default: import('vue').DefineComponent<GlitchPmndrsProps, {
|
|
48
|
+
pass: import('vue').ShallowRef<import('postprocessing').EffectPass | null>;
|
|
49
|
+
effect: import('vue').ShallowRef<GlitchEffect | null>;
|
|
50
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<GlitchPmndrsProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BlendFunction, NoiseEffect } from 'postprocessing';
|
|
2
|
+
export interface NoisePmndrsProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the noise should be multiplied with the input color.
|
|
5
|
+
*/
|
|
6
|
+
premultiply?: boolean;
|
|
7
|
+
blendFunction?: BlendFunction;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import('vue').DefineComponent<NoisePmndrsProps, {
|
|
10
|
+
pass: import('vue').ShallowRef<import('postprocessing').EffectPass | null>;
|
|
11
|
+
effect: import('vue').ShallowRef<NoiseEffect | null>;
|
|
12
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NoisePmndrsProps> & Readonly<{}>, {
|
|
13
|
+
blendFunction: BlendFunction;
|
|
14
|
+
premultiply: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { OutlineEffect, BlendFunction, KernelSize } from 'postprocessing';
|
|
2
1
|
import { TresColor } from '@tresjs/core';
|
|
2
|
+
import { BlendFunction, KernelSize, OutlineEffect } from 'postprocessing';
|
|
3
3
|
import { Object3D, Texture } from 'three';
|
|
4
|
-
|
|
5
|
-
export interface OutlineProps {
|
|
4
|
+
export interface OutlinePmndrsProps {
|
|
6
5
|
/**
|
|
7
6
|
* The objects in the scene which should have an outline.
|
|
8
7
|
*/
|
|
@@ -37,34 +36,11 @@ export interface OutlineProps {
|
|
|
37
36
|
hiddenEdgeColor?: TresColor;
|
|
38
37
|
visibleEdgeColor?: TresColor;
|
|
39
38
|
}
|
|
40
|
-
declare const _default: import('vue').DefineComponent<
|
|
41
|
-
blur: undefined;
|
|
42
|
-
xRay: undefined;
|
|
43
|
-
}>, {
|
|
39
|
+
declare const _default: import('vue').DefineComponent<OutlinePmndrsProps, {
|
|
44
40
|
pass: import('vue').ShallowRef<import('postprocessing').EffectPass | null>;
|
|
45
41
|
effect: import('vue').ShallowRef<OutlineEffect | null>;
|
|
46
|
-
},
|
|
47
|
-
blur: undefined;
|
|
48
|
-
xRay: undefined;
|
|
49
|
-
}>>>, {
|
|
42
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<OutlinePmndrsProps> & Readonly<{}>, {
|
|
50
43
|
blur: boolean;
|
|
51
44
|
xRay: boolean;
|
|
52
|
-
}, {}>;
|
|
45
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
53
46
|
export default _default;
|
|
54
|
-
type __VLS_WithDefaults<P, D> = {
|
|
55
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
56
|
-
default: D[K];
|
|
57
|
-
}> : P[K];
|
|
58
|
-
};
|
|
59
|
-
type __VLS_Prettify<T> = {
|
|
60
|
-
[K in keyof T]: T[K];
|
|
61
|
-
} & {};
|
|
62
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
63
|
-
type __VLS_TypePropsToOption<T> = {
|
|
64
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
65
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
66
|
-
} : {
|
|
67
|
-
type: import('vue').PropType<T[K]>;
|
|
68
|
-
required: true;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PixelationEffect } from 'postprocessing';
|
|
2
|
+
export interface PixelationPmndrsProps {
|
|
3
|
+
/**
|
|
4
|
+
* The pixel granularity.
|
|
5
|
+
*/
|
|
6
|
+
granularity?: number;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<PixelationPmndrsProps, {
|
|
9
|
+
pass: import('vue').ShallowRef<import('postprocessing').EffectPass | null>;
|
|
10
|
+
effect: import('vue').ShallowRef<PixelationEffect | null>;
|
|
11
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PixelationPmndrsProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BlendFunction, VignetteEffect, VignetteTechnique } from 'postprocessing';
|
|
2
|
+
export interface VignettePmndrsProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the noise should be multiplied with the input color.
|
|
5
|
+
*/
|
|
6
|
+
technique?: VignetteTechnique;
|
|
7
|
+
blendFunction?: BlendFunction;
|
|
8
|
+
offset: number;
|
|
9
|
+
darkness: number;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import('vue').DefineComponent<VignettePmndrsProps, {
|
|
12
|
+
pass: import('vue').ShallowRef<import('postprocessing').EffectPass | null>;
|
|
13
|
+
effect: import('vue').ShallowRef<VignetteEffect | null>;
|
|
14
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<VignettePmndrsProps> & Readonly<{}>, {
|
|
15
|
+
blendFunction: BlendFunction;
|
|
16
|
+
technique: VignetteTechnique;
|
|
17
|
+
offset: number;
|
|
18
|
+
darkness: number;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Effect, EffectPass } from 'postprocessing';
|
|
2
|
+
import { Reactive, ShallowRef } from 'vue';
|
|
3
|
+
export declare const useEffectPmndrs: <T extends Effect>(newEffectFunction: () => T, passDependencies: Reactive<object>) => {
|
|
4
|
+
pass: ShallowRef<EffectPass | null>;
|
|
5
|
+
effect: ShallowRef<T | null>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as BloomPmndrs, BloomPmndrsProps } from './BloomPmndrs.vue';
|
|
2
|
+
import { useEffectPmndrs } from './composables/useEffectPmndrs';
|
|
3
|
+
import { default as DepthOfFieldPmndrs, DepthOfFieldPmndrsProps } from './DepthOfFieldPmndrs.vue';
|
|
4
|
+
import { default as EffectComposerPmndrs, EffectComposerPmndrsProps } from './EffectComposerPmndrs.vue';
|
|
5
|
+
import { default as GlitchPmndrs, GlitchPmndrsProps } from './GlitchPmndrs.vue';
|
|
6
|
+
import { default as NoisePmndrs, NoisePmndrsProps } from './NoisePmndrs.vue';
|
|
7
|
+
import { default as OutlinePmndrs, OutlinePmndrsProps } from './OutlinePmndrs.vue';
|
|
8
|
+
import { default as PixelationPmndrs, PixelationPmndrsProps } from './PixelationPmndrs.vue';
|
|
9
|
+
import { default as VignettePmndrs, VignettePmndrsProps } from './VignettePmndrs.vue';
|
|
10
|
+
export { BloomPmndrs, DepthOfFieldPmndrs, EffectComposerPmndrs, GlitchPmndrs, NoisePmndrs, OutlinePmndrs, PixelationPmndrs, useEffectPmndrs, VignettePmndrs, BloomPmndrsProps, DepthOfFieldPmndrsProps, EffectComposerPmndrsProps, GlitchPmndrsProps, NoisePmndrsProps, OutlinePmndrsProps, PixelationPmndrsProps, VignettePmndrsProps, };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
|
|
2
|
+
import { InjectionKey, ShallowRef } from 'vue';
|
|
3
|
+
export declare const effectComposerInjectionKey: InjectionKey<ShallowRef<EffectComposer | null>>;
|
|
4
|
+
export interface EffectComposerProps {
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
withoutRenderPass?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<EffectComposerProps, {
|
|
9
|
+
composer: ShallowRef<EffectComposer | null>;
|
|
10
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EffectComposerProps> & Readonly<{}>, {
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
}>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GlitchPass } from 'three/examples/jsm/postprocessing/GlitchPass.js';
|
|
2
|
+
export interface GlitchProps {
|
|
3
|
+
/**
|
|
4
|
+
* The size of the generated noise map
|
|
5
|
+
*/
|
|
6
|
+
dtSize?: number;
|
|
7
|
+
/**
|
|
8
|
+
* If true, the glitch effect will be more wild 🤪
|
|
9
|
+
*/
|
|
10
|
+
goWild?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: import('vue').DefineComponent<GlitchProps, {
|
|
13
|
+
pass: import('vue').ShallowRef<GlitchPass>;
|
|
14
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<GlitchProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Blending } from 'three/src/constants.js';
|
|
2
|
+
import { HalftonePass } from 'three/examples/jsm/postprocessing/HalftonePass.js';
|
|
3
|
+
export declare enum HalftoneShape {
|
|
4
|
+
Dot = 1,
|
|
5
|
+
Ellipse = 2,
|
|
6
|
+
Line = 3,
|
|
7
|
+
Square = 4
|
|
8
|
+
}
|
|
9
|
+
export interface HalftoneProps {
|
|
10
|
+
shape?: HalftoneShape;
|
|
11
|
+
radius?: number;
|
|
12
|
+
rotateR?: number;
|
|
13
|
+
rotateG?: number;
|
|
14
|
+
rotateB?: number;
|
|
15
|
+
scatter?: number;
|
|
16
|
+
blending?: number;
|
|
17
|
+
greyscale?: boolean;
|
|
18
|
+
blendingMode?: Blending;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: import('vue').DefineComponent<HalftoneProps, {
|
|
21
|
+
pass: import('vue').ShallowRef<HalftonePass>;
|
|
22
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<HalftoneProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OutputPass } from 'three/examples/jsm/postprocessing/OutputPass.js';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
3
|
+
pass: import('vue').ShallowRef<OutputPass>;
|
|
4
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RenderPixelatedPass } from 'three/examples/jsm/postprocessing/RenderPixelatedPass.js';
|
|
2
|
+
export interface PixelationProps {
|
|
3
|
+
pixelSize: number;
|
|
4
|
+
depthEdgeStrength?: number;
|
|
5
|
+
normalEdgeStrength?: number;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<PixelationProps, {
|
|
8
|
+
pass: import('vue').ShallowRef<RenderPixelatedPass>;
|
|
9
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PixelationProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass.js';
|
|
2
|
+
export interface SMAAProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<SMAAProps, {
|
|
7
|
+
pass: import('vue').ShallowRef<SMAAPass>;
|
|
8
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SMAAProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js';
|
|
2
|
+
export interface UnrealBloomProps {
|
|
3
|
+
radius?: number;
|
|
4
|
+
strength?: number;
|
|
5
|
+
threshold?: number;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<UnrealBloomProps, {
|
|
8
|
+
pass: import('vue').ShallowRef<UnrealBloomPass>;
|
|
9
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UnrealBloomProps> & Readonly<{}>, {
|
|
10
|
+
strength: number;
|
|
11
|
+
radius: number;
|
|
12
|
+
threshold: number;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Pass } from 'three/examples/jsm/postprocessing/Pass.js';
|
|
2
|
+
import { Reactive, ShallowRef } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* @param newPassFunction - A function that returns a new pass instance.
|
|
5
|
+
* @param passDependencies - A reactive object that the pass depends on (usually props). Changes to this object will trigger re-rendering.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useEffect: <T extends Pass>(newPassFunction: () => T, passDependencies?: Reactive<object>) => {
|
|
8
|
+
pass: ShallowRef<T>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useEffect } from './composables/useEffect';
|
|
2
|
+
import { default as EffectComposer, EffectComposerProps } from './EffectComposer.vue';
|
|
3
|
+
import { default as Glitch, GlitchProps } from './Glitch.vue';
|
|
4
|
+
import { default as Halftone, HalftoneProps } from './Halftone.vue';
|
|
5
|
+
import { default as Pixelation, PixelationProps } from './Pixelation.vue';
|
|
6
|
+
import { default as Output } from './Output.vue';
|
|
7
|
+
import { default as SMAA, SMAAProps } from './SMAA.vue';
|
|
8
|
+
import { default as UnrealBloom, UnrealBloomProps } from './UnrealBloom.vue';
|
|
9
|
+
export { EffectComposer, Glitch, Halftone, Output, Pixelation, SMAA, UnrealBloom, useEffect, EffectComposerProps, GlitchProps, HalftoneProps, PixelationProps, SMAAProps, UnrealBloomProps, };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { default as EffectComposer } from './core/EffectComposer.vue';
|
|
4
|
-
import { default as Glitch } from './core/effects/Glitch.vue';
|
|
5
|
-
import { default as Outline } from './core/effects/Outline.vue';
|
|
6
|
-
import { default as Pixelation } from './core/effects/Pixelation.vue';
|
|
7
|
-
import { default as Vignette } from './core/effects/Vignette.vue';
|
|
8
|
-
import { default as Noise } from './core/effects/Noise.vue';
|
|
9
|
-
import { useEffect } from './core/composables/effect.ts';
|
|
10
|
-
|
|
11
|
-
export { Bloom, DepthOfField, EffectComposer, Glitch, Noise, Outline, Pixelation, Vignette, useEffect, };
|
|
1
|
+
export * from './core/pmndrs';
|
|
2
|
+
export * from './core/three';
|