@tresjs/post-processing 1.0.0-next.0 → 1.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/Bloom.vue.d.ts +61 -0
- package/dist/core/pmndrs/DepthOfField.vue.d.ts +35 -0
- package/dist/core/pmndrs/EffectComposer.vue.d.ts +36 -0
- package/dist/core/pmndrs/Glitch.vue.d.ts +51 -0
- package/dist/core/pmndrs/Noise.vue.d.ts +16 -0
- package/dist/core/pmndrs/Outline.vue.d.ts +46 -0
- package/dist/core/pmndrs/Pixelation.vue.d.ts +12 -0
- package/dist/core/pmndrs/Vignette.vue.d.ts +20 -0
- package/dist/core/pmndrs/composables/useEffect.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/pmndrs.d.ts +2 -0
- package/dist/pmndrs.js +352 -0
- package/dist/prop-BjrXLDuj.js +43 -0
- package/dist/three.d.ts +2 -0
- package/dist/three.js +1762 -0
- package/dist/util/prop.d.ts +7 -7
- package/package.json +41 -32
- package/dist/core/EffectComposer.vue.d.ts +0 -70
- package/dist/core/composables/effect.d.ts +0 -6
- package/dist/core/effects/Bloom.vue.d.ts +0 -83
- package/dist/core/effects/DepthOfField.vue.d.ts +0 -45
- package/dist/core/effects/Glitch.vue.d.ts +0 -105
- package/dist/core/effects/Noise.vue.d.ts +0 -39
- package/dist/core/effects/Outline.vue.d.ts +0 -70
- package/dist/core/effects/Pixelation.vue.d.ts +0 -21
- package/dist/core/effects/Vignette.vue.d.ts +0 -47
- package/dist/core/injectionKeys.d.ts +0 -3
- package/dist/index.d.ts +0 -10
- package/dist/tres-postprocessing.js +0 -338
- package/dist/tres-postprocessing.umd.cjs +0 -8
package/dist/util/prop.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Ref, WatchOptions } from 'vue';
|
|
2
2
|
/**
|
|
3
3
|
* Creates a prop watcher function that monitors changes to a property and updates a target object.
|
|
4
4
|
*
|
|
@@ -11,8 +11,8 @@ import type { Ref, WatchOptions } from 'vue';
|
|
|
11
11
|
* @param {WatchOptions} watchOptions - The options for watch.
|
|
12
12
|
*/
|
|
13
13
|
export declare const makePropWatcher: <T, E>(propGetter: () => T, target: Ref<E>, propertyPath: string, newPlainObjectFunction: () => E & {
|
|
14
|
-
dispose?: (
|
|
15
|
-
}, watchOptions?: WatchOptions) => import(
|
|
14
|
+
dispose?: () => void;
|
|
15
|
+
}, watchOptions?: WatchOptions) => import('vue').WatchHandle;
|
|
16
16
|
/**
|
|
17
17
|
* Creates multiple prop watchers for monitoring changes to multiple properties and updating a target object.
|
|
18
18
|
*
|
|
@@ -23,8 +23,8 @@ export declare const makePropWatcher: <T, E>(propGetter: () => T, target: Ref<E>
|
|
|
23
23
|
* @param {() => E & { dispose?(): void }} newPlainObjectFunction - A function that creates a new plain object to retrieve the defaults from with an optional "dispose" method for cleanup.
|
|
24
24
|
*/
|
|
25
25
|
export declare const makePropWatchers: <E>(propGettersAndPropertyPaths: (string | (() => any))[][], target: Ref<E>, newPlainObjectFunction: () => E & {
|
|
26
|
-
dispose?: (
|
|
27
|
-
}) => import(
|
|
26
|
+
dispose?: () => void;
|
|
27
|
+
}) => import('vue').WatchHandle[];
|
|
28
28
|
/**
|
|
29
29
|
* Creates multiple prop watchers via the props object for monitoring changes to multiple properties and updating a target object.
|
|
30
30
|
* Use this method in case the prop names match the names of the properties you want to set on your target object.
|
|
@@ -36,5 +36,5 @@ export declare const makePropWatchers: <E>(propGettersAndPropertyPaths: (string
|
|
|
36
36
|
export declare const makePropWatchersUsingAllProps: <E>(props: {
|
|
37
37
|
[key: string]: any;
|
|
38
38
|
}, target: Ref<E>, newPlainObjectFunction: () => E & {
|
|
39
|
-
dispose?: (
|
|
40
|
-
}) => import(
|
|
39
|
+
dispose?: () => void;
|
|
40
|
+
}) => import('vue').WatchHandle[];
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tresjs/post-processing",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"packageManager": "pnpm@9.14.2",
|
|
6
6
|
"description": "Post-processing library for TresJS",
|
|
7
7
|
"author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
|
|
8
8
|
"license": "MIT",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/Tresjs/post-processing.git"
|
|
12
|
+
},
|
|
9
13
|
"keywords": [
|
|
10
14
|
"vue",
|
|
11
15
|
"3d",
|
|
@@ -15,15 +19,21 @@
|
|
|
15
19
|
"effects",
|
|
16
20
|
"fx"
|
|
17
21
|
],
|
|
22
|
+
"maintainers": [
|
|
23
|
+
"Alvaro Saburido (https://github.com/alvarosabu/)",
|
|
24
|
+
"Tino Koch (https://github.com/Tinoooo)"
|
|
25
|
+
],
|
|
18
26
|
"exports": {
|
|
19
|
-
"
|
|
20
|
-
"types": "./dist/
|
|
21
|
-
"import": "./dist/
|
|
27
|
+
"./three": {
|
|
28
|
+
"types": "./dist/three.d.ts",
|
|
29
|
+
"import": "./dist/three.js"
|
|
30
|
+
},
|
|
31
|
+
"./pmndrs": {
|
|
32
|
+
"types": "./dist/pmndrs.d.ts",
|
|
33
|
+
"import": "./dist/pmndrs.js"
|
|
22
34
|
},
|
|
23
35
|
"./*": "./*"
|
|
24
36
|
},
|
|
25
|
-
"main": "./dist/tres-postprocessing.js",
|
|
26
|
-
"module": "./dist/tres-postprocessing.js",
|
|
27
37
|
"files": [
|
|
28
38
|
"*.d.ts",
|
|
29
39
|
"dist"
|
|
@@ -45,37 +55,36 @@
|
|
|
45
55
|
},
|
|
46
56
|
"peerDependencies": {
|
|
47
57
|
"@tresjs/core": ">=4.0",
|
|
48
|
-
"three": ">=0.
|
|
49
|
-
"vue": ">=3.
|
|
58
|
+
"three": ">=0.169",
|
|
59
|
+
"vue": ">=3.4"
|
|
50
60
|
},
|
|
51
61
|
"dependencies": {
|
|
52
|
-
"@vueuse/core": "^
|
|
53
|
-
"postprocessing": "^6.
|
|
54
|
-
"three-stdlib": "^2.28.7"
|
|
62
|
+
"@vueuse/core": "^11.3.0",
|
|
63
|
+
"postprocessing": "^6.36.4"
|
|
55
64
|
},
|
|
56
65
|
"devDependencies": {
|
|
57
|
-
"@release-it/conventional-changelog": "^
|
|
58
|
-
"@tresjs/core": "^4.
|
|
59
|
-
"@tresjs/eslint-config": "^1.
|
|
60
|
-
"@types/three": "^0.
|
|
61
|
-
"@unocss/core": "^0.
|
|
62
|
-
"@vitejs/plugin-vue": "^
|
|
63
|
-
"eslint": "^9.
|
|
64
|
-
"gsap": "^3.12.
|
|
66
|
+
"@release-it/conventional-changelog": "^9.0.3",
|
|
67
|
+
"@tresjs/core": "^4.3.1",
|
|
68
|
+
"@tresjs/eslint-config": "^1.4.0",
|
|
69
|
+
"@types/three": "^0.170.0",
|
|
70
|
+
"@unocss/core": "^0.64.1",
|
|
71
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
72
|
+
"eslint": "^9.15.0",
|
|
73
|
+
"gsap": "^3.12.5",
|
|
65
74
|
"kolorist": "^1.8.0",
|
|
66
|
-
"pathe": "^1.1.
|
|
67
|
-
"release-it": "^17.
|
|
75
|
+
"pathe": "^1.1.2",
|
|
76
|
+
"release-it": "^17.10.0",
|
|
68
77
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
69
|
-
"rollup-plugin-visualizer": "^5.
|
|
70
|
-
"three": "^0.
|
|
71
|
-
"typescript": "^5.
|
|
72
|
-
"unocss": "^0.
|
|
73
|
-
"vite": "^
|
|
74
|
-
"vite-plugin-banner": "^0.
|
|
75
|
-
"vite-plugin-dts": "3.
|
|
78
|
+
"rollup-plugin-visualizer": "^5.12.0",
|
|
79
|
+
"three": "^0.170.0",
|
|
80
|
+
"typescript": "^5.7.2",
|
|
81
|
+
"unocss": "^0.64.1",
|
|
82
|
+
"vite": "^6.0.0",
|
|
83
|
+
"vite-plugin-banner": "^0.8.0",
|
|
84
|
+
"vite-plugin-dts": "4.3.0",
|
|
76
85
|
"vite-svg-loader": "^5.1.0",
|
|
77
|
-
"vitepress": "1.
|
|
78
|
-
"vue": "^3.
|
|
79
|
-
"vue-tsc": "^1.
|
|
86
|
+
"vitepress": "1.5.0",
|
|
87
|
+
"vue": "^3.5.13",
|
|
88
|
+
"vue-tsc": "^2.1.10"
|
|
80
89
|
}
|
|
81
90
|
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { TresObject } from '@tresjs/core';
|
|
2
|
-
import { EffectComposer as EffectComposerImpl } from 'postprocessing';
|
|
3
|
-
import type { ShallowRef } from 'vue';
|
|
4
|
-
export interface EffectComposerProps {
|
|
5
|
-
enabled?: boolean;
|
|
6
|
-
children?: TresObject[];
|
|
7
|
-
depthBuffer?: boolean;
|
|
8
|
-
disableNormalPass?: boolean;
|
|
9
|
-
stencilBuffer?: boolean;
|
|
10
|
-
resolutionScale?: number;
|
|
11
|
-
autoClear?: boolean;
|
|
12
|
-
multisampling?: number;
|
|
13
|
-
frameBufferType?: number;
|
|
14
|
-
}
|
|
15
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EffectComposerProps>, {
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
autoClear: boolean;
|
|
18
|
-
frameBufferType: 1016;
|
|
19
|
-
disableNormalPass: boolean;
|
|
20
|
-
depthBuffer: undefined;
|
|
21
|
-
multisampling: number;
|
|
22
|
-
stencilBuffer: undefined;
|
|
23
|
-
}>, {
|
|
24
|
-
composer: ShallowRef<EffectComposerImpl | null>;
|
|
25
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
-
render: (...args: any[]) => void;
|
|
27
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EffectComposerProps>, {
|
|
28
|
-
enabled: boolean;
|
|
29
|
-
autoClear: boolean;
|
|
30
|
-
frameBufferType: 1016;
|
|
31
|
-
disableNormalPass: boolean;
|
|
32
|
-
depthBuffer: undefined;
|
|
33
|
-
multisampling: number;
|
|
34
|
-
stencilBuffer: undefined;
|
|
35
|
-
}>>> & {
|
|
36
|
-
onRender?: ((...args: any[]) => any) | undefined;
|
|
37
|
-
}, {
|
|
38
|
-
enabled: boolean;
|
|
39
|
-
depthBuffer: boolean;
|
|
40
|
-
disableNormalPass: boolean;
|
|
41
|
-
stencilBuffer: boolean;
|
|
42
|
-
autoClear: boolean;
|
|
43
|
-
multisampling: number;
|
|
44
|
-
frameBufferType: number;
|
|
45
|
-
}, {}>, {
|
|
46
|
-
default?(_: {}): any;
|
|
47
|
-
}>;
|
|
48
|
-
export default _default;
|
|
49
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
50
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
51
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
52
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
53
|
-
} : {
|
|
54
|
-
type: import('vue').PropType<T[K]>;
|
|
55
|
-
required: true;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
type __VLS_WithDefaults<P, D> = {
|
|
59
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
60
|
-
default: D[K];
|
|
61
|
-
}> : P[K];
|
|
62
|
-
};
|
|
63
|
-
type __VLS_Prettify<T> = {
|
|
64
|
-
[K in keyof T]: T[K];
|
|
65
|
-
} & {};
|
|
66
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
67
|
-
new (): {
|
|
68
|
-
$slots: S;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Effect } from 'postprocessing';
|
|
2
|
-
import { EffectPass } from 'postprocessing';
|
|
3
|
-
export declare const useEffect: <T extends Effect>(newEffectFunction: () => T) => {
|
|
4
|
-
pass: import("vue").Ref<EffectPass | null> | import("vue").ShallowRef<EffectPass | null>;
|
|
5
|
-
effect: import("vue").Ref<T | null> | import("vue").ShallowRef<T | null>;
|
|
6
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { BloomEffect } from 'postprocessing';
|
|
2
|
-
import type { BlendFunction, KernelSize } from 'postprocessing';
|
|
3
|
-
export interface BloomProps {
|
|
4
|
-
/**
|
|
5
|
-
* The blend function of this effect. This prop is not reactive.
|
|
6
|
-
* @default BlendFunction.SCREEN
|
|
7
|
-
* @type {BlendFunction}
|
|
8
|
-
* @memberof BloomProps
|
|
9
|
-
*/
|
|
10
|
-
blendFunction?: BlendFunction;
|
|
11
|
-
/**
|
|
12
|
-
* The intensity of the bloom effect.
|
|
13
|
-
*
|
|
14
|
-
* @default 1
|
|
15
|
-
* @type {number}
|
|
16
|
-
* @memberof BloomProps
|
|
17
|
-
*/
|
|
18
|
-
intensity?: number;
|
|
19
|
-
/**
|
|
20
|
-
* The kernel size.
|
|
21
|
-
*
|
|
22
|
-
* @default KernelSize.LARGE
|
|
23
|
-
*
|
|
24
|
-
* @type {KernelSize}
|
|
25
|
-
* @memberof BloomProps
|
|
26
|
-
*/
|
|
27
|
-
kernelSize?: KernelSize;
|
|
28
|
-
/**
|
|
29
|
-
* The luminance threshold. Raise this value to mask out darker elements in the scene. Range is [0, 1].
|
|
30
|
-
*
|
|
31
|
-
* @default 0.9
|
|
32
|
-
*
|
|
33
|
-
* @type {number}
|
|
34
|
-
* @memberof BloomProps
|
|
35
|
-
*/
|
|
36
|
-
luminanceThreshold?: number;
|
|
37
|
-
/**
|
|
38
|
-
* Controls the smoothness of the luminance threshold. Range is [0, 1].
|
|
39
|
-
*
|
|
40
|
-
* @default 0.025
|
|
41
|
-
*
|
|
42
|
-
* @type {number}
|
|
43
|
-
* @memberof BloomProps
|
|
44
|
-
*/
|
|
45
|
-
luminanceSmoothing?: number;
|
|
46
|
-
/**
|
|
47
|
-
* Enables mip map blur.
|
|
48
|
-
*
|
|
49
|
-
* @default false
|
|
50
|
-
*
|
|
51
|
-
* @type {boolean}
|
|
52
|
-
* @memberof BloomProps
|
|
53
|
-
*/
|
|
54
|
-
mipmapBlur?: boolean;
|
|
55
|
-
}
|
|
56
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BloomProps>, {
|
|
57
|
-
mipmapBlur: undefined;
|
|
58
|
-
}>, {
|
|
59
|
-
pass: import("vue").Ref<import("postprocessing").EffectPass | null> | import("vue").ShallowRef<import("postprocessing").EffectPass | null>;
|
|
60
|
-
effect: import("vue").Ref<BloomEffect | null> | import("vue").ShallowRef<BloomEffect | null>;
|
|
61
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BloomProps>, {
|
|
62
|
-
mipmapBlur: undefined;
|
|
63
|
-
}>>>, {
|
|
64
|
-
mipmapBlur: boolean;
|
|
65
|
-
}, {}>;
|
|
66
|
-
export default _default;
|
|
67
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
68
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
69
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
70
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
71
|
-
} : {
|
|
72
|
-
type: import('vue').PropType<T[K]>;
|
|
73
|
-
required: true;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
type __VLS_WithDefaults<P, D> = {
|
|
77
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
78
|
-
default: D[K];
|
|
79
|
-
}> : P[K];
|
|
80
|
-
};
|
|
81
|
-
type __VLS_Prettify<T> = {
|
|
82
|
-
[K in keyof T]: T[K];
|
|
83
|
-
} & {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { BlendFunction } from 'postprocessing';
|
|
2
|
-
import { DepthOfFieldEffect } from 'postprocessing';
|
|
3
|
-
export interface DepthOfFieldProps {
|
|
4
|
-
/**
|
|
5
|
-
* The blend function of this effect. This prop is not reactive.
|
|
6
|
-
*/
|
|
7
|
-
blendFunction?: BlendFunction;
|
|
8
|
-
/**
|
|
9
|
-
* The focus distance in world units.
|
|
10
|
-
*/
|
|
11
|
-
worldFocusDistance?: number;
|
|
12
|
-
/**
|
|
13
|
-
* The focus range in world units.
|
|
14
|
-
*/
|
|
15
|
-
worldFocusRange?: number;
|
|
16
|
-
/**
|
|
17
|
-
* The normalized focus distance. Range is [0.0, 1.0].
|
|
18
|
-
*/
|
|
19
|
-
focusDistance?: number;
|
|
20
|
-
/**
|
|
21
|
-
* The focus range. Range is [0.0, 1.0].
|
|
22
|
-
*/
|
|
23
|
-
focusRange?: number;
|
|
24
|
-
/**
|
|
25
|
-
* The scale of the bokeh blur.
|
|
26
|
-
*/
|
|
27
|
-
bokehScale?: number;
|
|
28
|
-
resolutionScale?: number;
|
|
29
|
-
resolutionX?: number;
|
|
30
|
-
resolutionY?: number;
|
|
31
|
-
}
|
|
32
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<DepthOfFieldProps>, {
|
|
33
|
-
pass: import("vue").Ref<import("postprocessing").EffectPass | null> | import("vue").ShallowRef<import("postprocessing").EffectPass | null>;
|
|
34
|
-
effect: import("vue").Ref<DepthOfFieldEffect | null> | import("vue").ShallowRef<DepthOfFieldEffect | null>;
|
|
35
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DepthOfFieldProps>>>, {}, {}>;
|
|
36
|
-
export default _default;
|
|
37
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
38
|
-
type __VLS_TypePropsToRuntimeProps<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
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { GlitchEffect, GlitchMode } from 'postprocessing';
|
|
2
|
-
import type { BlendFunction } from 'postprocessing';
|
|
3
|
-
import type { Texture, Vector2 } from 'three';
|
|
4
|
-
export interface GlitchProps {
|
|
5
|
-
blendFunction?: BlendFunction;
|
|
6
|
-
/**
|
|
7
|
-
* The minimum and maximum delay between glitch activations in seconds.
|
|
8
|
-
*
|
|
9
|
-
* @default [1.5, 3.5]
|
|
10
|
-
*
|
|
11
|
-
* @type {Vector2}
|
|
12
|
-
* @memberof GlitchProps
|
|
13
|
-
*/
|
|
14
|
-
delay?: Vector2;
|
|
15
|
-
/**
|
|
16
|
-
* The minimum and maximum duration of a glitch in seconds.
|
|
17
|
-
*
|
|
18
|
-
* @default [0.6, 1.0]
|
|
19
|
-
*
|
|
20
|
-
* @type {Vector2}
|
|
21
|
-
* @memberof GlitchProps
|
|
22
|
-
*/
|
|
23
|
-
duration?: Vector2;
|
|
24
|
-
/**
|
|
25
|
-
* The strength of weak and strong glitches.
|
|
26
|
-
*
|
|
27
|
-
* @default [0.3, 1.0]
|
|
28
|
-
*
|
|
29
|
-
* @type {Vector2}
|
|
30
|
-
* @memberof GlitchProps
|
|
31
|
-
*/
|
|
32
|
-
strength?: Vector2;
|
|
33
|
-
/**
|
|
34
|
-
* The glitch mode. Can be DISABLED | SPORADIC | CONSTANT_MILD | CONSTANT_WILD .
|
|
35
|
-
*
|
|
36
|
-
* @default GlitchMode.SPORADIC
|
|
37
|
-
*
|
|
38
|
-
* @type {GlitchMode}
|
|
39
|
-
* @memberof GlitchProps
|
|
40
|
-
*/
|
|
41
|
-
mode?: GlitchMode;
|
|
42
|
-
/**
|
|
43
|
-
* Turn the effect on and off.
|
|
44
|
-
*
|
|
45
|
-
* @type {boolean}
|
|
46
|
-
* @memberof GlitchProps
|
|
47
|
-
*/
|
|
48
|
-
active?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* The threshold for strong glitches.
|
|
52
|
-
*
|
|
53
|
-
* @default 0.85
|
|
54
|
-
*
|
|
55
|
-
* @type {number}
|
|
56
|
-
* @memberof GlitchProps
|
|
57
|
-
*/
|
|
58
|
-
ratio?: number;
|
|
59
|
-
/**
|
|
60
|
-
* The scale of the blocky glitch columns.
|
|
61
|
-
*
|
|
62
|
-
* @default 0.05
|
|
63
|
-
*
|
|
64
|
-
* @type {number}
|
|
65
|
-
* @memberof GlitchProps
|
|
66
|
-
*/
|
|
67
|
-
columns?: number;
|
|
68
|
-
/**
|
|
69
|
-
* A chromatic aberration offset. If provided, the glitch effect will influence this offset.
|
|
70
|
-
*
|
|
71
|
-
* @type {Vector2}
|
|
72
|
-
* @memberof GlitchProps
|
|
73
|
-
*/
|
|
74
|
-
chromaticAberrationOffset?: Vector2;
|
|
75
|
-
/**
|
|
76
|
-
* A perturbation map. If none is provided, a noise texture will be created.
|
|
77
|
-
*
|
|
78
|
-
* @type {Texture}
|
|
79
|
-
* @memberof GlitchProps
|
|
80
|
-
*/
|
|
81
|
-
perturbationMap?: Texture;
|
|
82
|
-
/**
|
|
83
|
-
* The size of the generated noise map. Will be ignored if a perturbation map is provided.
|
|
84
|
-
*
|
|
85
|
-
* @default 64
|
|
86
|
-
*
|
|
87
|
-
* @type {number}
|
|
88
|
-
* @memberof GlitchProps
|
|
89
|
-
*/
|
|
90
|
-
dtSize?: number;
|
|
91
|
-
}
|
|
92
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<GlitchProps>, {
|
|
93
|
-
pass: import("vue").Ref<import("postprocessing").EffectPass | null> | import("vue").ShallowRef<import("postprocessing").EffectPass | null>;
|
|
94
|
-
effect: import("vue").Ref<GlitchEffect | null> | import("vue").ShallowRef<GlitchEffect | null>;
|
|
95
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<GlitchProps>>>, {}, {}>;
|
|
96
|
-
export default _default;
|
|
97
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
98
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
99
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
100
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
101
|
-
} : {
|
|
102
|
-
type: import('vue').PropType<T[K]>;
|
|
103
|
-
required: true;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { BlendFunction, NoiseEffect } from 'postprocessing';
|
|
2
|
-
export interface NoiseProps {
|
|
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<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<NoiseProps>, {
|
|
10
|
-
premultiply: boolean;
|
|
11
|
-
blendFunction: BlendFunction;
|
|
12
|
-
}>, {
|
|
13
|
-
pass: import("vue").Ref<import("postprocessing").EffectPass | null> | import("vue").ShallowRef<import("postprocessing").EffectPass | null>;
|
|
14
|
-
effect: import("vue").Ref<NoiseEffect | null> | import("vue").ShallowRef<NoiseEffect | null>;
|
|
15
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<NoiseProps>, {
|
|
16
|
-
premultiply: boolean;
|
|
17
|
-
blendFunction: BlendFunction;
|
|
18
|
-
}>>>, {
|
|
19
|
-
blendFunction: BlendFunction;
|
|
20
|
-
premultiply: boolean;
|
|
21
|
-
}, {}>;
|
|
22
|
-
export default _default;
|
|
23
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
24
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
25
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
27
|
-
} : {
|
|
28
|
-
type: import('vue').PropType<T[K]>;
|
|
29
|
-
required: true;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
type __VLS_WithDefaults<P, D> = {
|
|
33
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
34
|
-
default: D[K];
|
|
35
|
-
}> : P[K];
|
|
36
|
-
};
|
|
37
|
-
type __VLS_Prettify<T> = {
|
|
38
|
-
[K in keyof T]: T[K];
|
|
39
|
-
} & {};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { OutlineEffect } from 'postprocessing';
|
|
2
|
-
import type { TresColor } from '@tresjs/core';
|
|
3
|
-
import type { Object3D, Texture } from 'three';
|
|
4
|
-
import type { BlendFunction, KernelSize } from 'postprocessing';
|
|
5
|
-
export interface OutlineProps {
|
|
6
|
-
/**
|
|
7
|
-
* The objects in the scene which should have an outline.
|
|
8
|
-
*/
|
|
9
|
-
outlinedObjects: Object3D[];
|
|
10
|
-
blur?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Whether occluded parts of selected objects should be visible
|
|
13
|
-
*/
|
|
14
|
-
xRay?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* The blur kernel size. Must be used with blur being true.
|
|
17
|
-
*/
|
|
18
|
-
kernelSize?: KernelSize;
|
|
19
|
-
/**
|
|
20
|
-
* The pulse speed. A value of zero disables the pulse effect.
|
|
21
|
-
*/
|
|
22
|
-
pulseSpeed?: number;
|
|
23
|
-
resolutionX?: number;
|
|
24
|
-
resolutionY?: number;
|
|
25
|
-
edgeStrength?: number;
|
|
26
|
-
patternScale?: number;
|
|
27
|
-
/**
|
|
28
|
-
* The number of samples used for multisample antialiasing. Requires WebGL 2.
|
|
29
|
-
*/
|
|
30
|
-
multisampling?: number;
|
|
31
|
-
/**
|
|
32
|
-
* The blend function. Use `BlendFunction.ALPHA` for dark outlines.
|
|
33
|
-
*/
|
|
34
|
-
blendFunction?: BlendFunction;
|
|
35
|
-
patternTexture?: Texture;
|
|
36
|
-
resolutionScale?: number;
|
|
37
|
-
hiddenEdgeColor?: TresColor;
|
|
38
|
-
visibleEdgeColor?: TresColor;
|
|
39
|
-
}
|
|
40
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OutlineProps>, {
|
|
41
|
-
blur: undefined;
|
|
42
|
-
xRay: undefined;
|
|
43
|
-
}>, {
|
|
44
|
-
pass: import("vue").Ref<import("postprocessing").EffectPass | null> | import("vue").ShallowRef<import("postprocessing").EffectPass | null>;
|
|
45
|
-
effect: import("vue").Ref<OutlineEffect | null> | import("vue").ShallowRef<OutlineEffect | null>;
|
|
46
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<OutlineProps>, {
|
|
47
|
-
blur: undefined;
|
|
48
|
-
xRay: undefined;
|
|
49
|
-
}>>>, {
|
|
50
|
-
blur: boolean;
|
|
51
|
-
xRay: boolean;
|
|
52
|
-
}, {}>;
|
|
53
|
-
export default _default;
|
|
54
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
55
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
56
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
57
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
58
|
-
} : {
|
|
59
|
-
type: import('vue').PropType<T[K]>;
|
|
60
|
-
required: true;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
type __VLS_WithDefaults<P, D> = {
|
|
64
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
65
|
-
default: D[K];
|
|
66
|
-
}> : P[K];
|
|
67
|
-
};
|
|
68
|
-
type __VLS_Prettify<T> = {
|
|
69
|
-
[K in keyof T]: T[K];
|
|
70
|
-
} & {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { PixelationEffect } from 'postprocessing';
|
|
2
|
-
export interface PixelationProps {
|
|
3
|
-
/**
|
|
4
|
-
* The pixel granularity.
|
|
5
|
-
*/
|
|
6
|
-
granularity?: number;
|
|
7
|
-
}
|
|
8
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<PixelationProps>, {
|
|
9
|
-
pass: import("vue").Ref<import("postprocessing").EffectPass | null> | import("vue").ShallowRef<import("postprocessing").EffectPass | null>;
|
|
10
|
-
effect: import("vue").Ref<PixelationEffect | null> | import("vue").ShallowRef<PixelationEffect | null>;
|
|
11
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<PixelationProps>>>, {}, {}>;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
-
} : {
|
|
18
|
-
type: import('vue').PropType<T[K]>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { BlendFunction, VignetteEffect, VignetteTechnique } from 'postprocessing';
|
|
2
|
-
export interface VignetteProps {
|
|
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<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VignetteProps>, {
|
|
12
|
-
technique: VignetteTechnique;
|
|
13
|
-
blendFunction: BlendFunction;
|
|
14
|
-
offset: number;
|
|
15
|
-
darkness: number;
|
|
16
|
-
}>, {
|
|
17
|
-
pass: import("vue").Ref<import("postprocessing").EffectPass | null> | import("vue").ShallowRef<import("postprocessing").EffectPass | null>;
|
|
18
|
-
effect: import("vue").Ref<VignetteEffect | null> | import("vue").ShallowRef<VignetteEffect | null>;
|
|
19
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VignetteProps>, {
|
|
20
|
-
technique: VignetteTechnique;
|
|
21
|
-
blendFunction: BlendFunction;
|
|
22
|
-
offset: number;
|
|
23
|
-
darkness: number;
|
|
24
|
-
}>>>, {
|
|
25
|
-
blendFunction: BlendFunction;
|
|
26
|
-
technique: VignetteTechnique;
|
|
27
|
-
offset: number;
|
|
28
|
-
darkness: number;
|
|
29
|
-
}, {}>;
|
|
30
|
-
export default _default;
|
|
31
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
32
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
33
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
34
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
35
|
-
} : {
|
|
36
|
-
type: import('vue').PropType<T[K]>;
|
|
37
|
-
required: true;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
type __VLS_WithDefaults<P, D> = {
|
|
41
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
42
|
-
default: D[K];
|
|
43
|
-
}> : P[K];
|
|
44
|
-
};
|
|
45
|
-
type __VLS_Prettify<T> = {
|
|
46
|
-
[K in keyof T]: T[K];
|
|
47
|
-
} & {};
|
package/dist/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import Bloom from './core/effects/Bloom.vue';
|
|
2
|
-
import DepthOfField from './core/effects/DepthOfField.vue';
|
|
3
|
-
import EffectComposer from './core/EffectComposer.vue';
|
|
4
|
-
import Glitch from './core/effects/Glitch.vue';
|
|
5
|
-
import Outline from './core/effects/Outline.vue';
|
|
6
|
-
import Pixelation from './core/effects/Pixelation.vue';
|
|
7
|
-
import Vignette from './core/effects/Vignette.vue';
|
|
8
|
-
import Noise from './core/effects/Noise.vue';
|
|
9
|
-
import { useEffect } from './core/composables/effect.ts';
|
|
10
|
-
export { Bloom, DepthOfField, EffectComposer, Glitch, Noise, Outline, Pixelation, Vignette, useEffect, };
|