@tresjs/post-processing 3.1.1 → 3.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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @tresjs/post-processing
3
- * version: v3.1.1
3
+ * version: v3.2.0
4
4
  * (c) 2025
5
5
  * description: Post-processing library for TresJS
6
6
  * author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
@@ -10,7 +10,7 @@ import { Reactive, ShallowRef } from "vue";
10
10
  import * as postprocessing0 from "postprocessing";
11
11
  import { ASCIIEffect, ASCIITexture, BlendFunction, BloomEffect, BrightnessContrastEffect, ChromaticAberrationEffect, ColorAverageEffect, ColorDepthEffect, DepthCopyMode, DepthOfFieldEffect, DepthPickingPass, DotScreenEffect, EdgeDetectionMode, Effect, EffectComposer, EffectPass, FXAAEffect, GlitchEffect, GlitchMode, GodRaysEffect, GridEffect, HueSaturationEffect, KernelSize, LensDistortionEffect, NoiseEffect, OutlineEffect, PixelationEffect, PredicationMode, SMAAEffect, SMAAPreset, ScanlineEffect, SepiaEffect, ShockWaveEffect, TextureEffect, TiltShiftEffect, ToneMappingEffect, ToneMappingMode, VignetteEffect, VignetteTechnique } from "postprocessing";
12
12
  import { TresColor } from "@tresjs/core";
13
- import { Color, DepthPackingStrategies, Mesh, Object3D, Points, Texture, Vector2, Vector3 } from "three";
13
+ import { Color, DepthPackingStrategies, Mesh, Object3D, Points, Texture, Vector2, Vector3, WebGLRenderTarget } from "three";
14
14
  import { EffectComposer as EffectComposer$1 } from "three/examples/jsm/postprocessing/EffectComposer.js";
15
15
  import { GlitchPass } from "three/examples/jsm/postprocessing/GlitchPass.js";
16
16
  import { HalftonePass } from "three/examples/jsm/postprocessing/HalftonePass.js";
@@ -75,13 +75,13 @@ interface BloomPmndrsProps {
75
75
  */
76
76
  mipmapBlur?: boolean;
77
77
  }
78
+ declare const _default$2: typeof __VLS_export$37;
78
79
  declare const __VLS_export$37: vue47.DefineComponent<BloomPmndrsProps, {
79
80
  pass: vue47.ShallowRef<postprocessing0.EffectPass | null>;
80
81
  effect: vue47.ShallowRef<BloomEffect | null>;
81
82
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<BloomPmndrsProps> & Readonly<{}>, {
82
83
  mipmapBlur: boolean;
83
84
  }, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
84
- declare const _default$2: typeof __VLS_export$37;
85
85
  //#endregion
86
86
  //#region src/core/pmndrs/composables/useEffectPmndrs.d.ts
87
87
  /**
@@ -124,11 +124,11 @@ interface DepthOfFieldPmndrsProps {
124
124
  resolutionX?: number;
125
125
  resolutionY?: number;
126
126
  }
127
+ declare const _default$7: typeof __VLS_export$36;
127
128
  declare const __VLS_export$36: vue47.DefineComponent<DepthOfFieldPmndrsProps, {
128
129
  pass: vue47.ShallowRef<postprocessing0.EffectPass | null>;
129
130
  effect: vue47.ShallowRef<DepthOfFieldEffect | null>;
130
131
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<DepthOfFieldPmndrsProps> & Readonly<{}>, {}, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
131
- declare const _default$7: typeof __VLS_export$36;
132
132
  //#endregion
133
133
  //#region src/core/pmndrs/EffectComposerPmndrs.vue.d.ts
134
134
  interface EffectComposerPmndrsProps {
@@ -141,6 +141,7 @@ interface EffectComposerPmndrsProps {
141
141
  multisampling?: number;
142
142
  frameBufferType?: number;
143
143
  }
144
+ declare const _default$11: typeof __VLS_export$35;
144
145
  declare const __VLS_export$35: __VLS_WithSlots$1<vue47.DefineComponent<EffectComposerPmndrsProps, {
145
146
  composer: ShallowRef<EffectComposer | null>;
146
147
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {
@@ -158,7 +159,6 @@ declare const __VLS_export$35: __VLS_WithSlots$1<vue47.DefineComponent<EffectCom
158
159
  }, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>, {
159
160
  default?: (props: {}) => any;
160
161
  }>;
161
- declare const _default$11: typeof __VLS_export$35;
162
162
  type __VLS_WithSlots$1<T, S> = T & {
163
163
  new (): {
164
164
  $slots: S;
@@ -210,11 +210,11 @@ interface GlitchPmndrsProps {
210
210
  */
211
211
  dtSize?: number;
212
212
  }
