@tresjs/post-processing 2.2.0 → 2.3.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/dist/core/pmndrs/BloomPmndrs.vue.d.ts +1 -1
- package/dist/core/pmndrs/DepthOfFieldPmndrs.vue.d.ts +1 -1
- package/dist/core/pmndrs/OutlinePmndrs.vue.d.ts +0 -3
- package/dist/core/pmndrs/composables/useEffectPmndrs.d.ts +6 -1
- package/dist/core/three/composables/useEffect.d.ts +2 -1
- package/dist/tres-post-processing.js +785 -740
- package/dist/tres-post-processing.umd.cjs +17 -17
- package/dist/util/prop.d.ts +1 -1
- package/package.json +4 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BlendFunction, KernelSize, BloomEffect } from 'postprocessing';
|
|
2
2
|
export interface BloomPmndrsProps {
|
|
3
3
|
/**
|
|
4
|
-
* The blend function of this effect.
|
|
4
|
+
* The blend function of this effect.
|
|
5
5
|
* @default BlendFunction.SCREEN
|
|
6
6
|
* @type {BlendFunction}
|
|
7
7
|
* @memberof BloomPmndrsProps
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BlendFunction, DepthOfFieldEffect } from 'postprocessing';
|
|
2
2
|
export interface DepthOfFieldPmndrsProps {
|
|
3
3
|
/**
|
|
4
|
-
* The blend function of this effect.
|
|
4
|
+
* The blend function of this effect.
|
|
5
5
|
*/
|
|
6
6
|
blendFunction?: BlendFunction;
|
|
7
7
|
/**
|
|
@@ -27,9 +27,6 @@ export interface OutlinePmndrsProps {
|
|
|
27
27
|
* The number of samples used for multisample antialiasing. Requires WebGL 2.
|
|
28
28
|
*/
|
|
29
29
|
multisampling?: number;
|
|
30
|
-
/**
|
|
31
|
-
* The blend function. Use `BlendFunction.ALPHA` for dark outlines.
|
|
32
|
-
*/
|
|
33
30
|
blendFunction?: BlendFunction;
|
|
34
31
|
patternTexture?: Texture;
|
|
35
32
|
resolutionScale?: number;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Effect, EffectPass } from 'postprocessing';
|
|
2
2
|
import { Reactive, ShallowRef } from 'vue';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @param newEffectFunction - A function that returns a new effect instance.
|
|
5
|
+
* @param passDependencies - A reactive object that the pass depends on (usually props). Changes to this object will trigger re-rendering.
|
|
6
|
+
* @param dependencyFieldsTriggeringRecreation - fields in passDependencies that require effect recreation when changed
|
|
7
|
+
*/
|
|
8
|
+
export declare const useEffectPmndrs: <T extends Effect, D extends Record<PropertyKey, any>>(newEffectFunction: () => T, passDependencies: Reactive<D>, dependencyFieldsTriggeringRecreation?: (keyof D)[]) => {
|
|
4
9
|
pass: ShallowRef<EffectPass | null>;
|
|
5
10
|
effect: ShallowRef<T | null>;
|
|
6
11
|
};
|
|
@@ -3,7 +3,8 @@ import { Reactive, ShallowRef } from 'vue';
|
|
|
3
3
|
/**
|
|
4
4
|
* @param newPassFunction - A function that returns a new pass instance.
|
|
5
5
|
* @param passDependencies - A reactive object that the pass depends on (usually props). Changes to this object will trigger re-rendering.
|
|
6
|
+
* @param dependencyFieldsTriggeringRecreation - fields in passDependencies that require effect recreation when changed
|
|
6
7
|
*/
|
|
7
|
-
export declare const useEffect: <T extends Pass
|
|
8
|
+
export declare const useEffect: <T extends Pass, D extends Record<PropertyKey, any>>(newPassFunction: () => T, passDependencies?: Reactive<D>, dependencyFieldsTriggeringRecreation?: (keyof D)[]) => {
|
|
8
9
|
pass: ShallowRef<T>;
|
|
9
10
|
};
|