@react-three/postprocessing 2.15.0 → 2.15.2

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 (157) hide show
  1. package/dist/EffectComposer.cjs +126 -0
  2. package/dist/EffectComposer.cjs.map +1 -0
  3. package/dist/EffectComposer.js +126 -0
  4. package/dist/EffectComposer.js.map +1 -0
  5. package/dist/Selection.cjs +36 -0
  6. package/dist/Selection.cjs.map +1 -0
  7. package/dist/Selection.js +36 -0
  8. package/dist/Selection.js.map +1 -0
  9. package/dist/effects/ASCII.cjs +105 -0
  10. package/dist/effects/ASCII.cjs.map +1 -0
  11. package/dist/effects/ASCII.js +105 -0
  12. package/dist/effects/ASCII.js.map +1 -0
  13. package/dist/effects/Autofocus.cjs +126 -0
  14. package/dist/effects/Autofocus.cjs.map +1 -0
  15. package/dist/effects/Autofocus.js +109 -0
  16. package/dist/effects/Autofocus.js.map +1 -0
  17. package/dist/effects/Bloom.cjs +9 -0
  18. package/dist/effects/Bloom.cjs.map +1 -0
  19. package/dist/effects/Bloom.js +9 -0
  20. package/dist/effects/Bloom.js.map +1 -0
  21. package/dist/effects/BrightnessContrast.cjs +7 -0
  22. package/dist/effects/BrightnessContrast.cjs.map +1 -0
  23. package/dist/effects/BrightnessContrast.js +7 -0
  24. package/dist/effects/BrightnessContrast.js.map +1 -0
  25. package/dist/effects/ChromaticAberration.cjs +7 -0
  26. package/dist/effects/ChromaticAberration.cjs.map +1 -0
  27. package/dist/effects/ChromaticAberration.js +7 -0
  28. package/dist/effects/ChromaticAberration.js.map +1 -0
  29. package/dist/effects/ColorAverage.cjs +11 -0
  30. package/dist/effects/ColorAverage.cjs.map +1 -0
  31. package/dist/effects/ColorAverage.js +11 -0
  32. package/dist/effects/ColorAverage.js.map +1 -0
  33. package/dist/effects/ColorDepth.cjs +7 -0
  34. package/dist/effects/ColorDepth.cjs.map +1 -0
  35. package/dist/effects/ColorDepth.js +7 -0
  36. package/dist/effects/ColorDepth.js.map +1 -0
  37. package/dist/effects/Depth.cjs +7 -0
  38. package/dist/effects/Depth.cjs.map +1 -0
  39. package/dist/effects/Depth.js +7 -0
  40. package/dist/effects/Depth.js.map +1 -0
  41. package/dist/effects/DepthOfField.cjs +74 -0
  42. package/dist/effects/DepthOfField.cjs.map +1 -0
  43. package/dist/effects/DepthOfField.js +74 -0
  44. package/dist/effects/DepthOfField.js.map +1 -0
  45. package/dist/effects/DotScreen.cjs +7 -0
  46. package/dist/effects/DotScreen.cjs.map +1 -0
  47. package/dist/effects/DotScreen.js +7 -0
  48. package/dist/effects/DotScreen.js.map +1 -0
  49. package/dist/effects/FXAA.cjs +7 -0
  50. package/dist/effects/FXAA.cjs.map +1 -0
  51. package/dist/effects/FXAA.js +7 -0
  52. package/dist/effects/FXAA.js.map +1 -0
  53. package/dist/effects/Glitch.cjs +30 -0
  54. package/dist/effects/Glitch.cjs.map +1 -0
  55. package/dist/effects/Glitch.js +30 -0
  56. package/dist/effects/Glitch.js.map +1 -0
  57. package/dist/effects/GodRays.cjs +15 -0
  58. package/dist/effects/GodRays.cjs.map +1 -0
  59. package/dist/effects/GodRays.js +15 -0
  60. package/dist/effects/GodRays.js.map +1 -0
  61. package/dist/effects/Grid.cjs +18 -0
  62. package/dist/effects/Grid.cjs.map +1 -0
  63. package/dist/effects/Grid.js +18 -0
  64. package/dist/effects/Grid.js.map +1 -0
  65. package/dist/effects/HueSaturation.cjs +7 -0
  66. package/dist/effects/HueSaturation.cjs.map +1 -0
  67. package/dist/effects/HueSaturation.js +7 -0
  68. package/dist/effects/HueSaturation.js.map +1 -0
  69. package/dist/effects/LUT.cjs +20 -0
  70. package/dist/effects/LUT.cjs.map +1 -0
  71. package/dist/effects/LUT.js +20 -0
  72. package/dist/effects/LUT.js.map +1 -0
  73. package/dist/effects/LensFlare.cjs +189 -0
  74. package/dist/effects/LensFlare.cjs.map +1 -0
  75. package/dist/effects/LensFlare.js +172 -0
  76. package/dist/effects/LensFlare.js.map +1 -0
  77. package/dist/effects/N8AO.cjs +59 -0
  78. package/dist/effects/N8AO.cjs.map +1 -0
  79. package/dist/effects/N8AO.js +59 -0
  80. package/dist/effects/N8AO.js.map +1 -0
  81. package/dist/effects/Noise.cjs +7 -0
  82. package/dist/effects/Noise.cjs.map +1 -0
  83. package/dist/effects/Noise.js +7 -0
  84. package/dist/effects/Noise.js.map +1 -0
  85. package/dist/effects/Outline.cjs +93 -0
  86. package/dist/effects/Outline.cjs.map +1 -0
  87. package/dist/effects/Outline.js +93 -0
  88. package/dist/effects/Outline.js.map +1 -0
  89. package/dist/effects/Pixelation.cjs +11 -0
  90. package/dist/effects/Pixelation.cjs.map +1 -0
  91. package/dist/effects/Pixelation.js +11 -0
  92. package/dist/effects/Pixelation.js.map +1 -0
  93. package/dist/effects/SMAA.cjs +7 -0
  94. package/dist/effects/SMAA.cjs.map +1 -0
  95. package/dist/effects/SMAA.js +7 -0
  96. package/dist/effects/SMAA.js.map +1 -0
  97. package/dist/effects/SSAO.cjs +37 -0
  98. package/dist/effects/SSAO.cjs.map +1 -0
  99. package/dist/effects/SSAO.js +37 -0
  100. package/dist/effects/SSAO.js.map +1 -0
  101. package/dist/effects/SSR/index.cjs +33 -0
  102. package/dist/effects/SSR/index.cjs.map +1 -0
  103. package/dist/effects/SSR/index.js +33 -0
  104. package/dist/effects/SSR/index.js.map +1 -0
  105. package/dist/effects/SSR/screen-space-reflections.cjs +1133 -0
  106. package/dist/effects/SSR/screen-space-reflections.cjs.map +1 -0
  107. package/dist/effects/SSR/screen-space-reflections.js +1133 -0
  108. package/dist/effects/SSR/screen-space-reflections.js.map +1 -0
  109. package/dist/effects/ScanlineEffect.cjs +7 -0
  110. package/dist/effects/ScanlineEffect.cjs.map +1 -0
  111. package/dist/effects/ScanlineEffect.js +7 -0
  112. package/dist/effects/ScanlineEffect.js.map +1 -0
  113. package/dist/effects/SelectiveBloom.cjs +87 -0
  114. package/dist/effects/SelectiveBloom.cjs.map +1 -0
  115. package/dist/effects/SelectiveBloom.js +87 -0
  116. package/dist/effects/SelectiveBloom.js.map +1 -0
  117. package/dist/effects/Sepia.cjs +7 -0
  118. package/dist/effects/Sepia.cjs.map +1 -0
  119. package/dist/effects/Sepia.js +7 -0
  120. package/dist/effects/Sepia.js.map +1 -0
  121. package/dist/effects/ShockWave.cjs +7 -0
  122. package/dist/effects/ShockWave.cjs.map +1 -0
  123. package/dist/effects/ShockWave.js +7 -0
  124. package/dist/effects/ShockWave.js.map +1 -0
  125. package/dist/effects/Texture.cjs +18 -0
  126. package/dist/effects/Texture.cjs.map +1 -0
  127. package/dist/effects/Texture.js +18 -0
  128. package/dist/effects/Texture.js.map +1 -0
  129. package/dist/effects/TiltShift.cjs +7 -0
  130. package/dist/effects/TiltShift.cjs.map +1 -0
  131. package/dist/effects/TiltShift.js +7 -0
  132. package/dist/effects/TiltShift.js.map +1 -0
  133. package/dist/effects/TiltShift2.cjs +98 -0
  134. package/dist/effects/TiltShift2.cjs.map +1 -0
  135. package/dist/effects/TiltShift2.js +98 -0
  136. package/dist/effects/TiltShift2.js.map +1 -0
  137. package/dist/effects/ToneMapping.cjs +7 -0
  138. package/dist/effects/ToneMapping.cjs.map +1 -0
  139. package/dist/effects/ToneMapping.js +7 -0
  140. package/dist/effects/ToneMapping.js.map +1 -0
  141. package/dist/effects/Vignette.cjs +7 -0
  142. package/dist/effects/Vignette.cjs.map +1 -0
  143. package/dist/effects/Vignette.js +7 -0
  144. package/dist/effects/Vignette.js.map +1 -0
  145. package/dist/index.cjs +79 -3616
  146. package/dist/index.cjs.map +1 -1
  147. package/dist/index.js +36 -3557
  148. package/dist/index.js.map +1 -1
  149. package/dist/node_modules/n8ao/dist/N8AO.cjs +1439 -0
  150. package/dist/node_modules/n8ao/dist/N8AO.cjs.map +1 -0
  151. package/dist/node_modules/n8ao/dist/N8AO.js +1439 -0
  152. package/dist/node_modules/n8ao/dist/N8AO.js.map +1 -0
  153. package/dist/util.cjs +69 -0
  154. package/dist/util.cjs.map +1 -0
  155. package/dist/util.js +52 -0
  156. package/dist/util.js.map +1 -0
  157. package/package.json +1 -1
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const THREE = require("three");
5
+ const React = require("react");
6
+ const fiber = require("@react-three/fiber");
7
+ const postprocessing = require("postprocessing");
8
+ const maath = require("maath");
9
+ const DepthOfField = require("./DepthOfField.cjs");
10
+ const EffectComposer = require("../EffectComposer.cjs");
11
+ function _interopNamespaceDefault(e) {
12
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
13
+ if (e) {
14
+ for (const k in e) {
15
+ if (k !== "default") {
16
+ const d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: () => e[k]
20
+ });
21
+ }
22
+ }
23
+ }
24
+ n.default = e;
25
+ return Object.freeze(n);
26
+ }
27
+ const THREE__namespace = /* @__PURE__ */ _interopNamespaceDefault(THREE);
28
+ const Autofocus = React.forwardRef(
29
+ ({ target = void 0, mouse: followMouse = false, debug = void 0, manual = false, smoothTime = 0.25, ...props }, fref) => {
30
+ const dofRef = React.useRef(null);
31
+ const hitpointRef = React.useRef(null);
32
+ const targetRef = React.useRef(null);
33
+ const scene = fiber.useThree(({ scene: scene2 }) => scene2);
34
+ const pointer = fiber.useThree(({ pointer: pointer2 }) => pointer2);
35
+ const { composer, camera } = React.useContext(EffectComposer.EffectComposerContext);
36
+ const [depthPickingPass] = React.useState(() => new postprocessing.DepthPickingPass());
37
+ const [copyPass] = React.useState(() => new postprocessing.CopyPass());
38
+ React.useEffect(() => {
39
+ composer.addPass(depthPickingPass);
40
+ composer.addPass(copyPass);
41
+ return () => {
42
+ composer.removePass(depthPickingPass);
43
+ composer.removePass(copyPass);
44
+ };
45
+ }, [composer, depthPickingPass, copyPass]);
46
+ React.useEffect(() => {
47
+ return () => {
48
+ depthPickingPass.dispose();
49
+ copyPass.dispose();
50
+ };
51
+ }, [depthPickingPass, copyPass]);
52
+ const [hitpoint] = React.useState(() => new THREE__namespace.Vector3(0, 0, 0));
53
+ const [ndc] = React.useState(() => new THREE__namespace.Vector3(0, 0, 0));
54
+ const getHit = React.useCallback(
55
+ async (x, y) => {
56
+ ndc.x = x;
57
+ ndc.y = y;
58
+ ndc.z = await depthPickingPass.readDepth(ndc);
59
+ ndc.z = ndc.z * 2 - 1;
60
+ const hit = 1 - ndc.z > 1e-7;
61
+ return hit ? ndc.unproject(camera) : false;
62
+ },
63
+ [ndc, depthPickingPass, camera]
64
+ );
65
+ const update = React.useCallback(
66
+ async (delta, updateTarget = true) => {
67
+ var _a;
68
+ if (target) {
69
+ hitpoint.set(...target);
70
+ } else {
71
+ const { x, y } = followMouse ? pointer : { x: 0, y: 0 };
72
+ const hit = await getHit(x, y);
73
+ if (hit)
74
+ hitpoint.copy(hit);
75
+ }
76
+ if (updateTarget && ((_a = dofRef.current) == null ? void 0 : _a.target)) {
77
+ if (smoothTime > 0 && delta > 0) {
78
+ maath.easing.damp3(dofRef.current.target, hitpoint, smoothTime, delta);
79
+ } else {
80
+ dofRef.current.target.copy(hitpoint);
81
+ }
82
+ }
83
+ },
84
+ [target, hitpoint, followMouse, getHit, smoothTime, pointer]
85
+ );
86
+ fiber.useFrame(async (_, delta) => {
87
+ var _a;
88
+ if (!manual) {
89
+ update(delta);
90
+ }
91
+ if (hitpointRef.current) {
92
+ hitpointRef.current.position.copy(hitpoint);
93
+ }
94
+ if (targetRef.current && ((_a = dofRef.current) == null ? void 0 : _a.target)) {
95
+ targetRef.current.position.copy(dofRef.current.target);
96
+ }
97
+ });
98
+ const api = React.useMemo(
99
+ () => ({
100
+ dofRef,
101
+ hitpoint,
102
+ update
103
+ }),
104
+ [hitpoint, update]
105
+ );
106
+ React.useImperativeHandle(fref, () => api, [api]);
107
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
108
+ debug ? fiber.createPortal(
109
+ /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
110
+ /* @__PURE__ */ jsxRuntime.jsxs("mesh", { ref: hitpointRef, children: [
111
+ /* @__PURE__ */ jsxRuntime.jsx("sphereGeometry", { args: [debug, 16, 16] }),
112
+ /* @__PURE__ */ jsxRuntime.jsx("meshBasicMaterial", { color: "#00ff00", opacity: 1, transparent: true, depthWrite: false })
113
+ ] }),
114
+ /* @__PURE__ */ jsxRuntime.jsxs("mesh", { ref: targetRef, children: [
115
+ /* @__PURE__ */ jsxRuntime.jsx("sphereGeometry", { args: [debug / 2, 16, 16] }),
116
+ /* @__PURE__ */ jsxRuntime.jsx("meshBasicMaterial", { color: "#00ff00", opacity: 0.5, transparent: true, depthWrite: false })
117
+ ] })
118
+ ] }),
119
+ scene
120
+ ) : null,
121
+ /* @__PURE__ */ jsxRuntime.jsx(DepthOfField.DepthOfField, { ref: dofRef, ...props, target: hitpoint })
122
+ ] });
123
+ }
124
+ );
125
+ exports.Autofocus = Autofocus;
126
+ //# sourceMappingURL=Autofocus.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Autofocus.cjs","sources":["../../src/effects/Autofocus.tsx"],"sourcesContent":["import * as THREE from 'three'\nimport React, {\n useRef,\n useContext,\n useState,\n useEffect,\n useCallback,\n forwardRef,\n useImperativeHandle,\n RefObject,\n useMemo,\n} from 'react'\nimport { useThree, useFrame, createPortal, Vector3 } from '@react-three/fiber'\nimport { CopyPass, DepthPickingPass, DepthOfFieldEffect } from 'postprocessing'\nimport { easing } from 'maath'\n\nimport { DepthOfField } from './DepthOfField'\nimport { EffectComposerContext } from '../EffectComposer'\n\nexport type AutofocusProps = React.ComponentProps<typeof DepthOfField> & {\n target?: Vector3\n /** should the target follow the pointer */\n mouse?: boolean\n /** size of the debug green point */\n debug?: number\n /** manual update */\n manual?: boolean\n /** approximate time to reach the target */\n smoothTime?: number\n}\n\nexport type AutofocusApi = {\n dofRef: RefObject<DepthOfFieldEffect>\n hitpoint: THREE.Vector3\n update: (delta: number, updateTarget: boolean) => void\n}\n\nexport const Autofocus = forwardRef<AutofocusApi, AutofocusProps>(\n (\n { target = undefined, mouse: followMouse = false, debug = undefined, manual = false, smoothTime = 0.25, ...props },\n fref\n ) => {\n const dofRef = useRef<DepthOfFieldEffect>(null)\n const hitpointRef = useRef<THREE.Mesh>(null)\n const targetRef = useRef<THREE.Mesh>(null)\n\n const scene = useThree(({ scene }) => scene)\n const pointer = useThree(({ pointer }) => pointer)\n const { composer, camera } = useContext(EffectComposerContext)\n\n // see: https://codesandbox.io/s/depthpickingpass-x130hg\n const [depthPickingPass] = useState(() => new DepthPickingPass())\n const [copyPass] = useState(() => new CopyPass())\n useEffect(() => {\n composer.addPass(depthPickingPass)\n composer.addPass(copyPass)\n return () => {\n composer.removePass(depthPickingPass)\n composer.removePass(copyPass)\n }\n }, [composer, depthPickingPass, copyPass])\n\n useEffect(() => {\n return () => {\n depthPickingPass.dispose()\n copyPass.dispose()\n }\n }, [depthPickingPass, copyPass])\n\n const [hitpoint] = useState(() => new THREE.Vector3(0, 0, 0))\n\n const [ndc] = useState(() => new THREE.Vector3(0, 0, 0))\n const getHit = useCallback(\n async (x: number, y: number) => {\n ndc.x = x\n ndc.y = y\n ndc.z = await depthPickingPass.readDepth(ndc)\n ndc.z = ndc.z * 2.0 - 1.0\n const hit = 1 - ndc.z > 0.0000001 // it is missed if ndc.z is close to 1\n return hit ? ndc.unproject(camera) : false\n },\n [ndc, depthPickingPass, camera]\n )\n\n const update = useCallback(\n async (delta: number, updateTarget = true) => {\n // Update hitpoint\n if (target) {\n hitpoint.set(...(target as [number, number, number]))\n } else {\n const { x, y } = followMouse ? pointer : { x: 0, y: 0 }\n const hit = await getHit(x, y)\n if (hit) hitpoint.copy(hit)\n }\n\n // Update target\n if (updateTarget && dofRef.current?.target) {\n if (smoothTime > 0 && delta > 0) {\n easing.damp3(dofRef.current.target, hitpoint, smoothTime, delta)\n } else {\n dofRef.current.target.copy(hitpoint)\n }\n }\n },\n [target, hitpoint, followMouse, getHit, smoothTime, pointer]\n )\n\n useFrame(async (_, delta) => {\n if (!manual) {\n update(delta)\n }\n if (hitpointRef.current) {\n hitpointRef.current.position.copy(hitpoint)\n }\n if (targetRef.current && dofRef.current?.target) {\n targetRef.current.position.copy(dofRef.current.target)\n }\n })\n\n // Ref API\n const api = useMemo<AutofocusApi>(\n () => ({\n dofRef,\n hitpoint,\n update,\n }),\n [hitpoint, update]\n )\n useImperativeHandle(fref, () => api, [api])\n\n return (\n <>\n {debug\n ? createPortal(\n <>\n <mesh ref={hitpointRef}>\n <sphereGeometry args={[debug, 16, 16]} />\n <meshBasicMaterial color=\"#00ff00\" opacity={1} transparent depthWrite={false} />\n </mesh>\n <mesh ref={targetRef}>\n <sphereGeometry args={[debug / 2, 16, 16]} />\n <meshBasicMaterial color=\"#00ff00\" opacity={0.5} transparent depthWrite={false} />\n </mesh>\n </>,\n scene\n )\n : null}\n\n <DepthOfField ref={dofRef} {...props} target={hitpoint} />\n </>\n )\n }\n)\n"],"names":["forwardRef","useRef","useThree","scene","pointer","useContext","EffectComposerContext","useState","DepthPickingPass","CopyPass","useEffect","THREE","useCallback","easing","useFrame","useMemo","useImperativeHandle","jsxs","Fragment","createPortal","jsx","DepthOfField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,MAAM,YAAYA,MAAA;AAAA,EACvB,CACE,EAAE,SAAS,QAAW,OAAO,cAAc,OAAO,QAAQ,QAAW,SAAS,OAAO,aAAa,MAAM,GAAG,SAC3G,SACG;AACG,UAAA,SAASC,aAA2B,IAAI;AACxC,UAAA,cAAcA,aAAmB,IAAI;AACrC,UAAA,YAAYA,aAAmB,IAAI;AAEzC,UAAM,QAAQC,MAAAA,SAAS,CAAC,EAAE,OAAAC,OAAAA,MAAYA,MAAK;AAC3C,UAAM,UAAUD,MAAAA,SAAS,CAAC,EAAE,SAAAE,SAAAA,MAAcA,QAAO;AACjD,UA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AW,MAAC,YAAY,MAAO,CAAA;AAAA,UAAA,GAChF;AAAA,UACAH,2BAAAA,KAAC,QAAK,EAAA,KAAK,WACT,UAAA;AAAA,YAAAG,+BAAC,oBAAe,MAAM,CAAC,QAAQ,GAAG,IAAI,EAAE,GAAG;AAAA,YAC3CA,2BAAAA,IAAC,uBAAkB,OAAM,WAAU,SAAS,KAAK,aAAW,MAAC,YAAY,MAAO,CAAA;AAAA,UAAA,GAClF;AAAA,QAAA,GACF;AAAA,QACA;AAAA,MAAA,IAEF;AAAA,qCAEHC,aAAAA,cAAa,EAAA,KAAK,QAAS,GAAG,OAAO,QAAQ,UAAU;AAAA,IAC1D,EAAA,CAAA;AAAA,EAEJ;AACF;;"}
@@ -0,0 +1,109 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import * as THREE from "three";
3
+ import { forwardRef, useRef, useContext, useState, useEffect, useCallback, useMemo, useImperativeHandle } from "react";
4
+ import { useThree, useFrame, createPortal } from "@react-three/fiber";
5
+ import { DepthPickingPass, CopyPass } from "postprocessing";
6
+ import { easing } from "maath";
7
+ import { DepthOfField } from "./DepthOfField.js";
8
+ import { EffectComposerContext } from "../EffectComposer.js";
9
+ const Autofocus = forwardRef(
10
+ ({ target = void 0, mouse: followMouse = false, debug = void 0, manual = false, smoothTime = 0.25, ...props }, fref) => {
11
+ const dofRef = useRef(null);
12
+ const hitpointRef = useRef(null);
13
+ const targetRef = useRef(null);
14
+ const scene = useThree(({ scene: scene2 }) => scene2);
15
+ const pointer = useThree(({ pointer: pointer2 }) => pointer2);
16
+ const { composer, camera } = useContext(EffectComposerContext);
17
+ const [depthPickingPass] = useState(() => new DepthPickingPass());
18
+ const [copyPass] = useState(() => new CopyPass());
19
+ useEffect(() => {
20
+ composer.addPass(depthPickingPass);
21
+ composer.addPass(copyPass);
22
+ return () => {
23
+ composer.removePass(depthPickingPass);
24
+ composer.removePass(copyPass);
25
+ };
26
+ }, [composer, depthPickingPass, copyPass]);
27
+ useEffect(() => {
28
+ return () => {
29
+ depthPickingPass.dispose();
30
+ copyPass.dispose();
31
+ };
32
+ }, [depthPickingPass, copyPass]);
33
+ const [hitpoint] = useState(() => new THREE.Vector3(0, 0, 0));
34
+ const [ndc] = useState(() => new THREE.Vector3(0, 0, 0));
35
+ const getHit = useCallback(
36
+ async (x, y) => {
37
+ ndc.x = x;
38
+ ndc.y = y;
39
+ ndc.z = await depthPickingPass.readDepth(ndc);
40
+ ndc.z = ndc.z * 2 - 1;
41
+ const hit = 1 - ndc.z > 1e-7;
42
+ return hit ? ndc.unproject(camera) : false;
43
+ },
44
+ [ndc, depthPickingPass, camera]
45
+ );
46
+ const update = useCallback(
47
+ async (delta, updateTarget = true) => {
48
+ var _a;
49
+ if (target) {
50
+ hitpoint.set(...target);
51
+ } else {
52
+ const { x, y } = followMouse ? pointer : { x: 0, y: 0 };
53
+ const hit = await getHit(x, y);
54
+ if (hit)
55
+ hitpoint.copy(hit);
56
+ }
57
+ if (updateTarget && ((_a = dofRef.current) == null ? void 0 : _a.target)) {
58
+ if (smoothTime > 0 && delta > 0) {
59
+ easing.damp3(dofRef.current.target, hitpoint, smoothTime, delta);
60
+ } else {
61
+ dofRef.current.target.copy(hitpoint);
62
+ }
63
+ }
64
+ },
65
+ [target, hitpoint, followMouse, getHit, smoothTime, pointer]
66
+ );
67
+ useFrame(async (_, delta) => {
68
+ var _a;
69
+ if (!manual) {
70
+ update(delta);
71
+ }
72
+ if (hitpointRef.current) {
73
+ hitpointRef.current.position.copy(hitpoint);
74
+ }
75
+ if (targetRef.current && ((_a = dofRef.current) == null ? void 0 : _a.target)) {
76
+ targetRef.current.position.copy(dofRef.current.target);
77
+ }
78
+ });
79
+ const api = useMemo(
80
+ () => ({
81
+ dofRef,
82
+ hitpoint,
83
+ update
84
+ }),
85
+ [hitpoint, update]
86
+ );
87
+ useImperativeHandle(fref, () => api, [api]);
88
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
89
+ debug ? createPortal(
90
+ /* @__PURE__ */ jsxs(Fragment, { children: [
91
+ /* @__PURE__ */ jsxs("mesh", { ref: hitpointRef, children: [
92
+ /* @__PURE__ */ jsx("sphereGeometry", { args: [debug, 16, 16] }),
93
+ /* @__PURE__ */ jsx("meshBasicMaterial", { color: "#00ff00", opacity: 1, transparent: true, depthWrite: false })
94
+ ] }),
95
+ /* @__PURE__ */ jsxs("mesh", { ref: targetRef, children: [
96
+ /* @__PURE__ */ jsx("sphereGeometry", { args: [debug / 2, 16, 16] }),
97
+ /* @__PURE__ */ jsx("meshBasicMaterial", { color: "#00ff00", opacity: 0.5, transparent: true, depthWrite: false })
98
+ ] })
99
+ ] }),
100
+ scene
101
+ ) : null,
102
+ /* @__PURE__ */ jsx(DepthOfField, { ref: dofRef, ...props, target: hitpoint })
103
+ ] });
104
+ }
105
+ );
106
+ export {
107
+ Autofocus
108
+ };
109
+ //# sourceMappingURL=Autofocus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Autofocus.js","sources":["../../src/effects/Autofocus.tsx"],"sourcesContent":["import * as THREE from 'three'\nimport React, {\n useRef,\n useContext,\n useState,\n useEffect,\n useCallback,\n forwardRef,\n useImperativeHandle,\n RefObject,\n useMemo,\n} from 'react'\nimport { useThree, useFrame, createPortal, Vector3 } from '@react-three/fiber'\nimport { CopyPass, DepthPickingPass, DepthOfFieldEffect } from 'postprocessing'\nimport { easing } from 'maath'\n\nimport { DepthOfField } from './DepthOfField'\nimport { EffectComposerContext } from '../EffectComposer'\n\nexport type AutofocusProps = React.ComponentProps<typeof DepthOfField> & {\n target?: Vector3\n /** should the target follow the pointer */\n mouse?: boolean\n /** size of the debug green point */\n debug?: number\n /** manual update */\n manual?: boolean\n /** approximate time to reach the target */\n smoothTime?: number\n}\n\nexport type AutofocusApi = {\n dofRef: RefObject<DepthOfFieldEffect>\n hitpoint: THREE.Vector3\n update: (delta: number, updateTarget: boolean) => void\n}\n\nexport const Autofocus = forwardRef<AutofocusApi, AutofocusProps>(\n (\n { target = undefined, mouse: followMouse = false, debug = undefined, manual = false, smoothTime = 0.25, ...props },\n fref\n ) => {\n const dofRef = useRef<DepthOfFieldEffect>(null)\n const hitpointRef = useRef<THREE.Mesh>(null)\n const targetRef = useRef<THREE.Mesh>(null)\n\n const scene = useThree(({ scene }) => scene)\n const pointer = useThree(({ pointer }) => pointer)\n const { composer, camera } = useContext(EffectComposerContext)\n\n // see: https://codesandbox.io/s/depthpickingpass-x130hg\n const [depthPickingPass] = useState(() => new DepthPickingPass())\n const [copyPass] = useState(() => new CopyPass())\n useEffect(() => {\n composer.addPass(depthPickingPass)\n composer.addPass(copyPass)\n return () => {\n composer.removePass(depthPickingPass)\n composer.removePass(copyPass)\n }\n }, [composer, depthPickingPass, copyPass])\n\n useEffect(() => {\n return () => {\n depthPickingPass.dispose()\n copyPass.dispose()\n }\n }, [depthPickingPass, copyPass])\n\n const [hitpoint] = useState(() => new THREE.Vector3(0, 0, 0))\n\n const [ndc] = useState(() => new THREE.Vector3(0, 0, 0))\n const getHit = useCallback(\n async (x: number, y: number) => {\n ndc.x = x\n ndc.y = y\n ndc.z = await depthPickingPass.readDepth(ndc)\n ndc.z = ndc.z * 2.0 - 1.0\n const hit = 1 - ndc.z > 0.0000001 // it is missed if ndc.z is close to 1\n return hit ? ndc.unproject(camera) : false\n },\n [ndc, depthPickingPass, camera]\n )\n\n const update = useCallback(\n async (delta: number, updateTarget = true) => {\n // Update hitpoint\n if (target) {\n hitpoint.set(...(target as [number, number, number]))\n } else {\n const { x, y } = followMouse ? pointer : { x: 0, y: 0 }\n const hit = await getHit(x, y)\n if (hit) hitpoint.copy(hit)\n }\n\n // Update target\n if (updateTarget && dofRef.current?.target) {\n if (smoothTime > 0 && delta > 0) {\n easing.damp3(dofRef.current.target, hitpoint, smoothTime, delta)\n } else {\n dofRef.current.target.copy(hitpoint)\n }\n }\n },\n [target, hitpoint, followMouse, getHit, smoothTime, pointer]\n )\n\n useFrame(async (_, delta) => {\n if (!manual) {\n update(delta)\n }\n if (hitpointRef.current) {\n hitpointRef.current.position.copy(hitpoint)\n }\n if (targetRef.current && dofRef.current?.target) {\n targetRef.current.position.copy(dofRef.current.target)\n }\n })\n\n // Ref API\n const api = useMemo<AutofocusApi>(\n () => ({\n dofRef,\n hitpoint,\n update,\n }),\n [hitpoint, update]\n )\n useImperativeHandle(fref, () => api, [api])\n\n return (\n <>\n {debug\n ? createPortal(\n <>\n <mesh ref={hitpointRef}>\n <sphereGeometry args={[debug, 16, 16]} />\n <meshBasicMaterial color=\"#00ff00\" opacity={1} transparent depthWrite={false} />\n </mesh>\n <mesh ref={targetRef}>\n <sphereGeometry args={[debug / 2, 16, 16]} />\n <meshBasicMaterial color=\"#00ff00\" opacity={0.5} transparent depthWrite={false} />\n </mesh>\n </>,\n scene\n )\n : null}\n\n <DepthOfField ref={dofRef} {...props} target={hitpoint} />\n </>\n )\n }\n)\n"],"names":["scene","pointer"],"mappings":";;;;;;;;AAqCO,MAAM,YAAY;AAAA,EACvB,CACE,EAAE,SAAS,QAAW,OAAO,cAAc,OAAO,QAAQ,QAAW,SAAS,OAAO,aAAa,MAAM,GAAG,SAC3G,SACG;AACG,UAAA,SAAS,OAA2B,IAAI;AACxC,UAAA,cAAc,OAAmB,IAAI;AACrC,UAAA,YAAY,OAAmB,IAAI;AAEzC,UAAM,QAAQ,SAAS,CAAC,EAAE,OAAAA,OAAAA,MAAYA,MAAK;AAC3C,UAAM,UAAU,SAAS,CAAC,EAAE,SAAAC,SAAAA,MAAcA,QAAO;AACjD,UAAM,EAAE,UAAU,OAAO,IAAI,WAAW,qBAAqB;AAG7D,UAAM,CAAC,gBAAgB,IAAI,SAAS,MAAM,IAAI,iBAAkB,CAAA;AAChE,UAAM,CAAC,QAAQ,IAAI,SAAS,MAAM,IAAI,SAAU,CAAA;AAChD,cAAU,MAAM;AACd,eAAS,QAAQ,gBAAgB;AACjC,eAAS,QAAQ,QAAQ;AACzB,aAAO,MAAM;AACX,iBAAS,WAAW,gBAAgB;AACpC,iBAA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 Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const postprocessing = require("postprocessing");
4
+ const util = require("../util.cjs");
5
+ const Bloom = util.wrapEffect(postprocessing.BloomEffect, {
6
+ blendFunction: postprocessing.BlendFunction.ADD
7
+ });
8
+ exports.Bloom = Bloom;
9
+ //# sourceMappingURL=Bloom.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bloom.cjs","sources":["../../src/effects/Bloom.tsx"],"sourcesContent":["import { BloomEffect, BlendFunction } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const Bloom = wrapEffect(BloomEffect, {\n blendFunction: BlendFunction.ADD,\n})\n"],"names":["wrapEffect","BloomEffect","BlendFunction"],"mappings":";;;;AAGa,MAAA,QAAQA,gBAAWC,4BAAa;AAAA,EAC3C,eAAeC,eAAc,cAAA;AAC/B,CAAC;;"}
@@ -0,0 +1,9 @@
1
+ import { BlendFunction, BloomEffect } from "postprocessing";
2
+ import { wrapEffect } from "../util.js";
3
+ const Bloom = wrapEffect(BloomEffect, {
4
+ blendFunction: BlendFunction.ADD
5
+ });
6
+ export {
7
+ Bloom
8
+ };
9
+ //# sourceMappingURL=Bloom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bloom.js","sources":["../../src/effects/Bloom.tsx"],"sourcesContent":["import { BloomEffect, BlendFunction } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const Bloom = wrapEffect(BloomEffect, {\n blendFunction: BlendFunction.ADD,\n})\n"],"names":[],"mappings":";;AAGa,MAAA,QAAQ,WAAW,aAAa;AAAA,EAC3C,eAAe,cAAc;AAC/B,CAAC;"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const postprocessing = require("postprocessing");
4
+ const util = require("../util.cjs");
5
+ const BrightnessContrast = util.wrapEffect(postprocessing.BrightnessContrastEffect);
6
+ exports.BrightnessContrast = BrightnessContrast;
7
+ //# sourceMappingURL=BrightnessContrast.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrightnessContrast.cjs","sources":["../../src/effects/BrightnessContrast.tsx"],"sourcesContent":["import { BrightnessContrastEffect } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const BrightnessContrast = wrapEffect(BrightnessContrastEffect)\n"],"names":["wrapEffect","BrightnessContrastEffect"],"mappings":";;;;AAGa,MAAA,qBAAqBA,gBAAWC,eAAwB,wBAAA;;"}
@@ -0,0 +1,7 @@
1
+ import { BrightnessContrastEffect } from "postprocessing";
2
+ import { wrapEffect } from "../util.js";
3
+ const BrightnessContrast = wrapEffect(BrightnessContrastEffect);
4
+ export {
5
+ BrightnessContrast
6
+ };
7
+ //# sourceMappingURL=BrightnessContrast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrightnessContrast.js","sources":["../../src/effects/BrightnessContrast.tsx"],"sourcesContent":["import { BrightnessContrastEffect } from 'postprocessing'\nimport { wrapEffect } from '../util'\n\nexport const BrightnessContrast = wrapEffect(BrightnessContrastEffect)\n"],"names":[],"mappings":";;AAGa,MAAA,qBAAqB,WAAW,wBAAwB;"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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;;"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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;"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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;;"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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;"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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;;"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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;"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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;;"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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;"}
@@ -0,0 +1,74 @@
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 maskMaterial = effect2.maskPass.getFullscreenMaterial();
47
+ maskMaterial.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
@@ -0,0 +1 @@
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 maskMaterial = (effect as any).maskPass.getFullscreenMaterial()\n maskMaterial.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;AAEvG,UAAA,eAAgBA,QAAe,SAAS,sBAAsB;AACpE,iBAAa,eAAeG,eAAa,aAAA;AAClCH,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;;"}
@@ -0,0 +1,74 @@
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 maskMaterial = effect2.maskPass.getFullscreenMaterial();
45
+ maskMaterial.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
@@ -0,0 +1 @@
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 maskMaterial = (effect as any).maskPass.getFullscreenMaterial()\n maskMaterial.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;AAEvG,UAAA,eAAgBA,QAAe,SAAS,sBAAsB;AACpE,iBAAa,eAAe,aAAa;AAClCA,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;"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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;;"}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
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;"}