213
+ declare const _default$15: typeof __VLS_export$34;
213
214
  declare const __VLS_export$34: vue47.DefineComponent<GlitchPmndrsProps, {
214
215
  pass: vue47.ShallowRef<postprocessing0.EffectPass | null>;
215
216
  effect: vue47.ShallowRef<GlitchEffect | null>;
216
217
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<GlitchPmndrsProps> & Readonly<{}>, {}, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
217
- declare const _default$15: typeof __VLS_export$34;
218
218
  //#endregion
219
219
  //#region src/core/pmndrs/NoisePmndrs.vue.d.ts
220
220
  interface NoisePmndrsProps {
@@ -224,13 +224,13 @@ interface NoisePmndrsProps {
224
224
  premultiply?: boolean;
225
225
  blendFunction?: BlendFunction;
226
226
  }
227
+ declare const _default$23: typeof __VLS_export$33;
227
228
  declare const __VLS_export$33: vue47.DefineComponent<NoisePmndrsProps, {
228
229
  pass: vue47.ShallowRef<postprocessing0.EffectPass | null>;
229
230
  effect: vue47.ShallowRef<NoiseEffect | null>;
230
231
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<NoisePmndrsProps> & Readonly<{}>, {
231
232
  premultiply: boolean;
232
233
  }, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
233
- declare const _default$23: typeof __VLS_export$33;
234
234
  //#endregion
235
235
  //#region src/core/pmndrs/OutlinePmndrs.vue.d.ts
236
236
  interface OutlinePmndrsProps {
@@ -281,11 +281,11 @@ interface PixelationPmndrsProps {
281
281
  */
282
282
  granularity?: number;
283
283
  }
284
+ declare const _default$27: typeof __VLS_export$31;
284
285
  declare const __VLS_export$31: vue47.DefineComponent<PixelationPmndrsProps, {
285
286
  pass: vue47.ShallowRef<postprocessing0.EffectPass | null>;
286
287
  effect: vue47.ShallowRef<PixelationEffect | null>;
287
288
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<PixelationPmndrsProps> & Readonly<{}>, {}, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
288
- declare const _default$27: typeof __VLS_export$31;
289
289
  //#endregion
290
290
  //#region src/core/pmndrs/VignettePmndrs.vue.d.ts
291
291
  interface VignettePmndrsProps {
@@ -297,11 +297,11 @@ interface VignettePmndrsProps {
297
297
  offset?: number;
298
298
  darkness?: number;
299
299
  }
300
+ declare const _default$37: typeof __VLS_export$30;
300
301
  declare const __VLS_export$30: vue47.DefineComponent<VignettePmndrsProps, {
301
302
  pass: vue47.ShallowRef<postprocessing0.EffectPass | null>;
302
303
  effect: vue47.ShallowRef<VignetteEffect | null>;
303
304
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<VignettePmndrsProps> & Readonly<{}>, {}, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
304
- declare const _default$37: typeof __VLS_export$30;
305
305
  //#endregion
306
306
  //#region src/core/pmndrs/custom/barrel-blur/index.d.ts
307
307
  /**
@@ -1013,11 +1013,11 @@ interface SMAAPmndrsProps {
1013
1013
  */
1014
1014
  debug?: typeof DEBUG_MODE[keyof typeof DEBUG_MODE];
1015
1015
  }
1016
+ declare const _default$29: typeof __VLS_export$10;
1016
1017
  declare const __VLS_export$10: vue47.DefineComponent<SMAAPmndrsProps, {
1017
1018
  pass: vue47.ShallowRef<EffectPass | null>;
1018
1019
  effect: vue47.ShallowRef<SMAAEffect | null>;
1019
1020
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<SMAAPmndrsProps> & Readonly<{}>, {}, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
1020
- declare const _default$29: typeof __VLS_export$10;
1021
1021
  //#endregion
1022
1022
  //#region src/core/pmndrs/FXAAPmndrs.vue.d.ts
1023
1023
  interface FXAAPmndrsProps {
@@ -1126,8 +1126,10 @@ declare const useEffect: <T extends Pass, D extends Record<PropertyKey, any>>(ne
1126
1126
  //#region src/core/three/EffectComposer.vue.d.ts
1127
1127
  interface EffectComposerProps {
1128
1128
  enabled?: boolean;
1129
+ renderTarget?: WebGLRenderTarget;
1129
1130
  withoutRenderPass?: boolean;
1130
1131
  }
1132
+ declare const _default$10: typeof __VLS_export$6;
1131
1133
  declare const __VLS_export$6: __VLS_WithSlots<vue47.DefineComponent<EffectComposerProps, {
1132
1134
  composer: ShallowRef<EffectComposer$1 | null>;
1133
1135
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<EffectComposerProps> & Readonly<{}>, {
@@ -1135,7 +1137,6 @@ declare const __VLS_export$6: __VLS_WithSlots<vue47.DefineComponent<EffectCompos
1135
1137
  }, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>, {
1136
1138
  default?: (props: {}) => any;
1137
1139
  }>;
1138
- declare const _default$10: typeof __VLS_export$6;
1139
1140
  type __VLS_WithSlots<T, S> = T & {
1140
1141
  new (): {
1141
1142
  $slots: S;
@@ -1153,10 +1154,10 @@ interface GlitchProps {
1153
1154
  */
1154
1155
  goWild?: boolean;
1155
1156
  }
1157
+ declare const _default$14: typeof __VLS_export$5;
1156
1158
  declare const __VLS_export$5: vue47.DefineComponent<GlitchProps, {
1157
1159
  pass: vue47.ShallowRef<GlitchPass>;
1158
1160
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<GlitchProps> & Readonly<{}>, {}, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
1159
- declare const _default$14: typeof __VLS_export$5;
1160
1161
  //#endregion
1161
1162
  //#region src/core/three/Halftone.vue.d.ts
1162
1163
  declare enum HalftoneShape {
@@ -1176,10 +1177,10 @@ interface HalftoneProps {
1176
1177
  greyscale?: boolean;
1177
1178
  blendingMode?: Blending;
1178
1179
  }
1180
+ declare const _default$18: typeof __VLS_export$4;
1179
1181
  declare const __VLS_export$4: vue47.DefineComponent<HalftoneProps, {
1180
1182
  pass: vue47.ShallowRef<HalftonePass>;
1181
1183
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<HalftoneProps> & Readonly<{}>, {}, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
1182
- declare const _default$18: typeof __VLS_export$4;
1183
1184
  //#endregion
1184
1185
  //#region src/core/three/Pixelation.vue.d.ts
1185
1186
  interface PixelationProps {
@@ -1187,10 +1188,10 @@ interface PixelationProps {
1187
1188
  depthEdgeStrength?: number;
1188
1189
  normalEdgeStrength?: number;
1189
1190
  }
1191
+ declare const _default$26: typeof __VLS_export$3;
1190
1192
  declare const __VLS_export$3: vue47.DefineComponent<PixelationProps, {
1191
1193
  pass: vue47.ShallowRef<RenderPixelatedPass>;
1192
1194
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<PixelationProps> & Readonly<{}>, {}, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
1193
- declare const _default$26: typeof __VLS_export$3;
1194
1195
  //#endregion
1195
1196
  //#region src/core/three/Output.vue.d.ts
1196
1197
  declare const __VLS_export$2: vue47.DefineComponent<{}, {
@@ -1203,10 +1204,10 @@ interface SMAAProps {
1203
1204
  width?: number;
1204
1205
  height?: number;
1205
1206
  }
1207
+ declare const _default$28: typeof __VLS_export$1;
1206
1208
  declare const __VLS_export$1: vue47.DefineComponent<SMAAProps, {
1207
1209
  pass: vue47.ShallowRef<SMAAPass>;
1208
1210
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<SMAAProps> & Readonly<{}>, {}, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
1209
- declare const _default$28: typeof __VLS_export$1;
1210
1211
  //#endregion
1211
1212
  //#region src/core/three/UnrealBloom.vue.d.ts
1212
1213
  interface UnrealBloomProps {
@@ -1214,6 +1215,7 @@ interface UnrealBloomProps {
1214
1215
  strength?: number;
1215
1216
  threshold?: number;
1216
1217
  }
1218
+ declare const _default$36: typeof __VLS_export;
1217
1219
  declare const __VLS_export: vue47.DefineComponent<UnrealBloomProps, {
1218
1220
  pass: vue47.ShallowRef<UnrealBloomPass>;
1219
1221
  }, {}, {}, {}, vue47.ComponentOptionsMixin, vue47.ComponentOptionsMixin, {}, string, vue47.PublicProps, Readonly<UnrealBloomProps> & Readonly<{}>, {
@@ -1221,6 +1223,5 @@ declare const __VLS_export: vue47.DefineComponent<UnrealBloomProps, {
1221
1223
  strength: number;
1222
1224
  threshold: number;
1223
1225
  }, {}, {}, {}, string, vue47.ComponentProvideOptions, false, {}, any>;
1224
- declare const _default$36: typeof __VLS_export;
1225
1226
  //#endregion
1226
1227
  export { _default as ASCIIPmndrs, ASCIIPmndrsProps, _default$1 as BarrelBlurPmndrs, BarrelBlurPmndrsProps, _default$2 as BloomPmndrs, BloomPmndrsProps, _default$3 as BrightnessContrastPmndrs, BrightnessContrastPmndrsProps, _default$4 as ChromaticAberrationPmndrs, ChromaticAberrationPmndrsProps, _default$5 as ColorAveragePmndrs, ColorAveragePmndrsProps, _default$6 as ColorDepthPmndrs, ColorDepthPmndrsProps, _default$7 as DepthOfFieldPmndrs, DepthOfFieldPmndrsProps, _default$8 as DepthPickingPassPmndrs, DepthPickingPassPmndrsProps, _default$9 as DotScreenPmndrs, DotScreenPmndrsProps, _default$10 as EffectComposer, _default$11 as EffectComposerPmndrs, EffectComposerPmndrsProps, EffectComposerProps, _default$12 as FXAAPmndrs, FXAAPmndrsProps, _default$13 as FishEyePmndrs, FishEyePmndrsProps, _default$14 as Glitch, _default$15 as GlitchPmndrs, GlitchPmndrsProps, GlitchProps, _default$16 as GodRaysPmndrs, GodRaysPmndrsProps, _default$17 as GridPmndrs, GridPmndrsProps, _default$18 as Halftone, HalftoneProps, _default$19 as HueSaturationPmndrs, HueSaturationPmndrsProps, _default$20 as KuwaharaPmndrs, KuwaharaPmndrsProps, _default$21 as LensDistortionPmndrs, LensDistortionPmndrsProps, _default$22 as LinocutPmndrs, LinocutPmndrsProps, _default$23 as NoisePmndrs, NoisePmndrsProps, _default$24 as OutlinePmndrs, OutlinePmndrsProps, _default$25 as Output, _default$26 as Pixelation, _default$27 as PixelationPmndrs, PixelationPmndrsProps, PixelationProps, _default$28 as SMAA, _default$29 as SMAAPmndrs, SMAAPmndrsProps, SMAAProps, _default$30 as ScanlinePmndrs, ScanlinePmndrsProps, _default$31 as SepiaPmndrs, SepiaPmndrsProps, _default$32 as ShockWavePmndrs, ShockWavePmndrsProps, _default$33 as TexturePmndrs, TexturePmndrsProps, _default$34 as TiltShiftPmndrs, TiltShiftPmndrsProps, _default$35 as ToneMappingPmndrs, ToneMappingPmndrsProps, _default$36 as UnrealBloom, UnrealBloomProps, _default$37 as VignettePmndrs, VignettePmndrsProps, useEffect, useEffectPmndrs };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @tresjs/post-processing
3
- * version: v3.1.1
3
+ * version: v3.2.0
4
4
  * (c) 2025
5
5
  * description: Post-processing library for TresJS
6
6
  * author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
@@ -2386,6 +2386,10 @@ var EffectComposer_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
2386
2386
  required: false,
2387
2387
  default: true
2388
2388
  },
2389
+ renderTarget: {
2390
+ type: Object,
2391
+ required: false
2392
+ },
2389
2393
  withoutRenderPass: {
2390
2394
  type: Boolean,
2391
2395
  required: false
@@ -2399,7 +2403,7 @@ var EffectComposer_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
2399
2403
  const { renderer, sizes, scene, camera } = useTresContext();
2400
2404
  const initEffectComposer = () => {
2401
2405
  effectComposer.value?.dispose();
2402
- effectComposer.value = new EffectComposer$1(renderer.instance);
2406
+ effectComposer.value = new EffectComposer$1(renderer.instance, props.renderTarget);
2403
2407
  };
2404
2408
  watchEffect(initEffectComposer);
2405
2409
  watchEffect(() => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tresjs/post-processing",
3
3
  "type": "module",
4
- "version": "3.1.1",
4
+ "version": "3.2.0",
5
5
  "description": "Post-processing library for TresJS",
6
6
  "author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
7
7
  "license": "MIT",
@@ -21,7 +21,8 @@
21
21
  ],
22
22
  "maintainers": [
23
23
  "Alvaro Saburido (https://github.com/alvarosabu/)",
24
- "Tino Koch (https://github.com/Tinoooo)"
24
+ "Tino Koch (https://github.com/Tinoooo)",
25
+ "Damien Montastier (https://github.com/damienmontastier)"
25
26
  ],
26
27
  "exports": {
27
28
  ".": "./dist/tres-post-processing.js",
@@ -38,7 +39,7 @@
38
39
  "access": "public"
39
40
  },
40
41
  "peerDependencies": {
41
- "@tresjs/core": "5.1.1",
42
+ "@tresjs/core": "5.2.1",
42
43
  "three": ">=0.169",
43
44
  "vue": ">=3.4"
44
45
  },
@@ -62,9 +63,9 @@
62
63
  "vite-plugin-dts": "4.5.4",
63
64
  "vue": "^3.5.22",
64
65
  "vue-tsc": "^3.1.1",
65
- "@tresjs/core": "5.1.1",
66
66
  "@tresjs/eslint-config": "1.5.1",
67
- "@tresjs/leches": "1.1.1"
67
+ "@tresjs/leches": "1.1.2",
68
+ "@tresjs/core": "5.2.1"
68
69
  },
69
70
  "nx": {
70
71
  "implicitDependencies": [
@@ -72,8 +73,6 @@
72
73
  ]
73
74
  },
74
75
  "scripts": {
75
- "dev": "cd playground && npm run dev",
76
- "playground": "cd playground && npm run dev",
77
76
  "build": "tsdown",
78
77
  "preview": "vite preview",
79
78
  "lint": "eslint .",