@react-three/postprocessing 2.19.1 → 3.0.0-rc.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.
Files changed (270) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +81 -81
  3. package/dist/index.d.ts +1 -38
  4. package/dist/index.js +554 -88
  5. package/dist/index.js.map +1 -1
  6. package/package.json +68 -96
  7. package/src/EffectComposer.test.tsx +126 -0
  8. package/src/EffectComposer.tsx +200 -0
  9. package/src/Selection.tsx +46 -0
  10. package/src/effects/ASCII.tsx +135 -0
  11. package/src/effects/Autofocus.tsx +153 -0
  12. package/src/effects/Bloom.tsx +6 -0
  13. package/src/effects/BrightnessContrast.tsx +4 -0
  14. package/src/effects/ChromaticAberration.tsx +5 -0
  15. package/src/effects/ColorAverage.tsx +15 -0
  16. package/src/effects/ColorDepth.tsx +4 -0
  17. package/src/effects/Depth.tsx +4 -0
  18. package/src/effects/DepthOfField.tsx +89 -0
  19. package/src/effects/DotScreen.tsx +4 -0
  20. package/src/effects/FXAA.tsx +4 -0
  21. package/src/effects/Glitch.tsx +40 -0
  22. package/src/effects/GodRays.tsx +16 -0
  23. package/src/effects/Grid.tsx +21 -0
  24. package/src/effects/HueSaturation.tsx +4 -0
  25. package/src/effects/LUT.tsx +26 -0
  26. package/{dist/effects/LensFlare.js → src/effects/LensFlare.tsx} +611 -556
  27. package/src/effects/N8AO.tsx +81 -0
  28. package/src/effects/Noise.tsx +4 -0
  29. package/src/effects/Outline.tsx +117 -0
  30. package/src/effects/Pixelation.tsx +15 -0
  31. package/{dist/effects/Ramp.js → src/effects/Ramp.tsx} +150 -156
  32. package/src/effects/SMAA.tsx +4 -0
  33. package/src/effects/SSAO.tsx +41 -0
  34. package/src/effects/ScanlineEffect.tsx +7 -0
  35. package/src/effects/SelectiveBloom.tsx +126 -0
  36. package/src/effects/Sepia.tsx +4 -0
  37. package/src/effects/ShockWave.tsx +4 -0
  38. package/src/effects/Texture.tsx +23 -0
  39. package/src/effects/TiltShift.tsx +4 -0
  40. package/{dist/effects/TiltShift2.js → src/effects/TiltShift2.tsx} +90 -98
  41. package/src/effects/ToneMapping.tsx +6 -0
  42. package/src/effects/Vignette.tsx +4 -0
  43. package/{dist/effects/Water.js → src/effects/Water.tsx} +35 -38
  44. package/src/index.ts +40 -0
  45. package/src/util.tsx +55 -0
  46. package/dist/EffectComposer.cjs +0 -137
  47. package/dist/EffectComposer.cjs.map +0 -1
  48. package/dist/EffectComposer.d.ts +0 -27
  49. package/dist/EffectComposer.js +0 -137
  50. package/dist/EffectComposer.js.map +0 -1
  51. package/dist/EffectComposer.test.d.ts +0 -4
  52. package/dist/Selection.cjs +0 -36
  53. package/dist/Selection.cjs.map +0 -1
  54. package/dist/Selection.d.ts +0 -16
  55. package/dist/Selection.js +0 -36
  56. package/dist/Selection.js.map +0 -1
  57. package/dist/compat.cjs +0 -77
  58. package/dist/compat.cjs.map +0 -1
  59. package/dist/compat.js +0 -60
  60. package/dist/compat.js.map +0 -1
  61. package/dist/effects/ASCII.cjs +0 -113
  62. package/dist/effects/ASCII.cjs.map +0 -1
  63. package/dist/effects/ASCII.d.ts +0 -18
  64. package/dist/effects/ASCII.js +0 -113
  65. package/dist/effects/ASCII.js.map +0 -1
  66. package/dist/effects/Autofocus.cjs +0 -126
  67. package/dist/effects/Autofocus.cjs.map +0 -1
  68. package/dist/effects/Autofocus.d.ts +0 -22
  69. package/dist/effects/Autofocus.js +0 -109
  70. package/dist/effects/Autofocus.js.map +0 -1
  71. package/dist/effects/Bloom.cjs +0 -9
  72. package/dist/effects/Bloom.cjs.map +0 -1
  73. package/dist/effects/Bloom.d.ts +0 -6
  74. package/dist/effects/Bloom.js +0 -9
  75. package/dist/effects/Bloom.js.map +0 -1
  76. package/dist/effects/BrightnessContrast.cjs +0 -7
  77. package/dist/effects/BrightnessContrast.cjs.map +0 -1
  78. package/dist/effects/BrightnessContrast.d.ts +0 -10
  79. package/dist/effects/BrightnessContrast.js +0 -7
  80. package/dist/effects/BrightnessContrast.js.map +0 -1
  81. package/dist/effects/ChromaticAberration.cjs +0 -7
  82. package/dist/effects/ChromaticAberration.cjs.map +0 -1
  83. package/dist/effects/ChromaticAberration.d.ts +0 -13
  84. package/dist/effects/ChromaticAberration.js +0 -7
  85. package/dist/effects/ChromaticAberration.js.map +0 -1
  86. package/dist/effects/ColorAverage.cjs +0 -11
  87. package/dist/effects/ColorAverage.cjs.map +0 -1
  88. package/dist/effects/ColorAverage.d.ts +0 -8
  89. package/dist/effects/ColorAverage.js +0 -11
  90. package/dist/effects/ColorAverage.js.map +0 -1
  91. package/dist/effects/ColorDepth.cjs +0 -7
  92. package/dist/effects/ColorDepth.cjs.map +0 -1
  93. package/dist/effects/ColorDepth.d.ts +0 -9
  94. package/dist/effects/ColorDepth.js +0 -7
  95. package/dist/effects/ColorDepth.js.map +0 -1
  96. package/dist/effects/Depth.cjs +0 -7
  97. package/dist/effects/Depth.cjs.map +0 -1
  98. package/dist/effects/Depth.d.ts +0 -9
  99. package/dist/effects/Depth.js +0 -7
  100. package/dist/effects/Depth.js.map +0 -1
  101. package/dist/effects/DepthOfField.cjs +0 -74
  102. package/dist/effects/DepthOfField.cjs.map +0 -1
  103. package/dist/effects/DepthOfField.d.ts +0 -25
  104. package/dist/effects/DepthOfField.js +0 -74
  105. package/dist/effects/DepthOfField.js.map +0 -1
  106. package/dist/effects/DotScreen.cjs +0 -7
  107. package/dist/effects/DotScreen.cjs.map +0 -1
  108. package/dist/effects/DotScreen.d.ts +0 -10
  109. package/dist/effects/DotScreen.js +0 -7
  110. package/dist/effects/DotScreen.js.map +0 -1
  111. package/dist/effects/FXAA.cjs +0 -7
  112. package/dist/effects/FXAA.cjs.map +0 -1
  113. package/dist/effects/FXAA.d.ts +0 -8
  114. package/dist/effects/FXAA.js +0 -7
  115. package/dist/effects/FXAA.js.map +0 -1
  116. package/dist/effects/Glitch.cjs +0 -31
  117. package/dist/effects/Glitch.cjs.map +0 -1
  118. package/dist/effects/Glitch.d.ts +0 -30
  119. package/dist/effects/Glitch.js +0 -31
  120. package/dist/effects/Glitch.js.map +0 -1
  121. package/dist/effects/GodRays.cjs +0 -15
  122. package/dist/effects/GodRays.cjs.map +0 -1
  123. package/dist/effects/GodRays.d.ts +0 -21
  124. package/dist/effects/GodRays.js +0 -15
  125. package/dist/effects/GodRays.js.map +0 -1
  126. package/dist/effects/Grid.cjs +0 -18
  127. package/dist/effects/Grid.cjs.map +0 -1
  128. package/dist/effects/Grid.d.ts +0 -12
  129. package/dist/effects/Grid.js +0 -18
  130. package/dist/effects/Grid.js.map +0 -1
  131. package/dist/effects/HueSaturation.cjs +0 -7
  132. package/dist/effects/HueSaturation.cjs.map +0 -1
  133. package/dist/effects/HueSaturation.d.ts +0 -10
  134. package/dist/effects/HueSaturation.js +0 -7
  135. package/dist/effects/HueSaturation.js.map +0 -1
  136. package/dist/effects/LUT.cjs +0 -20
  137. package/dist/effects/LUT.cjs.map +0 -1
  138. package/dist/effects/LUT.d.ts +0 -9
  139. package/dist/effects/LUT.js +0 -20
  140. package/dist/effects/LUT.js.map +0 -1
  141. package/dist/effects/LensFlare.cjs +0 -573
  142. package/dist/effects/LensFlare.cjs.map +0 -1
  143. package/dist/effects/LensFlare.d.ts +0 -55
  144. package/dist/effects/LensFlare.js.map +0 -1
  145. package/dist/effects/N8AO/BlueNoise.cjs +0 -4
  146. package/dist/effects/N8AO/BlueNoise.cjs.map +0 -1
  147. package/dist/effects/N8AO/BlueNoise.js +0 -5
  148. package/dist/effects/N8AO/BlueNoise.js.map +0 -1
  149. package/dist/effects/N8AO/DepthDownSample.cjs +0 -183
  150. package/dist/effects/N8AO/DepthDownSample.cjs.map +0 -1
  151. package/dist/effects/N8AO/DepthDownSample.js +0 -166
  152. package/dist/effects/N8AO/DepthDownSample.js.map +0 -1
  153. package/dist/effects/N8AO/EffectCompositer.cjs +0 -278
  154. package/dist/effects/N8AO/EffectCompositer.cjs.map +0 -1
  155. package/dist/effects/N8AO/EffectCompositer.js +0 -261
  156. package/dist/effects/N8AO/EffectCompositer.js.map +0 -1
  157. package/dist/effects/N8AO/EffectShader.cjs +0 -236
  158. package/dist/effects/N8AO/EffectShader.cjs.map +0 -1
  159. package/dist/effects/N8AO/EffectShader.js +0 -219
  160. package/dist/effects/N8AO/EffectShader.js.map +0 -1
  161. package/dist/effects/N8AO/FullScreenTriangle.cjs +0 -59
  162. package/dist/effects/N8AO/FullScreenTriangle.cjs.map +0 -1
  163. package/dist/effects/N8AO/FullScreenTriangle.js +0 -42
  164. package/dist/effects/N8AO/FullScreenTriangle.js.map +0 -1
  165. package/dist/effects/N8AO/N8AOPostPass.cjs +0 -502
  166. package/dist/effects/N8AO/N8AOPostPass.cjs.map +0 -1
  167. package/dist/effects/N8AO/N8AOPostPass.js +0 -485
  168. package/dist/effects/N8AO/N8AOPostPass.js.map +0 -1
  169. package/dist/effects/N8AO/PoissionBlur.cjs +0 -186
  170. package/dist/effects/N8AO/PoissionBlur.cjs.map +0 -1
  171. package/dist/effects/N8AO/PoissionBlur.js +0 -169
  172. package/dist/effects/N8AO/PoissionBlur.js.map +0 -1
  173. package/dist/effects/N8AO/index.cjs +0 -60
  174. package/dist/effects/N8AO/index.cjs.map +0 -1
  175. package/dist/effects/N8AO/index.d.ts +0 -18
  176. package/dist/effects/N8AO/index.js +0 -60
  177. package/dist/effects/N8AO/index.js.map +0 -1
  178. package/dist/effects/Noise.cjs +0 -7
  179. package/dist/effects/Noise.cjs.map +0 -1
  180. package/dist/effects/Noise.d.ts +0 -9
  181. package/dist/effects/Noise.js +0 -7
  182. package/dist/effects/Noise.js.map +0 -1
  183. package/dist/effects/Outline.cjs +0 -100
  184. package/dist/effects/Outline.cjs.map +0 -1
  185. package/dist/effects/Outline.d.ts +0 -30
  186. package/dist/effects/Outline.js +0 -100
  187. package/dist/effects/Outline.js.map +0 -1
  188. package/dist/effects/Pixelation.cjs +0 -11
  189. package/dist/effects/Pixelation.cjs.map +0 -1
  190. package/dist/effects/Pixelation.d.ts +0 -6
  191. package/dist/effects/Pixelation.js +0 -11
  192. package/dist/effects/Pixelation.js.map +0 -1
  193. package/dist/effects/Ramp.cjs +0 -156
  194. package/dist/effects/Ramp.cjs.map +0 -1
  195. package/dist/effects/Ramp.d.ts +0 -88
  196. package/dist/effects/Ramp.js.map +0 -1
  197. package/dist/effects/SMAA.cjs +0 -7
  198. package/dist/effects/SMAA.cjs.map +0 -1
  199. package/dist/effects/SMAA.d.ts +0 -10
  200. package/dist/effects/SMAA.js +0 -7
  201. package/dist/effects/SMAA.js.map +0 -1
  202. package/dist/effects/SSAO.cjs +0 -37
  203. package/dist/effects/SSAO.cjs.map +0 -1
  204. package/dist/effects/SSAO.d.ts +0 -30
  205. package/dist/effects/SSAO.js +0 -37
  206. package/dist/effects/SSAO.js.map +0 -1
  207. package/dist/effects/SSR/index.cjs +0 -33
  208. package/dist/effects/SSR/index.cjs.map +0 -1
  209. package/dist/effects/SSR/index.d.ts +0 -55
  210. package/dist/effects/SSR/index.js +0 -33
  211. package/dist/effects/SSR/index.js.map +0 -1
  212. package/dist/effects/SSR/screen-space-reflections.cjs +0 -1699
  213. package/dist/effects/SSR/screen-space-reflections.cjs.map +0 -1
  214. package/dist/effects/SSR/screen-space-reflections.js +0 -1699
  215. package/dist/effects/SSR/screen-space-reflections.js.map +0 -1
  216. package/dist/effects/ScanlineEffect.cjs +0 -7
  217. package/dist/effects/ScanlineEffect.cjs.map +0 -1
  218. package/dist/effects/ScanlineEffect.d.ts +0 -9
  219. package/dist/effects/ScanlineEffect.js +0 -7
  220. package/dist/effects/ScanlineEffect.js.map +0 -1
  221. package/dist/effects/SelectiveBloom.cjs +0 -104
  222. package/dist/effects/SelectiveBloom.cjs.map +0 -1
  223. package/dist/effects/SelectiveBloom.d.ts +0 -20
  224. package/dist/effects/SelectiveBloom.js +0 -104
  225. package/dist/effects/SelectiveBloom.js.map +0 -1
  226. package/dist/effects/Sepia.cjs +0 -7
  227. package/dist/effects/Sepia.cjs.map +0 -1
  228. package/dist/effects/Sepia.d.ts +0 -9
  229. package/dist/effects/Sepia.js +0 -7
  230. package/dist/effects/Sepia.js.map +0 -1
  231. package/dist/effects/ShockWave.cjs +0 -7
  232. package/dist/effects/ShockWave.cjs.map +0 -1
  233. package/dist/effects/ShockWave.d.ts +0 -6
  234. package/dist/effects/ShockWave.js +0 -7
  235. package/dist/effects/ShockWave.js.map +0 -1
  236. package/dist/effects/Texture.cjs +0 -21
  237. package/dist/effects/Texture.cjs.map +0 -1
  238. package/dist/effects/Texture.d.ts +0 -11
  239. package/dist/effects/Texture.js +0 -21
  240. package/dist/effects/Texture.js.map +0 -1
  241. package/dist/effects/TiltShift.cjs +0 -7
  242. package/dist/effects/TiltShift.cjs.map +0 -1
  243. package/dist/effects/TiltShift.d.ts +0 -17
  244. package/dist/effects/TiltShift.js +0 -7
  245. package/dist/effects/TiltShift.js.map +0 -1
  246. package/dist/effects/TiltShift2.cjs +0 -98
  247. package/dist/effects/TiltShift2.cjs.map +0 -1
  248. package/dist/effects/TiltShift2.d.ts +0 -30
  249. package/dist/effects/TiltShift2.js.map +0 -1
  250. package/dist/effects/ToneMapping.cjs +0 -7
  251. package/dist/effects/ToneMapping.cjs.map +0 -1
  252. package/dist/effects/ToneMapping.d.ts +0 -19
  253. package/dist/effects/ToneMapping.js +0 -7
  254. package/dist/effects/ToneMapping.js.map +0 -1
  255. package/dist/effects/Vignette.cjs +0 -7
  256. package/dist/effects/Vignette.cjs.map +0 -1
  257. package/dist/effects/Vignette.d.ts +0 -12
  258. package/dist/effects/Vignette.js +0 -7
  259. package/dist/effects/Vignette.js.map +0 -1
  260. package/dist/effects/Water.cjs +0 -38
  261. package/dist/effects/Water.cjs.map +0 -1
  262. package/dist/effects/Water.d.ts +0 -15
  263. package/dist/effects/Water.js.map +0 -1
  264. package/dist/index.cjs +0 -89
  265. package/dist/index.cjs.map +0 -1
  266. package/dist/util.cjs +0 -69
  267. package/dist/util.cjs.map +0 -1
  268. package/dist/util.d.ts +0 -13
  269. package/dist/util.js +0 -52
  270. package/dist/util.js.map +0 -1
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const postprocessing = require("postprocessing");
4
- const util = require("../util.cjs");
5
- const ChromaticAberration = util.wrapEffect(postprocessing.ChromaticAberrationEffect);
6
- exports.ChromaticAberration = ChromaticAberration;
7
- //# sourceMappingURL=ChromaticAberration.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChromaticAberration.cjs","sources":["../../src/effects/ChromaticAberration.tsx"],"sourcesContent":["import { ChromaticAberrationEffect } from 'postprocessing'\nimport { type EffectProps, wrapEffect } from '../util'\n\nexport type ChromaticAberrationProps = EffectProps<typeof ChromaticAberrationEffect>\nexport const ChromaticAberration = wrapEffect(ChromaticAberrationEffect)\n"],"names":["wrapEffect","ChromaticAberrationEffect"],"mappings":";;;;AAIa,MAAA,sBAAsBA,gBAAWC,eAAyB,yBAAA;;"}
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- import { ChromaticAberrationEffect } from 'postprocessing';
3
- import { type EffectProps } from '../util';
4
- export type ChromaticAberrationProps = EffectProps<typeof ChromaticAberrationEffect>;
5
- export declare const ChromaticAberration: import("react").ForwardRefExoticComponent<Omit<import("@react-three/fiber").ExtendedColors<import("@react-three/fiber").Overwrite<Partial<ChromaticAberrationEffect>, import("@react-three/fiber").NodeProps<ChromaticAberrationEffect, typeof ChromaticAberrationEffect>>> & {
6
- blendFunction?: import("postprocessing").BlendFunction | undefined;
7
- offset?: import("three").Vector2 | undefined;
8
- radialModulation: boolean;
9
- modulationOffset: number;
10
- } & {
11
- blendFunction?: import("postprocessing").BlendFunction | undefined;
12
- opacity?: number | undefined;
13
- }, "ref"> & import("react").RefAttributes<typeof ChromaticAberrationEffect>>;
@@ -1,7 +0,0 @@
1
- import { ChromaticAberrationEffect } from "postprocessing";
2
- import { wrapEffect } from "../util.js";
3
- const ChromaticAberration = wrapEffect(ChromaticAberrationEffect);
4
- export {
5
- ChromaticAberration
6
- };
7
- //# sourceMappingURL=ChromaticAberration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChromaticAberration.js","sources":["../../src/effects/ChromaticAberration.tsx"],"sourcesContent":["import { ChromaticAberrationEffect } from 'postprocessing'\nimport { type EffectProps, wrapEffect } from '../util'\n\nexport type ChromaticAberrationProps = EffectProps<typeof ChromaticAberrationEffect>\nexport const ChromaticAberration = wrapEffect(ChromaticAberrationEffect)\n"],"names":[],"mappings":";;AAIa,MAAA,sBAAsB,WAAW,yBAAyB;"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const postprocessing = require("postprocessing");
5
- const React = require("react");
6
- const ColorAverage = React.forwardRef(function ColorAverage2({ blendFunction = postprocessing.BlendFunction.NORMAL }, ref) {
7
- const effect = React.useMemo(() => new postprocessing.ColorAverageEffect(blendFunction), [blendFunction]);
8
- return /* @__PURE__ */ jsxRuntime.jsx("primitive", { ref, object: effect, dispose: null });
9
- });
10
- exports.ColorAverage = ColorAverage;
11
- //# sourceMappingURL=ColorAverage.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ColorAverage.cjs","sources":["../../src/effects/ColorAverage.tsx"],"sourcesContent":["import { ColorAverageEffect, BlendFunction } from 'postprocessing'\nimport React, { Ref, forwardRef, useMemo } from 'react'\n\nexport type ColorAverageProps = Partial<{\n blendFunction: BlendFunction\n}>\n\nexport const ColorAverage = forwardRef<ColorAverageEffect, ColorAverageProps>(function ColorAverage(\n { blendFunction = BlendFunction.NORMAL }: ColorAverageProps,\n ref: Ref<ColorAverageEffect>\n) {\n /** Because ColorAverage blendFunction is not an object but a number, we have to define a custom prop \"blendFunction\" */\n const effect = useMemo(() => new ColorAverageEffect(blendFunction), [blendFunction])\n return <primitive ref={ref} object={effect} dispose={null} />\n})\n"],"names":["forwardRef","ColorAverage","BlendFunction","useMemo","ColorAverageEffect"],"mappings":";;;;;AAOa,MAAA,eAAeA,MAAAA,WAAkD,SAASC,cACrF,EAAE,gBAAgBC,6BAAc,OAAO,GACvC,KACA;AAEM,QAAA,SAASC,cAAQ,MAAM,IAAIC,eAAAA,mBAAmB,aAAa,GAAG,CAAC,aAAa,CAAC;AACnF,wCAAQ,aAAU,EAAA,KAAU,QAAQ,QAAQ,SAAS,KAAM,CAAA;AAC7D,CAAC;;"}
@@ -1,8 +0,0 @@
1
- import { ColorAverageEffect, BlendFunction } from 'postprocessing';
2
- import React from 'react';
3
- export type ColorAverageProps = Partial<{
4
- blendFunction: BlendFunction;
5
- }>;
6
- export declare const ColorAverage: React.ForwardRefExoticComponent<Partial<{
7
- blendFunction: BlendFunction;
8
- }> & React.RefAttributes<ColorAverageEffect>>;
@@ -1,11 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { ColorAverageEffect, BlendFunction } from "postprocessing";
3
- import { forwardRef, useMemo } from "react";
4
- const ColorAverage = forwardRef(function ColorAverage2({ blendFunction = BlendFunction.NORMAL }, ref) {
5
- const effect = useMemo(() => new ColorAverageEffect(blendFunction), [blendFunction]);
6
- return /* @__PURE__ */ jsx("primitive", { ref, object: effect, dispose: null });
7
- });
8
- export {
9
- ColorAverage
10
- };
11
- //# sourceMappingURL=ColorAverage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ColorAverage.js","sources":["../../src/effects/ColorAverage.tsx"],"sourcesContent":["import { ColorAverageEffect, BlendFunction } from 'postprocessing'\nimport React, { Ref, forwardRef, useMemo } from 'react'\n\nexport type ColorAverageProps = Partial<{\n blendFunction: BlendFunction\n}>\n\nexport const ColorAverage = forwardRef<ColorAverageEffect, ColorAverageProps>(function ColorAverage(\n { blendFunction = BlendFunction.NORMAL }: ColorAverageProps,\n ref: Ref<ColorAverageEffect>\n) {\n /** Because ColorAverage blendFunction is not an object but a number, we have to define a custom prop \"blendFunction\" */\n const effect = useMemo(() => new ColorAverageEffect(blendFunction), [blendFunction])\n return <primitive ref={ref} object={effect} dispose={null} />\n})\n"],"names":["ColorAverage"],"mappings":";;;AAOa,MAAA,eAAe,WAAkD,SAASA,cACrF,EAAE,gBAAgB,cAAc,OAAO,GACvC,KACA;AAEM,QAAA,SAAS,QAAQ,MAAM,IAAI,mBAAmB,aAAa,GAAG,CAAC,aAAa,CAAC;AACnF,6BAAQ,aAAU,EAAA,KAAU,QAAQ,QAAQ,SAAS,KAAM,CAAA;AAC7D,CAAC;"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const postprocessing = require("postprocessing");
4
- const util = require("../util.cjs");
5
- const ColorDepth = util.wrapEffect(postprocessing.ColorDepthEffect);
6
- exports.ColorDepth = ColorDepth;
7
- //# sourceMappingURL=ColorDepth.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ColorDepth.cjs","sources":["../../src/effects/ColorDepth.tsx"],"sourcesContent":["import { ColorDepthEffect } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const ColorDepth = wrapEffect(ColorDepthEffect)\n"],"names":["wrapEffect","ColorDepthEffect"],"mappings":";;;;AAGa,MAAA,aAAaA,gBAAWC,eAAgB,gBAAA;;"}
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { ColorDepthEffect } from 'postprocessing';
3
- export declare const ColorDepth: import("react").ForwardRefExoticComponent<Omit<import("@react-three/fiber").ExtendedColors<import("@react-three/fiber").Overwrite<Partial<ColorDepthEffect>, import("@react-three/fiber").NodeProps<ColorDepthEffect, typeof ColorDepthEffect>>> & {
4
- blendFunction?: import("postprocessing").BlendFunction | undefined;
5
- bits?: number | undefined;
6
- } & {
7
- blendFunction?: import("postprocessing").BlendFunction | undefined;
8
- opacity?: number | undefined;
9
- }, "ref"> & import("react").RefAttributes<typeof ColorDepthEffect>>;
@@ -1,7 +0,0 @@
1
- import { ColorDepthEffect } from "postprocessing";
2
- import { wrapEffect } from "../util.js";
3
- const ColorDepth = wrapEffect(ColorDepthEffect);
4
- export {
5
- ColorDepth
6
- };
7
- //# sourceMappingURL=ColorDepth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ColorDepth.js","sources":["../../src/effects/ColorDepth.tsx"],"sourcesContent":["import { ColorDepthEffect } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const ColorDepth = wrapEffect(ColorDepthEffect)\n"],"names":[],"mappings":";;AAGa,MAAA,aAAa,WAAW,gBAAgB;"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const postprocessing = require("postprocessing");
4
- const util = require("../util.cjs");
5
- const Depth = util.wrapEffect(postprocessing.DepthEffect);
6
- exports.Depth = Depth;
7
- //# sourceMappingURL=Depth.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Depth.cjs","sources":["../../src/effects/Depth.tsx"],"sourcesContent":["import { DepthEffect } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const Depth = wrapEffect(DepthEffect)\n"],"names":["wrapEffect","DepthEffect"],"mappings":";;;;AAGa,MAAA,QAAQA,gBAAWC,eAAW,WAAA;;"}
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { DepthEffect } from 'postprocessing';
3
- export declare const Depth: import("react").ForwardRefExoticComponent<Omit<import("@react-three/fiber").ExtendedColors<import("@react-three/fiber").Overwrite<Partial<DepthEffect>, import("@react-three/fiber").NodeProps<DepthEffect, typeof DepthEffect>>> & {
4
- blendFunction?: import("postprocessing").BlendFunction | undefined;
5
- inverted?: boolean | undefined;
6
- } & {
7
- blendFunction?: import("postprocessing").BlendFunction | undefined;
8
- opacity?: number | undefined;
9
- }, "ref"> & import("react").RefAttributes<typeof DepthEffect>>;
@@ -1,7 +0,0 @@
1
- import { DepthEffect } from "postprocessing";
2
- import { wrapEffect } from "../util.js";
3
- const Depth = wrapEffect(DepthEffect);
4
- export {
5
- Depth
6
- };
7
- //# sourceMappingURL=Depth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Depth.js","sources":["../../src/effects/Depth.tsx"],"sourcesContent":["import { DepthEffect } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const Depth = wrapEffect(DepthEffect)\n"],"names":[],"mappings":";;AAGa,MAAA,QAAQ,WAAW,WAAW;"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const postprocessing = require("postprocessing");
5
- const React = require("react");
6
- const THREE = require("three");
7
- const EffectComposer = require("../EffectComposer.cjs");
8
- const DepthOfField = React.forwardRef(function DepthOfField2({
9
- blendFunction,
10
- worldFocusDistance,
11
- worldFocusRange,
12
- focusDistance,
13
- focusRange,
14
- focalLength,
15
- bokehScale,
16
- resolutionScale,
17
- resolutionX,
18
- resolutionY,
19
- width,
20
- height,
21
- target,
22
- depthTexture,
23
- ...props
24
- }, ref) {
25
- const { camera } = React.useContext(EffectComposer.EffectComposerContext);
26
- const autoFocus = target != null;
27
- const effect = React.useMemo(() => {
28
- const effect2 = new postprocessing.DepthOfFieldEffect(camera, {
29
- blendFunction,
30
- worldFocusDistance,
31
- worldFocusRange,
32
- focusDistance,
33
- focusRange,
34
- focalLength,
35
- bokehScale,
36
- resolutionScale,
37
- resolutionX,
38
- resolutionY,
39
- width,
40
- height
41
- });
42
- if (autoFocus)
43
- effect2.target = new THREE.Vector3();
44
- if (depthTexture)
45
- effect2.setDepthTexture(depthTexture.texture, depthTexture.packing);
46
- const maskPass = effect2.maskPass;
47
- maskPass.maskFunction = postprocessing.MaskFunction.MULTIPLY_RGB_SET_ALPHA;
48
- return effect2;
49
- }, [
50
- camera,
51
- blendFunction,
52
- worldFocusDistance,
53
- worldFocusRange,
54
- focusDistance,
55
- focusRange,
56
- focalLength,
57
- bokehScale,
58
- resolutionScale,
59
- resolutionX,
60
- resolutionY,
61
- width,
62
- height,
63
- autoFocus,
64
- depthTexture
65
- ]);
66
- React.useEffect(() => {
67
- return () => {
68
- effect.dispose();
69
- };
70
- }, [effect]);
71
- return /* @__PURE__ */ jsxRuntime.jsx("primitive", { ...props, ref, object: effect, target });
72
- });
73
- exports.DepthOfField = DepthOfField;
74
- //# sourceMappingURL=DepthOfField.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DepthOfField.cjs","sources":["../../src/effects/DepthOfField.tsx"],"sourcesContent":["import { DepthOfFieldEffect, MaskFunction } from 'postprocessing'\nimport { Ref, forwardRef, useMemo, useEffect, useContext } from 'react'\nimport { ReactThreeFiber } from '@react-three/fiber'\nimport { type DepthPackingStrategies, type Texture, Vector3 } from 'three'\nimport { EffectComposerContext } from '../EffectComposer'\n\ntype DOFProps = ConstructorParameters<typeof DepthOfFieldEffect>[1] &\n Partial<{\n target: ReactThreeFiber.Vector3\n depthTexture: {\n texture: Texture\n // TODO: narrow to DepthPackingStrategies\n packing: number\n }\n // TODO: not used\n blur: number\n }>\n\nexport const DepthOfField = forwardRef(function DepthOfField(\n {\n blendFunction,\n worldFocusDistance,\n worldFocusRange,\n focusDistance,\n focusRange,\n focalLength,\n bokehScale,\n resolutionScale,\n resolutionX,\n resolutionY,\n width,\n height,\n target,\n depthTexture,\n ...props\n }: DOFProps,\n ref: Ref<DepthOfFieldEffect>\n) {\n const { camera } = useContext(EffectComposerContext)\n const autoFocus = target != null\n const effect = useMemo(() => {\n const effect = new DepthOfFieldEffect(camera, {\n blendFunction,\n worldFocusDistance,\n worldFocusRange,\n focusDistance,\n focusRange,\n focalLength,\n bokehScale,\n resolutionScale,\n resolutionX,\n resolutionY,\n width,\n height,\n })\n // Creating a target enables autofocus, R3F will set via props\n if (autoFocus) effect.target = new Vector3()\n // Depth texture for depth picking with optional packing strategy\n if (depthTexture) effect.setDepthTexture(depthTexture.texture, depthTexture.packing as DepthPackingStrategies)\n // Temporary fix that restores DOF 6.21.3 behavior, everything since then lets shapes leak through the blur\n const maskPass = (effect as any).maskPass\n maskPass.maskFunction = MaskFunction.MULTIPLY_RGB_SET_ALPHA\n return effect\n }, [\n camera,\n blendFunction,\n worldFocusDistance,\n worldFocusRange,\n focusDistance,\n focusRange,\n focalLength,\n bokehScale,\n resolutionScale,\n resolutionX,\n resolutionY,\n width,\n height,\n autoFocus,\n depthTexture,\n ])\n\n useEffect(() => {\n return () => {\n effect.dispose()\n }\n }, [effect])\n\n return <primitive {...props} ref={ref} object={effect} target={target} />\n})\n"],"names":["forwardRef","DepthOfField","useContext","EffectComposerContext","useMemo","effect","DepthOfFieldEffect","Vector3","MaskFunction","useEffect"],"mappings":";;;;;;;AAkBa,MAAA,eAAeA,MAAAA,WAAW,SAASC,cAC9C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,EAAE,OAAA,IAAWC,MAAA,WAAWC,eAAqB,qBAAA;AACnD,QAAM,YAAY,UAAU;AACtB,QAAA,SAASC,MAAAA,QAAQ,MAAM;AACrBC,UAAAA,UAAS,IAAIC,eAAA,mBAAmB,QAAQ;AAAA,MAC5C;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA,CACD;AAEG,QAAA;AAAWD,cAAO,SAAS,IAAIE,MAAAA;AAE/B,QAAA;AAAcF,cAAO,gBAAgB,aAAa,SAAS,aAAa,OAAiC;AAE7G,UAAM,WAAYA,QAAe;AACjC,aAAS,eAAeG,eAAa,aAAA;AAC9BH,WAAAA;AAAAA,EAAA,GACN;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAEDI,QAAAA,UAAU,MAAM;AACd,WAAO,MAAM;AACX,aAAO,QAAQ;AAAA,IAAA;AAAA,EACjB,GACC,CAAC,MAAM,CAAC;AAEX,wCAAQ,aAAW,EAAA,GAAG,OAAO,KAAU,QAAQ,QAAQ,OAAgB,CAAA;AACzE,CAAC;;"}
@@ -1,25 +0,0 @@
1
- /// <reference types="react" />
2
- import { DepthOfFieldEffect } from 'postprocessing';
3
- import { ReactThreeFiber } from '@react-three/fiber';
4
- import { type Texture, Vector3 } from 'three';
5
- export declare const DepthOfField: import("react").ForwardRefExoticComponent<{
6
- blendFunction?: import("postprocessing").BlendFunction | undefined;
7
- worldFocusDistance?: number | undefined;
8
- worldFocusRange?: number | undefined;
9
- focusDistance?: number | undefined;
10
- focalLength?: number | undefined;
11
- focusRange?: number | undefined;
12
- bokehScale?: number | undefined;
13
- resolutionScale?: number | undefined;
14
- resolutionX?: number | undefined;
15
- resolutionY?: number | undefined;
16
- width?: number | undefined;
17
- height?: number | undefined;
18
- } & Partial<{
19
- target: ReactThreeFiber.Vector3;
20
- depthTexture: {
21
- texture: Texture;
22
- packing: number;
23
- };
24
- blur: number;
25
- }> & import("react").RefAttributes<DepthOfFieldEffect>>;
@@ -1,74 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { DepthOfFieldEffect, MaskFunction } from "postprocessing";
3
- import { forwardRef, useContext, useMemo, useEffect } from "react";
4
- import { Vector3 } from "three";
5
- import { EffectComposerContext } from "../EffectComposer.js";
6
- const DepthOfField = forwardRef(function DepthOfField2({
7
- blendFunction,
8
- worldFocusDistance,
9
- worldFocusRange,
10
- focusDistance,
11
- focusRange,
12
- focalLength,
13
- bokehScale,
14
- resolutionScale,
15
- resolutionX,
16
- resolutionY,
17
- width,
18
- height,
19
- target,
20
- depthTexture,
21
- ...props
22
- }, ref) {
23
- const { camera } = useContext(EffectComposerContext);
24
- const autoFocus = target != null;
25
- const effect = useMemo(() => {
26
- const effect2 = new DepthOfFieldEffect(camera, {
27
- blendFunction,
28
- worldFocusDistance,
29
- worldFocusRange,
30
- focusDistance,
31
- focusRange,
32
- focalLength,
33
- bokehScale,
34
- resolutionScale,
35
- resolutionX,
36
- resolutionY,
37
- width,
38
- height
39
- });
40
- if (autoFocus)
41
- effect2.target = new Vector3();
42
- if (depthTexture)
43
- effect2.setDepthTexture(depthTexture.texture, depthTexture.packing);
44
- const maskPass = effect2.maskPass;
45
- maskPass.maskFunction = MaskFunction.MULTIPLY_RGB_SET_ALPHA;
46
- return effect2;
47
- }, [
48
- camera,
49
- blendFunction,
50
- worldFocusDistance,
51
- worldFocusRange,
52
- focusDistance,
53
- focusRange,
54
- focalLength,
55
- bokehScale,
56
- resolutionScale,
57
- resolutionX,
58
- resolutionY,
59
- width,
60
- height,
61
- autoFocus,
62
- depthTexture
63
- ]);
64
- useEffect(() => {
65
- return () => {
66
- effect.dispose();
67
- };
68
- }, [effect]);
69
- return /* @__PURE__ */ jsx("primitive", { ...props, ref, object: effect, target });
70
- });
71
- export {
72
- DepthOfField
73
- };
74
- //# sourceMappingURL=DepthOfField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DepthOfField.js","sources":["../../src/effects/DepthOfField.tsx"],"sourcesContent":["import { DepthOfFieldEffect, MaskFunction } from 'postprocessing'\nimport { Ref, forwardRef, useMemo, useEffect, useContext } from 'react'\nimport { ReactThreeFiber } from '@react-three/fiber'\nimport { type DepthPackingStrategies, type Texture, Vector3 } from 'three'\nimport { EffectComposerContext } from '../EffectComposer'\n\ntype DOFProps = ConstructorParameters<typeof DepthOfFieldEffect>[1] &\n Partial<{\n target: ReactThreeFiber.Vector3\n depthTexture: {\n texture: Texture\n // TODO: narrow to DepthPackingStrategies\n packing: number\n }\n // TODO: not used\n blur: number\n }>\n\nexport const DepthOfField = forwardRef(function DepthOfField(\n {\n blendFunction,\n worldFocusDistance,\n worldFocusRange,\n focusDistance,\n focusRange,\n focalLength,\n bokehScale,\n resolutionScale,\n resolutionX,\n resolutionY,\n width,\n height,\n target,\n depthTexture,\n ...props\n }: DOFProps,\n ref: Ref<DepthOfFieldEffect>\n) {\n const { camera } = useContext(EffectComposerContext)\n const autoFocus = target != null\n const effect = useMemo(() => {\n const effect = new DepthOfFieldEffect(camera, {\n blendFunction,\n worldFocusDistance,\n worldFocusRange,\n focusDistance,\n focusRange,\n focalLength,\n bokehScale,\n resolutionScale,\n resolutionX,\n resolutionY,\n width,\n height,\n })\n // Creating a target enables autofocus, R3F will set via props\n if (autoFocus) effect.target = new Vector3()\n // Depth texture for depth picking with optional packing strategy\n if (depthTexture) effect.setDepthTexture(depthTexture.texture, depthTexture.packing as DepthPackingStrategies)\n // Temporary fix that restores DOF 6.21.3 behavior, everything since then lets shapes leak through the blur\n const maskPass = (effect as any).maskPass\n maskPass.maskFunction = MaskFunction.MULTIPLY_RGB_SET_ALPHA\n return effect\n }, [\n camera,\n blendFunction,\n worldFocusDistance,\n worldFocusRange,\n focusDistance,\n focusRange,\n focalLength,\n bokehScale,\n resolutionScale,\n resolutionX,\n resolutionY,\n width,\n height,\n autoFocus,\n depthTexture,\n ])\n\n useEffect(() => {\n return () => {\n effect.dispose()\n }\n }, [effect])\n\n return <primitive {...props} ref={ref} object={effect} target={target} />\n})\n"],"names":["DepthOfField","effect"],"mappings":";;;;;AAkBa,MAAA,eAAe,WAAW,SAASA,cAC9C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,EAAE,OAAA,IAAW,WAAW,qBAAqB;AACnD,QAAM,YAAY,UAAU;AACtB,QAAA,SAAS,QAAQ,MAAM;AACrBC,UAAAA,UAAS,IAAI,mBAAmB,QAAQ;AAAA,MAC5C;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA,CACD;AAEG,QAAA;AAAWA,cAAO,SAAS,IAAI;AAE/B,QAAA;AAAcA,cAAO,gBAAgB,aAAa,SAAS,aAAa,OAAiC;AAE7G,UAAM,WAAYA,QAAe;AACjC,aAAS,eAAe,aAAa;AAC9BA,WAAAA;AAAAA,EAAA,GACN;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAED,YAAU,MAAM;AACd,WAAO,MAAM;AACX,aAAO,QAAQ;AAAA,IAAA;AAAA,EACjB,GACC,CAAC,MAAM,CAAC;AAEX,6BAAQ,aAAW,EAAA,GAAG,OAAO,KAAU,QAAQ,QAAQ,OAAgB,CAAA;AACzE,CAAC;"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const postprocessing = require("postprocessing");
4
- const util = require("../util.cjs");
5
- const DotScreen = util.wrapEffect(postprocessing.DotScreenEffect);
6
- exports.DotScreen = DotScreen;
7
- //# sourceMappingURL=DotScreen.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DotScreen.cjs","sources":["../../src/effects/DotScreen.tsx"],"sourcesContent":["import { DotScreenEffect } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const DotScreen = wrapEffect(DotScreenEffect)\n"],"names":["wrapEffect","DotScreenEffect"],"mappings":";;;;AAGa,MAAA,YAAYA,gBAAWC,eAAe,eAAA;;"}
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { DotScreenEffect } from 'postprocessing';
3
- export declare const DotScreen: import("react").ForwardRefExoticComponent<Omit<import("@react-three/fiber").ExtendedColors<import("@react-three/fiber").Overwrite<Partial<DotScreenEffect>, import("@react-three/fiber").NodeProps<DotScreenEffect, typeof DotScreenEffect>>> & {
4
- blendFunction?: import("postprocessing").BlendFunction | undefined;
5
- angle?: number | undefined;
6
- scale?: number | undefined;
7
- } & {
8
- blendFunction?: import("postprocessing").BlendFunction | undefined;
9
- opacity?: number | undefined;
10
- }, "ref"> & import("react").RefAttributes<typeof DotScreenEffect>>;
@@ -1,7 +0,0 @@
1
- import { DotScreenEffect } from "postprocessing";
2
- import { wrapEffect } from "../util.js";
3
- const DotScreen = wrapEffect(DotScreenEffect);
4
- export {
5
- DotScreen
6
- };
7
- //# sourceMappingURL=DotScreen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DotScreen.js","sources":["../../src/effects/DotScreen.tsx"],"sourcesContent":["import { DotScreenEffect } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const DotScreen = wrapEffect(DotScreenEffect)\n"],"names":[],"mappings":";;AAGa,MAAA,YAAY,WAAW,eAAe;"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const postprocessing = require("postprocessing");
4
- const util = require("../util.cjs");
5
- const FXAA = util.wrapEffect(postprocessing.FXAAEffect);
6
- exports.FXAA = FXAA;
7
- //# sourceMappingURL=FXAA.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FXAA.cjs","sources":["../../src/effects/FXAA.tsx"],"sourcesContent":["import { FXAAEffect } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const FXAA = wrapEffect(FXAAEffect)\n"],"names":["wrapEffect","FXAAEffect"],"mappings":";;;;AAGa,MAAA,OAAOA,gBAAWC,eAAU,UAAA;;"}
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { FXAAEffect } from 'postprocessing';
3
- export declare const FXAA: import("react").ForwardRefExoticComponent<Omit<import("@react-three/fiber").ExtendedColors<import("@react-three/fiber").Overwrite<Partial<FXAAEffect>, import("@react-three/fiber").NodeProps<FXAAEffect, typeof FXAAEffect>>> & {
4
- blendFunction?: import("postprocessing").BlendFunction | undefined;
5
- } & {
6
- blendFunction?: import("postprocessing").BlendFunction | undefined;
7
- opacity?: number | undefined;
8
- }, "ref"> & import("react").RefAttributes<typeof FXAAEffect>>;
@@ -1,7 +0,0 @@
1
- import { FXAAEffect } from "postprocessing";
2
- import { wrapEffect } from "../util.js";
3
- const FXAA = wrapEffect(FXAAEffect);
4
- export {
5
- FXAA
6
- };
7
- //# sourceMappingURL=FXAA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FXAA.js","sources":["../../src/effects/FXAA.tsx"],"sourcesContent":["import { FXAAEffect } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const FXAA = wrapEffect(FXAAEffect)\n"],"names":[],"mappings":";;AAGa,MAAA,OAAO,WAAW,UAAU;"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const postprocessing = require("postprocessing");
5
- const React = require("react");
6
- const fiber = require("@react-three/fiber");
7
- const util = require("../util.cjs");
8
- const Glitch = React.forwardRef(function Glitch2({ active = true, ...props }, ref) {
9
- const invalidate = fiber.useThree((state) => state.invalidate);
10
- const delay = util.useVector2(props, "delay");
11
- const duration = util.useVector2(props, "duration");
12
- const strength = util.useVector2(props, "strength");
13
- const chromaticAberrationOffset = util.useVector2(props, "chromaticAberrationOffset");
14
- const effect = React.useMemo(
15
- () => new postprocessing.GlitchEffect({ ...props, delay, duration, strength, chromaticAberrationOffset }),
16
- [delay, duration, props, strength, chromaticAberrationOffset]
17
- );
18
- React.useLayoutEffect(() => {
19
- effect.mode = active ? props.mode || postprocessing.GlitchMode.SPORADIC : postprocessing.GlitchMode.DISABLED;
20
- invalidate();
21
- }, [active, effect, invalidate, props.mode]);
22
- React.useEffect(() => {
23
- return () => {
24
- var _a;
25
- (_a = effect.dispose) == null ? void 0 : _a.call(effect);
26
- };
27
- }, [effect]);
28
- return /* @__PURE__ */ jsxRuntime.jsx("primitive", { ref, object: effect, dispose: null });
29
- });
30
- exports.Glitch = Glitch;
31
- //# sourceMappingURL=Glitch.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Glitch.cjs","sources":["../../src/effects/Glitch.tsx"],"sourcesContent":["import { Vector2 } from 'three'\nimport { GlitchEffect, GlitchMode } from 'postprocessing'\nimport { Ref, forwardRef, useMemo, useLayoutEffect, useEffect } from 'react'\nimport { ReactThreeFiber, useThree } from '@react-three/fiber'\nimport { useVector2 } from '../util'\n\nexport type GlitchProps = ConstructorParameters<typeof GlitchEffect>[0] &\n Partial<{\n mode: GlitchMode\n active: boolean\n delay: ReactThreeFiber.Vector2\n duration: ReactThreeFiber.Vector2\n chromaticAberrationOffset: ReactThreeFiber.Vector2\n strength: ReactThreeFiber.Vector2\n }>\n\nexport const Glitch = forwardRef<GlitchEffect, GlitchProps>(function Glitch(\n { active = true, ...props }: GlitchProps,\n ref: Ref<GlitchEffect>\n) {\n const invalidate = useThree((state) => state.invalidate)\n const delay = useVector2(props, 'delay')\n const duration = useVector2(props, 'duration')\n const strength = useVector2(props, 'strength')\n const chromaticAberrationOffset = useVector2(props, 'chromaticAberrationOffset')\n const effect = useMemo(\n () => new GlitchEffect({ ...props, delay, duration, strength, chromaticAberrationOffset }),\n [delay, duration, props, strength, chromaticAberrationOffset]\n )\n useLayoutEffect(() => {\n effect.mode = active ? props.mode || GlitchMode.SPORADIC : GlitchMode.DISABLED\n invalidate()\n }, [active, effect, invalidate, props.mode])\n useEffect(() => {\n return () => {\n effect.dispose?.()\n }\n }, [effect])\n return <primitive ref={ref} object={effect} dispose={null} />\n})\n"],"names":["forwardRef","Glitch","useThree","useVector2","useMemo","GlitchEffect","useLayoutEffect","GlitchMode","useEffect"],"mappings":";;;;;;;AAgBa,MAAA,SAASA,MAAAA,WAAsC,SAASC,QACnE,EAAE,SAAS,MAAM,GAAG,MAAM,GAC1B,KACA;AACA,QAAM,aAAaC,MAAAA,SAAS,CAAC,UAAU,MAAM,UAAU;AACjD,QAAA,QAAQC,KAAAA,WAAW,OAAO,OAAO;AACjC,QAAA,WAAWA,KAAAA,WAAW,OAAO,UAAU;AACvC,QAAA,WAAWA,KAAAA,WAAW,OAAO,UAAU;AACvC,QAAA,4BAA4BA,KAAAA,WAAW,OAAO,2BAA2B;AAC/E,QAAM,SAASC,MAAA;AAAA,IACb,MAAM,IAAIC,eAAAA,aAAa,EAAE,GAAG,OAAO,OAAO,UAAU,UAAU,2BAA2B;AAAA,IACzF,CAAC,OAAO,UAAU,OAAO,UAAU,yBAAyB;AAAA,EAAA;AAE9DC,QAAAA,gBAAgB,MAAM;AACpB,WAAO,OAAO,SAAS,MAAM,QAAQC,0BAAW,WAAWA,eAAW,WAAA;AAC3D;EAAA,GACV,CAAC,QAAQ,QAAQ,YAAY,MAAM,IAAI,CAAC;AAC3CC,QAAAA,UAAU,MAAM;AACd,WAAO,MAAM;;AACX,mBAAO,YAAP;AAAA,IAAiB;AAAA,EACnB,GACC,CAAC,MAAM,CAAC;AACX,wCAAQ,aAAU,EAAA,KAAU,QAAQ,QAAQ,SAAS,KAAM,CAAA;AAC7D,CAAC;;"}
@@ -1,30 +0,0 @@
1
- /// <reference types="react" />
2
- import { Vector2 } from 'three';
3
- import { GlitchEffect, GlitchMode } from 'postprocessing';
4
- import { ReactThreeFiber } from '@react-three/fiber';
5
- export type GlitchProps = ConstructorParameters<typeof GlitchEffect>[0] & Partial<{
6
- mode: GlitchMode;
7
- active: boolean;
8
- delay: ReactThreeFiber.Vector2;
9
- duration: ReactThreeFiber.Vector2;
10
- chromaticAberrationOffset: ReactThreeFiber.Vector2;
11
- strength: ReactThreeFiber.Vector2;
12
- }>;
13
- export declare const Glitch: import("react").ForwardRefExoticComponent<{
14
- blendFunction?: import("postprocessing").BlendFunction | undefined;
15
- chromaticAberrationOffset?: Vector2 | undefined;
16
- delay?: Vector2 | undefined;
17
- duration?: Vector2 | undefined;
18
- strength?: Vector2 | undefined;
19
- perturbationMap?: import("three").Texture | undefined;
20
- dtSize?: number | undefined;
21
- columns?: number | undefined;
22
- ratio?: number | undefined;
23
- } & Partial<{
24
- mode: GlitchMode;
25
- active: boolean;
26
- delay: ReactThreeFiber.Vector2;
27
- duration: ReactThreeFiber.Vector2;
28
- chromaticAberrationOffset: ReactThreeFiber.Vector2;
29
- strength: ReactThreeFiber.Vector2;
30
- }> & import("react").RefAttributes<GlitchEffect>>;
@@ -1,31 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { GlitchEffect, GlitchMode } from "postprocessing";
3
- import { forwardRef, useMemo, useLayoutEffect, useEffect } from "react";
4
- import { useThree } from "@react-three/fiber";
5
- import { useVector2 } from "../util.js";
6
- const Glitch = forwardRef(function Glitch2({ active = true, ...props }, ref) {
7
- const invalidate = useThree((state) => state.invalidate);
8
- const delay = useVector2(props, "delay");
9
- const duration = useVector2(props, "duration");
10
- const strength = useVector2(props, "strength");
11
- const chromaticAberrationOffset = useVector2(props, "chromaticAberrationOffset");
12
- const effect = useMemo(
13
- () => new GlitchEffect({ ...props, delay, duration, strength, chromaticAberrationOffset }),
14
- [delay, duration, props, strength, chromaticAberrationOffset]
15
- );
16
- useLayoutEffect(() => {
17
- effect.mode = active ? props.mode || GlitchMode.SPORADIC : GlitchMode.DISABLED;
18
- invalidate();
19
- }, [active, effect, invalidate, props.mode]);
20
- useEffect(() => {
21
- return () => {
22
- var _a;
23
- (_a = effect.dispose) == null ? void 0 : _a.call(effect);
24
- };
25
- }, [effect]);
26
- return /* @__PURE__ */ jsx("primitive", { ref, object: effect, dispose: null });
27
- });
28
- export {
29
- Glitch
30
- };
31
- //# sourceMappingURL=Glitch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Glitch.js","sources":["../../src/effects/Glitch.tsx"],"sourcesContent":["import { Vector2 } from 'three'\nimport { GlitchEffect, GlitchMode } from 'postprocessing'\nimport { Ref, forwardRef, useMemo, useLayoutEffect, useEffect } from 'react'\nimport { ReactThreeFiber, useThree } from '@react-three/fiber'\nimport { useVector2 } from '../util'\n\nexport type GlitchProps = ConstructorParameters<typeof GlitchEffect>[0] &\n Partial<{\n mode: GlitchMode\n active: boolean\n delay: ReactThreeFiber.Vector2\n duration: ReactThreeFiber.Vector2\n chromaticAberrationOffset: ReactThreeFiber.Vector2\n strength: ReactThreeFiber.Vector2\n }>\n\nexport const Glitch = forwardRef<GlitchEffect, GlitchProps>(function Glitch(\n { active = true, ...props }: GlitchProps,\n ref: Ref<GlitchEffect>\n) {\n const invalidate = useThree((state) => state.invalidate)\n const delay = useVector2(props, 'delay')\n const duration = useVector2(props, 'duration')\n const strength = useVector2(props, 'strength')\n const chromaticAberrationOffset = useVector2(props, 'chromaticAberrationOffset')\n const effect = useMemo(\n () => new GlitchEffect({ ...props, delay, duration, strength, chromaticAberrationOffset }),\n [delay, duration, props, strength, chromaticAberrationOffset]\n )\n useLayoutEffect(() => {\n effect.mode = active ? props.mode || GlitchMode.SPORADIC : GlitchMode.DISABLED\n invalidate()\n }, [active, effect, invalidate, props.mode])\n useEffect(() => {\n return () => {\n effect.dispose?.()\n }\n }, [effect])\n return <primitive ref={ref} object={effect} dispose={null} />\n})\n"],"names":["Glitch"],"mappings":";;;;;AAgBa,MAAA,SAAS,WAAsC,SAASA,QACnE,EAAE,SAAS,MAAM,GAAG,MAAM,GAC1B,KACA;AACA,QAAM,aAAa,SAAS,CAAC,UAAU,MAAM,UAAU;AACjD,QAAA,QAAQ,WAAW,OAAO,OAAO;AACjC,QAAA,WAAW,WAAW,OAAO,UAAU;AACvC,QAAA,WAAW,WAAW,OAAO,UAAU;AACvC,QAAA,4BAA4B,WAAW,OAAO,2BAA2B;AAC/E,QAAM,SAAS;AAAA,IACb,MAAM,IAAI,aAAa,EAAE,GAAG,OAAO,OAAO,UAAU,UAAU,2BAA2B;AAAA,IACzF,CAAC,OAAO,UAAU,OAAO,UAAU,yBAAyB;AAAA,EAAA;AAE9D,kBAAgB,MAAM;AACpB,WAAO,OAAO,SAAS,MAAM,QAAQ,WAAW,WAAW,WAAW;AAC3D;EAAA,GACV,CAAC,QAAQ,QAAQ,YAAY,MAAM,IAAI,CAAC;AAC3C,YAAU,MAAM;AACd,WAAO,MAAM;;AACX,mBAAO,YAAP;AAAA,IAAiB;AAAA,EACnB,GACC,CAAC,MAAM,CAAC;AACX,6BAAQ,aAAU,EAAA,KAAU,QAAQ,QAAQ,SAAS,KAAM,CAAA;AAC7D,CAAC;"}
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const postprocessing = require("postprocessing");
5
- const React = require("react");
6
- const EffectComposer = require("../EffectComposer.cjs");
7
- const util = require("../util.cjs");
8
- const GodRays = React.forwardRef(function GodRays2(props, ref) {
9
- const { camera } = React.useContext(EffectComposer.EffectComposerContext);
10
- const effect = React.useMemo(() => new postprocessing.GodRaysEffect(camera, util.resolveRef(props.sun), props), [camera, props]);
11
- React.useLayoutEffect(() => void (effect.lightSource = util.resolveRef(props.sun)), [effect, props.sun]);
12
- return /* @__PURE__ */ jsxRuntime.jsx("primitive", { ref, object: effect, dispose: null });
13
- });
14
- exports.GodRays = GodRays;
15
- //# sourceMappingURL=GodRays.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GodRays.cjs","sources":["../../src/effects/GodRays.tsx"],"sourcesContent":["import { GodRaysEffect } from 'postprocessing'\nimport React, { Ref, forwardRef, useMemo, useContext, useLayoutEffect } from 'react'\nimport { Mesh, Points } from 'three'\nimport { EffectComposerContext } from '../EffectComposer'\nimport { resolveRef } from '../util'\n\ntype GodRaysProps = ConstructorParameters<typeof GodRaysEffect>[2] & {\n sun: Mesh | Points | React.MutableRefObject<Mesh | Points>\n}\n\nexport const GodRays = forwardRef(function GodRays(props: GodRaysProps, ref: Ref<GodRaysEffect>) {\n const { camera } = useContext(EffectComposerContext)\n const effect = useMemo(() => new GodRaysEffect(camera, resolveRef(props.sun), props), [camera, props])\n // @ts-ignore v6.30.2 https://github.com/pmndrs/postprocessing/pull/470/commits/091ef6f9516ca02efa7576305afbecf1ce8323ae\n useLayoutEffect(() => void (effect.lightSource = resolveRef(props.sun)), [effect, props.sun])\n return <primitive ref={ref} object={effect} dispose={null} />\n})\n"],"names":["forwardRef","GodRays","useContext","EffectComposerContext","useMemo","GodRaysEffect","resolveRef","useLayoutEffect"],"mappings":";;;;;;;AAUO,MAAM,UAAUA,MAAAA,WAAW,SAASC,SAAQ,OAAqB,KAAyB;AAC/F,QAAM,EAAE,OAAA,IAAWC,MAAA,WAAWC,eAAqB,qBAAA;AACnD,QAAM,SAASC,MAAA,QAAQ,MAAM,IAAIC,6BAAc,QAAQC,KAAA,WAAW,MAAM,GAAG,GAAG,KAAK,GAAG,CAAC,QAAQ,KAAK,CAAC;AAErGC,QAAAA,gBAAgB,MAAM,MAAM,OAAO,cAAcD,KAAW,WAAA,MAAM,GAAG,IAAI,CAAC,QAAQ,MAAM,GAAG,CAAC;AAC5F,wCAAQ,aAAU,EAAA,KAAU,QAAQ,QAAQ,SAAS,KAAM,CAAA;AAC7D,CAAC;;"}
@@ -1,21 +0,0 @@
1
- import { GodRaysEffect } from 'postprocessing';
2
- import React from 'react';
3
- import { Mesh, Points } from 'three';
4
- export declare const GodRays: React.ForwardRefExoticComponent<{
5
- blendFunction?: import("postprocessing").BlendFunction | undefined;
6
- samples?: number | undefined;
7
- density?: number | undefined;
8
- decay?: number | undefined;
9
- weight?: number | undefined;
10
- exposure?: number | undefined;
11
- clampMax?: number | undefined;
12
- resolutionScale?: number | undefined;
13
- resolutionX?: number | undefined;
14
- resolutionY?: number | undefined;
15
- width?: number | undefined;
16
- height?: number | undefined;
17
- kernelSize?: import("postprocessing").KernelSize | undefined;
18
- blur?: boolean | undefined;
19
- } & {
20
- sun: Mesh | Points | React.MutableRefObject<Mesh | Points>;
21
- } & React.RefAttributes<GodRaysEffect>>;
@@ -1,15 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { GodRaysEffect } from "postprocessing";
3
- import { forwardRef, useContext, useMemo, useLayoutEffect } from "react";
4
- import { EffectComposerContext } from "../EffectComposer.js";
5
- import { resolveRef } from "../util.js";
6
- const GodRays = forwardRef(function GodRays2(props, ref) {
7
- const { camera } = useContext(EffectComposerContext);
8
- const effect = useMemo(() => new GodRaysEffect(camera, resolveRef(props.sun), props), [camera, props]);
9
- useLayoutEffect(() => void (effect.lightSource = resolveRef(props.sun)), [effect, props.sun]);
10
- return /* @__PURE__ */ jsx("primitive", { ref, object: effect, dispose: null });
11
- });
12
- export {
13
- GodRays
14
- };
15
- //# sourceMappingURL=GodRays.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GodRays.js","sources":["../../src/effects/GodRays.tsx"],"sourcesContent":["import { GodRaysEffect } from 'postprocessing'\nimport React, { Ref, forwardRef, useMemo, useContext, useLayoutEffect } from 'react'\nimport { Mesh, Points } from 'three'\nimport { EffectComposerContext } from '../EffectComposer'\nimport { resolveRef } from '../util'\n\ntype GodRaysProps = ConstructorParameters<typeof GodRaysEffect>[2] & {\n sun: Mesh | Points | React.MutableRefObject<Mesh | Points>\n}\n\nexport const GodRays = forwardRef(function GodRays(props: GodRaysProps, ref: Ref<GodRaysEffect>) {\n const { camera } = useContext(EffectComposerContext)\n const effect = useMemo(() => new GodRaysEffect(camera, resolveRef(props.sun), props), [camera, props])\n // @ts-ignore v6.30.2 https://github.com/pmndrs/postprocessing/pull/470/commits/091ef6f9516ca02efa7576305afbecf1ce8323ae\n useLayoutEffect(() => void (effect.lightSource = resolveRef(props.sun)), [effect, props.sun])\n return <primitive ref={ref} object={effect} dispose={null} />\n})\n"],"names":["GodRays"],"mappings":";;;;;AAUO,MAAM,UAAU,WAAW,SAASA,SAAQ,OAAqB,KAAyB;AAC/F,QAAM,EAAE,OAAA,IAAW,WAAW,qBAAqB;AACnD,QAAM,SAAS,QAAQ,MAAM,IAAI,cAAc,QAAQ,WAAW,MAAM,GAAG,GAAG,KAAK,GAAG,CAAC,QAAQ,KAAK,CAAC;AAErG,kBAAgB,MAAM,MAAM,OAAO,cAAc,WAAW,MAAM,GAAG,IAAI,CAAC,QAAQ,MAAM,GAAG,CAAC;AAC5F,6BAAQ,aAAU,EAAA,KAAU,QAAQ,QAAQ,SAAS,KAAM,CAAA;AAC7D,CAAC;"}