@tresjs/post-processing 0.1.0 → 0.2.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 +3 -3
- package/dist/core/EffectComposer.vue.d.ts +108 -0
- package/dist/core/effects/Bloom.vue.d.ts +146 -0
- package/dist/core/effects/Glitch.vue.d.ts +183 -0
- package/dist/core/effects/Outline.d.ts +134 -0
- package/dist/index.d.ts +5 -4
- package/dist/tres-postprocessing.js +366 -174
- package/dist/tres-postprocessing.umd.cjs +3 -3
- package/package.json +35 -24
- package/dist/core/effects/Bloom.d.ts +0 -69
- package/dist/core/effects/Glitch.d.ts +0 -90
- package/dist/core/useEffectComposer/component.d.ts +0 -119
package/package.json
CHANGED
|
@@ -1,30 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tresjs/post-processing",
|
|
3
3
|
"description": "Post-processing library for TresJS",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist"
|
|
8
|
+
"dist",
|
|
9
|
+
"*.d.ts"
|
|
9
10
|
],
|
|
10
11
|
"license": "MIT",
|
|
11
|
-
"main": "./dist/tres-postprocessing.
|
|
12
|
+
"main": "./dist/tres-postprocessing.js",
|
|
12
13
|
"module": "./dist/tres-postprocessing.js",
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"
|
|
17
|
-
"
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/tres-postprocessing.js"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
20
|
-
"./*": "./dist/tres-postprocessing.js"
|
|
19
|
+
"./*": "./*"
|
|
21
20
|
},
|
|
22
21
|
"publishConfig": {
|
|
23
22
|
"access": "public"
|
|
24
23
|
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"vue",
|
|
26
|
+
"3d",
|
|
27
|
+
"threejs",
|
|
28
|
+
"three",
|
|
29
|
+
"post-processing",
|
|
30
|
+
"effects",
|
|
31
|
+
"fx"
|
|
32
|
+
],
|
|
25
33
|
"scripts": {
|
|
26
34
|
"dev": "vite",
|
|
27
|
-
"playground": "cd playground &&
|
|
35
|
+
"playground": "cd playground && npm run dev",
|
|
28
36
|
"build": "vite build",
|
|
29
37
|
"preview": "vite preview",
|
|
30
38
|
"release": "release-it",
|
|
@@ -34,35 +42,38 @@
|
|
|
34
42
|
"docs:preview": "vitepress preview docs"
|
|
35
43
|
},
|
|
36
44
|
"peerDependencies": {
|
|
37
|
-
"@tresjs/core": "2.
|
|
45
|
+
"@tresjs/core": "2.1.2",
|
|
38
46
|
"three": "latest",
|
|
39
|
-
"vue": "^3.
|
|
47
|
+
"vue": "^3.3.4"
|
|
40
48
|
},
|
|
41
49
|
"dependencies": {
|
|
42
|
-
"@vueuse/core": "^10.
|
|
43
|
-
"postprocessing": "^6.
|
|
44
|
-
"three": "^0.
|
|
45
|
-
"three-stdlib": "^2.
|
|
46
|
-
"vue": "^3.
|
|
50
|
+
"@vueuse/core": "^10.1.2",
|
|
51
|
+
"postprocessing": "^6.31.0",
|
|
52
|
+
"three": "^0.152.2",
|
|
53
|
+
"three-stdlib": "^2.23.4",
|
|
54
|
+
"vue": "^3.3.4"
|
|
47
55
|
},
|
|
48
56
|
"devDependencies": {
|
|
49
57
|
"@alvarosabu/prettier-config": "^1.3.0",
|
|
50
58
|
"@release-it/conventional-changelog": "^5.1.1",
|
|
51
|
-
"@tresjs/
|
|
52
|
-
"@
|
|
59
|
+
"@tresjs/cientos": "2.1.2",
|
|
60
|
+
"@tresjs/core": "2.1.2",
|
|
61
|
+
"@types/three": "^0.152.1",
|
|
53
62
|
"@vitejs/plugin-vue": "^4.1.0",
|
|
63
|
+
"gsap": "^3.11.5",
|
|
54
64
|
"kolorist": "^1.7.0",
|
|
55
65
|
"pathe": "^1.1.0",
|
|
56
|
-
"prettier": "^2.8.
|
|
57
|
-
"release-it": "^15.10.
|
|
66
|
+
"prettier": "^2.8.8",
|
|
67
|
+
"release-it": "^15.10.3",
|
|
58
68
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
59
69
|
"rollup-plugin-visualizer": "^5.9.0",
|
|
60
70
|
"typescript": "^5.0.4",
|
|
61
|
-
"unocss": "^0.
|
|
62
|
-
"vite": "^4.
|
|
71
|
+
"unocss": "^0.52.5",
|
|
72
|
+
"vite": "^4.3.9",
|
|
63
73
|
"vite-plugin-banner": "^0.7.0",
|
|
64
74
|
"vite-plugin-dts": "2.3.0",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
75
|
+
"vite-svg-loader": "^4.0.0",
|
|
76
|
+
"vitepress": "1.0.0-beta.1",
|
|
77
|
+
"vue-tsc": "^1.6.5"
|
|
67
78
|
}
|
|
68
79
|
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { BlurPass, KernelSize } from 'postprocessing';
|
|
2
|
-
export interface BloomProps {
|
|
3
|
-
/**
|
|
4
|
-
* The intensity of the bloom effect.
|
|
5
|
-
*
|
|
6
|
-
* @default 1
|
|
7
|
-
* @type {number}
|
|
8
|
-
* @memberof BloomProps
|
|
9
|
-
*/
|
|
10
|
-
intensity?: number;
|
|
11
|
-
/**
|
|
12
|
-
* An efficient, incremental blur pass.
|
|
13
|
-
*
|
|
14
|
-
* @type {BlurPass}
|
|
15
|
-
* @memberof BloomProps
|
|
16
|
-
*/
|
|
17
|
-
blurPass?: BlurPass;
|
|
18
|
-
/**
|
|
19
|
-
* The width of the render
|
|
20
|
-
*
|
|
21
|
-
* @type {number}
|
|
22
|
-
* @memberof BloomProps
|
|
23
|
-
*/
|
|
24
|
-
width?: number;
|
|
25
|
-
/**
|
|
26
|
-
* The height of the render
|
|
27
|
-
*
|
|
28
|
-
* @type {number}
|
|
29
|
-
* @memberof BloomProps
|
|
30
|
-
*/
|
|
31
|
-
height?: number;
|
|
32
|
-
/**
|
|
33
|
-
* The kernel size.
|
|
34
|
-
*
|
|
35
|
-
* @default KernelSize.LARGE
|
|
36
|
-
*
|
|
37
|
-
* @type {KernelSize}
|
|
38
|
-
* @memberof BloomProps
|
|
39
|
-
*/
|
|
40
|
-
kernelSize?: KernelSize;
|
|
41
|
-
/**
|
|
42
|
-
* The luminance threshold. Raise this value to mask out darker elements in the scene. Range is [0, 1].
|
|
43
|
-
*
|
|
44
|
-
* @default 0.9
|
|
45
|
-
*
|
|
46
|
-
* @type {number}
|
|
47
|
-
* @memberof BloomProps
|
|
48
|
-
*/
|
|
49
|
-
luminanceThreshold?: number;
|
|
50
|
-
/**
|
|
51
|
-
* Controls the smoothness of the luminance threshold. Range is [0, 1].
|
|
52
|
-
*
|
|
53
|
-
* @default 0.025
|
|
54
|
-
*
|
|
55
|
-
* @type {number}
|
|
56
|
-
* @memberof BloomProps
|
|
57
|
-
*/
|
|
58
|
-
luminanceSmoothing?: number;
|
|
59
|
-
/**
|
|
60
|
-
* Enables mip map blur.
|
|
61
|
-
*
|
|
62
|
-
* @default false
|
|
63
|
-
*
|
|
64
|
-
* @type {boolean}
|
|
65
|
-
* @memberof BloomProps
|
|
66
|
-
*/
|
|
67
|
-
mipMapBlur?: boolean;
|
|
68
|
-
}
|
|
69
|
-
export declare const Bloom: import("vue").DefineComponent<BloomProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<BloomProps>, {}>;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Texture, Vector2 } from 'three';
|
|
2
|
-
import { GlitchMode } from 'postprocessing';
|
|
3
|
-
export interface GlitchProps {
|
|
4
|
-
/**
|
|
5
|
-
* The minimum and maximum delay between glitch activations in seconds.
|
|
6
|
-
*
|
|
7
|
-
* @default [1.5, 3.5]
|
|
8
|
-
*
|
|
9
|
-
* @type {Vector2}
|
|
10
|
-
* @memberof GlitchProps
|
|
11
|
-
*/
|
|
12
|
-
delay?: Vector2;
|
|
13
|
-
/**
|
|
14
|
-
* The minimum and maximum duration of a glitch in seconds.
|
|
15
|
-
*
|
|
16
|
-
* @default [0.6, 1.0]
|
|
17
|
-
*
|
|
18
|
-
* @type {Vector2}
|
|
19
|
-
* @memberof GlitchProps
|
|
20
|
-
*/
|
|
21
|
-
duration?: Vector2;
|
|
22
|
-
/**
|
|
23
|
-
* The strength of weak and strong glitches.
|
|
24
|
-
*
|
|
25
|
-
* @default [0.3, 1.0]
|
|
26
|
-
*
|
|
27
|
-
* @type {Vector2}
|
|
28
|
-
* @memberof GlitchProps
|
|
29
|
-
*/
|
|
30
|
-
strength?: Vector2;
|
|
31
|
-
/**
|
|
32
|
-
* The glitch mode. Can be DISABLED | SPORADIC | CONSTANT_MILD | CONSTANT_WILD .
|
|
33
|
-
*
|
|
34
|
-
* @default GlitchMode.SPORADIC
|
|
35
|
-
*
|
|
36
|
-
* @type {GlitchMode}
|
|
37
|
-
* @memberof GlitchProps
|
|
38
|
-
*/
|
|
39
|
-
mode?: GlitchMode;
|
|
40
|
-
/**
|
|
41
|
-
* Turn the effect on and off.
|
|
42
|
-
*
|
|
43
|
-
* @type {boolean}
|
|
44
|
-
* @memberof GlitchProps
|
|
45
|
-
*/
|
|
46
|
-
active?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* The threshold for strong glitches.
|
|
50
|
-
*
|
|
51
|
-
* @default 0.85
|
|
52
|
-
*
|
|
53
|
-
* @type {number}
|
|
54
|
-
* @memberof GlitchProps
|
|
55
|
-
*/
|
|
56
|
-
ratio?: number;
|
|
57
|
-
/**
|
|
58
|
-
* The scale of the blocky glitch columns.
|
|
59
|
-
*
|
|
60
|
-
* @default 0.05
|
|
61
|
-
*
|
|
62
|
-
* @type {number}
|
|
63
|
-
* @memberof GlitchProps
|
|
64
|
-
*/
|
|
65
|
-
columns?: number;
|
|
66
|
-
/**
|
|
67
|
-
* A chromatic aberration offset. If provided, the glitch effect will influence this offset.
|
|
68
|
-
*
|
|
69
|
-
* @type {Vector2}
|
|
70
|
-
* @memberof GlitchProps
|
|
71
|
-
*/
|
|
72
|
-
chromaticAberrationOffset?: Vector2;
|
|
73
|
-
/**
|
|
74
|
-
* A perturbation map. If none is provided, a noise texture will be created.
|
|
75
|
-
*
|
|
76
|
-
* @type {Texture}
|
|
77
|
-
* @memberof GlitchProps
|
|
78
|
-
*/
|
|
79
|
-
peturbationMap?: Texture;
|
|
80
|
-
/**
|
|
81
|
-
* The size of the generated noise map. Will be ignored if a perturbation map is provided.
|
|
82
|
-
*
|
|
83
|
-
* @default 64
|
|
84
|
-
*
|
|
85
|
-
* @type {number}
|
|
86
|
-
* @memberof GlitchProps
|
|
87
|
-
*/
|
|
88
|
-
dtSize?: number;
|
|
89
|
-
}
|
|
90
|
-
export declare const Glitch: import("vue").DefineComponent<GlitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<GlitchProps>, {}>;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { Camera } from '@tresjs/core';
|
|
2
|
-
import { Scene } from 'three';
|
|
3
|
-
export interface EffectComposerProps {
|
|
4
|
-
/**
|
|
5
|
-
* Whether the effect composer is enabled.
|
|
6
|
-
* @default true
|
|
7
|
-
* @type {boolean}
|
|
8
|
-
* @memberof EffectComposerProps
|
|
9
|
-
* @name enabled
|
|
10
|
-
*
|
|
11
|
-
**/
|
|
12
|
-
enabled?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* The children of the effect composer.
|
|
15
|
-
* @default []
|
|
16
|
-
* @type {Array}
|
|
17
|
-
* @memberof EffectComposerProps
|
|
18
|
-
* @name children
|
|
19
|
-
*
|
|
20
|
-
**/
|
|
21
|
-
children?: Array<any>;
|
|
22
|
-
/**
|
|
23
|
-
* Whether the depth buffer is enabled.
|
|
24
|
-
* @default true
|
|
25
|
-
* @type {boolean}
|
|
26
|
-
* @memberof EffectComposerProps
|
|
27
|
-
* @name depthBuffer
|
|
28
|
-
*
|
|
29
|
-
**/
|
|
30
|
-
depthBuffer?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @default false
|
|
34
|
-
* @type {boolean}
|
|
35
|
-
* @memberof EffectComposerProps
|
|
36
|
-
* @name dissableNormalPass
|
|
37
|
-
*
|
|
38
|
-
**/
|
|
39
|
-
dissableNormalPass?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* Stencil buffer.
|
|
43
|
-
*
|
|
44
|
-
* @type {boolean}
|
|
45
|
-
* @memberof EffectComposerProps
|
|
46
|
-
* @name stencilBuffer
|
|
47
|
-
*
|
|
48
|
-
**/
|
|
49
|
-
stencilBuffer?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
* Whether the effect composer should clear the buffers before rendering.
|
|
53
|
-
*
|
|
54
|
-
* @type {boolean}
|
|
55
|
-
* @memberof EffectComposerProps
|
|
56
|
-
* @name autoClear
|
|
57
|
-
*
|
|
58
|
-
**/
|
|
59
|
-
autoClear?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* The resolution scale.
|
|
63
|
-
*
|
|
64
|
-
* @type {number}
|
|
65
|
-
* @memberof EffectComposerProps
|
|
66
|
-
* @name resolutionScale
|
|
67
|
-
*
|
|
68
|
-
**/
|
|
69
|
-
resolutionScale?: number;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* The multisampling.
|
|
73
|
-
*
|
|
74
|
-
* @type {number}
|
|
75
|
-
* @memberof EffectComposerProps
|
|
76
|
-
* @name multisampling
|
|
77
|
-
*
|
|
78
|
-
**/
|
|
79
|
-
multisampling?: number;
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* The frame buffer type.
|
|
83
|
-
*
|
|
84
|
-
* @type {number}
|
|
85
|
-
* @memberof EffectComposerProps
|
|
86
|
-
* @name frameBufferType
|
|
87
|
-
*
|
|
88
|
-
**/
|
|
89
|
-
frameBufferType?: number;
|
|
90
|
-
/**
|
|
91
|
-
*
|
|
92
|
-
* The render priority.
|
|
93
|
-
*
|
|
94
|
-
* @type {number}
|
|
95
|
-
* @memberof EffectComposerProps
|
|
96
|
-
* @name renderPriority
|
|
97
|
-
*
|
|
98
|
-
**/
|
|
99
|
-
renderPriority?: number;
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* A camera to use for rendering.
|
|
103
|
-
*
|
|
104
|
-
* @type {Camera}
|
|
105
|
-
* @memberof EffectComposerProps
|
|
106
|
-
* @name camera
|
|
107
|
-
*
|
|
108
|
-
**/
|
|
109
|
-
camera?: Camera;
|
|
110
|
-
/**
|
|
111
|
-
* A scene to use for rendering.
|
|
112
|
-
* @type {Scene}
|
|
113
|
-
* @memberof EffectComposerProps
|
|
114
|
-
* @name scene
|
|
115
|
-
*
|
|
116
|
-
**/
|
|
117
|
-
scene?: Scene;
|
|
118
|
-
}
|
|
119
|
-
export declare const EffectComposer: import("vue").DefineComponent<EffectComposerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<EffectComposerProps>, {}>;
|