@react-three/postprocessing 2.8.3 → 2.9.1
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/EffectComposer.d.ts +3 -3
- package/dist/Selection.d.ts +3 -3
- package/dist/effects/BrightnessContrast.d.ts +8 -1
- package/dist/effects/ChromaticAberration.d.ts +5 -3
- package/dist/effects/ColorAverage.d.ts +1 -1
- package/dist/effects/ColorDepth.d.ts +7 -1
- package/dist/effects/Depth.d.ts +7 -1
- package/dist/effects/DepthOfField.d.ts +16 -11
- package/dist/effects/DotScreen.d.ts +8 -1
- package/dist/effects/Glitch.d.ts +15 -15
- package/dist/effects/GodRays.d.ts +14 -11
- package/dist/effects/Grid.d.ts +5 -5
- package/dist/effects/HueSaturation.d.ts +8 -1
- package/dist/effects/LUT.d.ts +7 -7
- package/dist/effects/Outline.d.ts +22 -17
- package/dist/effects/Pixelation.d.ts +3 -3
- package/dist/effects/SMAA.d.ts +9 -5
- package/dist/effects/SSAO.d.ts +29 -16
- package/dist/effects/SSR.d.ts +1 -1
- package/dist/effects/SelectiveBloom.d.ts +8 -3
- package/dist/effects/Sepia.d.ts +7 -1
- package/dist/effects/ShockWave.d.ts +4 -1
- package/dist/effects/Texture.d.ts +7 -6
- package/dist/effects/TiltShift2.d.ts +11 -9
- package/dist/effects/ToneMapping.d.ts +15 -1
- package/dist/effects/Vignette.d.ts +10 -1
- package/dist/index.cjs +479 -752
- package/dist/index.js +394 -616
- package/dist/util.d.ts +7 -6
- package/package.json +48 -56
package/dist/util.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { MutableRefObject } from 'react';
|
|
2
|
+
import { Vector2 } from 'three';
|
|
2
3
|
import * as THREE from 'three';
|
|
3
4
|
import { type ReactThreeFiber } from '@react-three/fiber';
|
|
4
|
-
import {
|
|
5
|
+
import type { Effect, BlendFunction } from 'postprocessing';
|
|
5
6
|
export declare const resolveRef: <T>(ref: T | React.MutableRefObject<T>) => T;
|
|
6
|
-
export
|
|
7
|
-
export
|
|
7
|
+
export type EffectConstructor = new (...args: any[]) => Effect;
|
|
8
|
+
export type EffectProps<T extends EffectConstructor> = ReactThreeFiber.Node<T extends Function ? T['prototype'] : InstanceType<T>, T> & ConstructorParameters<T>[0] & {
|
|
8
9
|
blendFunction?: BlendFunction;
|
|
9
10
|
opacity?: number;
|
|
10
11
|
};
|
|
11
|
-
export declare const wrapEffect: <T extends EffectConstructor, P extends EffectProps<T>>(effect: T, defaults?: P) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>;
|
|
12
|
-
export declare const useVector2: (props:
|
|
12
|
+
export declare const wrapEffect: <T extends EffectConstructor, P extends EffectProps<T>>(effect: T, defaults?: P | undefined) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>>;
|
|
13
|
+
export declare const useVector2: (props: Record<string, unknown>, key: string) => THREE.Vector2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-three/postprocessing",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.1",
|
|
4
4
|
"description": "postprocessing wrapper for React and @react-three/fiber",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"postprocessing",
|
|
@@ -12,9 +12,14 @@
|
|
|
12
12
|
],
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"type": "module",
|
|
15
|
-
"main": "dist/index.cjs",
|
|
16
|
-
"module": "dist/index.js",
|
|
17
|
-
"
|
|
15
|
+
"main": "./dist/index.cjs",
|
|
16
|
+
"module": "./dist/index.js",
|
|
17
|
+
"exports": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"require": "./dist/index.cjs",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
18
23
|
"sideEffects": false,
|
|
19
24
|
"files": [
|
|
20
25
|
"dist"
|
|
@@ -28,64 +33,51 @@
|
|
|
28
33
|
"eslint --fix"
|
|
29
34
|
]
|
|
30
35
|
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"postprocessing": "^6.30.2",
|
|
38
|
+
"screen-space-reflections": "2.5.0",
|
|
39
|
+
"three-stdlib": "^2.21.10"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@react-three/fiber": "^8.13.0",
|
|
43
|
+
"@rollup/plugin-commonjs": "^24.1.0",
|
|
44
|
+
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
45
|
+
"@rollup/plugin-typescript": "^11.1.0",
|
|
46
|
+
"@types/react": "^18.2.0",
|
|
47
|
+
"@types/react-dom": "^18.2.1",
|
|
48
|
+
"@types/three": "^0.150.2",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^5.59.1",
|
|
50
|
+
"@typescript-eslint/parser": "^5.59.1",
|
|
51
|
+
"eslint": "^8.39.0",
|
|
52
|
+
"eslint-config-prettier": "^8.8.0",
|
|
53
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
54
|
+
"eslint-plugin-import": "^2.27.5",
|
|
55
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
56
|
+
"eslint-plugin-react": "^7.32.2",
|
|
57
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
58
|
+
"husky": "^8.0.3",
|
|
59
|
+
"lint-staged": "^13.2.2",
|
|
60
|
+
"prettier": "^2.8.8",
|
|
61
|
+
"react": "^18.2.0",
|
|
62
|
+
"react-dom": "^18.2.0",
|
|
63
|
+
"rimraf": "^5.0.0",
|
|
64
|
+
"rollup": "^3.21.0",
|
|
65
|
+
"rollup-plugin-filesize": "^10.0.0",
|
|
66
|
+
"three": "^0.151.3",
|
|
67
|
+
"typescript": "^5.0.4"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"@react-three/fiber": ">=8.0",
|
|
71
|
+
"react": ">=18.0",
|
|
72
|
+
"three": ">= 0.138.0 < 0.152.0"
|
|
73
|
+
},
|
|
31
74
|
"scripts": {
|
|
32
75
|
"prebuild": "rimraf dist && yarn typegen",
|
|
33
76
|
"build": "rollup -c",
|
|
34
|
-
"prepare": "yarn build",
|
|
35
77
|
"eslint": "eslint . --fix --ext=js,ts,jsx,tsx",
|
|
36
78
|
"eslint:ci": "eslint . --ext=js,ts,jsx,tsx",
|
|
37
79
|
"test": "echo no tests yet",
|
|
38
80
|
"typecheck": "tsc --noEmit --emitDeclarationOnly false --strict --jsx react",
|
|
39
81
|
"typegen": "tsc --emitDeclarationOnly || true"
|
|
40
|
-
},
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"postprocessing": "^6.30.1",
|
|
43
|
-
"react-merge-refs": "^1.1.0",
|
|
44
|
-
"screen-space-reflections": "2.5.0",
|
|
45
|
-
"three-stdlib": "^2.8.11"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@babel/core": "^7.17.8",
|
|
49
|
-
"@babel/plugin-transform-modules-commonjs": "7.17.7",
|
|
50
|
-
"@babel/plugin-transform-parameters": "7.16.7",
|
|
51
|
-
"@babel/plugin-transform-runtime": "7.17.0",
|
|
52
|
-
"@babel/plugin-transform-template-literals": "7.16.7",
|
|
53
|
-
"@babel/preset-env": "^7.16.11",
|
|
54
|
-
"@babel/preset-react": "7.16.7",
|
|
55
|
-
"@babel/preset-typescript": "^7.16.7",
|
|
56
|
-
"@react-three/fiber": "^7.0.26",
|
|
57
|
-
"@rollup/plugin-babel": "^5.3.1",
|
|
58
|
-
"@rollup/plugin-commonjs": "^21.0.3",
|
|
59
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
60
|
-
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
61
|
-
"@types/react": "^17.0.43",
|
|
62
|
-
"@types/react-dom": "^17.0.14",
|
|
63
|
-
"@types/react-test-renderer": "^17.0.1",
|
|
64
|
-
"@types/three": "^0.139.0",
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "^5.17.0",
|
|
66
|
-
"@typescript-eslint/parser": "^5.17.0",
|
|
67
|
-
"eslint": "^8.12.0",
|
|
68
|
-
"eslint-config-prettier": "^8.5.0",
|
|
69
|
-
"eslint-import-resolver-alias": "^1.1.2",
|
|
70
|
-
"eslint-plugin-import": "^2.25.4",
|
|
71
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
72
|
-
"eslint-plugin-react": "^7.29.4",
|
|
73
|
-
"eslint-plugin-react-hooks": "^4.3.0",
|
|
74
|
-
"husky": "^7.0.4",
|
|
75
|
-
"husky-run": "^0.0.0",
|
|
76
|
-
"lint-staged": "^12.3.7",
|
|
77
|
-
"prettier": "^2.6.1",
|
|
78
|
-
"react": "^17.0.2",
|
|
79
|
-
"react-dom": "^17.0.2",
|
|
80
|
-
"rimraf": "^3.0.2",
|
|
81
|
-
"rollup": "^2.70.1",
|
|
82
|
-
"rollup-plugin-filesize": "^9.1.2",
|
|
83
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
84
|
-
"typescript": "^4.6.3"
|
|
85
|
-
},
|
|
86
|
-
"peerDependencies": {
|
|
87
|
-
"@react-three/fiber": ">=7.0",
|
|
88
|
-
"react": ">=17.0",
|
|
89
|
-
"three": ">=0.136.0"
|
|
90
82
|
}
|
|
91
|
-
}
|
|
83
|
+
}
|