@react-three/drei 10.7.7 → 10.8.0-alpha.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 (580) hide show
  1. package/README.md +49 -758
  2. package/_chunks/hls.mjs +3 -0
  3. package/_chunks/libs/@mediapipe/tasks-vision.mjs +4781 -0
  4. package/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
  5. package/_chunks/libs/@use-gesture/core.mjs +1650 -0
  6. package/_chunks/libs/@use-gesture/react.mjs +207 -0
  7. package/_chunks/libs/camera-controls.mjs +2207 -0
  8. package/_chunks/libs/detect-gpu.mjs +515 -0
  9. package/_chunks/libs/hls.js.mjs +21925 -0
  10. package/_chunks/libs/maath.mjs +5200 -0
  11. package/_chunks/libs/stats-gl.mjs +301 -0
  12. package/_chunks/libs/stats.js.mjs +90 -0
  13. package/_chunks/libs/suspend-react.mjs +60 -0
  14. package/_chunks/libs/three.mjs +23169 -0
  15. package/_chunks/libs/tunnel-rat.mjs +458 -0
  16. package/_chunks/libs/zustand.mjs +104 -0
  17. package/_chunks/rolldown-runtime.mjs +47 -0
  18. package/_chunks/vision_bundle.mjs +3 -0
  19. package/core/_chunks/hls.mjs +3 -0
  20. package/core/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
  21. package/core/_chunks/libs/@use-gesture/core.mjs +1650 -0
  22. package/core/_chunks/libs/@use-gesture/react.mjs +207 -0
  23. package/core/_chunks/libs/detect-gpu.mjs +515 -0
  24. package/core/_chunks/libs/hls.js.mjs +21925 -0
  25. package/core/_chunks/libs/maath.mjs +5200 -0
  26. package/core/_chunks/libs/stats-gl.mjs +301 -0
  27. package/core/_chunks/libs/stats.js.mjs +90 -0
  28. package/core/_chunks/libs/suspend-react.mjs +60 -0
  29. package/core/_chunks/libs/three.mjs +22457 -0
  30. package/core/_chunks/libs/tunnel-rat.mjs +458 -0
  31. package/core/_chunks/libs/zustand.mjs +104 -0
  32. package/core/_chunks/rolldown-runtime.mjs +47 -0
  33. package/core/core/index.d.mts +2232 -0
  34. package/core/core/index.mjs +11082 -0
  35. package/experimental/_chunks/libs/three.mjs +15386 -0
  36. package/experimental/experimental/index.d.mts +253 -0
  37. package/experimental/experimental/index.mjs +434 -0
  38. package/external/_chunks/hls.mjs +3 -0
  39. package/external/_chunks/libs/@mediapipe/tasks-vision.mjs +4781 -0
  40. package/external/_chunks/libs/camera-controls.mjs +2207 -0
  41. package/external/_chunks/libs/hls.js.mjs +21925 -0
  42. package/external/_chunks/libs/maath.mjs +5200 -0
  43. package/external/_chunks/libs/suspend-react.mjs +58 -0
  44. package/external/_chunks/libs/three.mjs +15387 -0
  45. package/external/_chunks/rolldown-runtime.mjs +32 -0
  46. package/external/_chunks/vision_bundle.mjs +3 -0
  47. package/external/external/index.d.mts +499 -0
  48. package/external/external/index.mjs +9422 -0
  49. package/index.d.mts +2567 -0
  50. package/index.mjs +20571 -0
  51. package/legacy/_chunks/hls.mjs +3 -0
  52. package/legacy/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
  53. package/legacy/_chunks/libs/@use-gesture/core.mjs +1650 -0
  54. package/legacy/_chunks/libs/@use-gesture/react.mjs +207 -0
  55. package/legacy/_chunks/libs/bidi-js.mjs +675 -0
  56. package/legacy/_chunks/libs/detect-gpu.mjs +515 -0
  57. package/legacy/_chunks/libs/hls.js.mjs +21925 -0
  58. package/legacy/_chunks/libs/maath.mjs +5200 -0
  59. package/legacy/_chunks/libs/stats-gl.mjs +301 -0
  60. package/legacy/_chunks/libs/stats.js.mjs +90 -0
  61. package/legacy/_chunks/libs/suspend-react.mjs +60 -0
  62. package/legacy/_chunks/libs/three.mjs +26062 -0
  63. package/legacy/_chunks/libs/troika-three-text.mjs +6494 -0
  64. package/legacy/_chunks/libs/tunnel-rat.mjs +458 -0
  65. package/legacy/_chunks/libs/zustand.mjs +104 -0
  66. package/legacy/_chunks/rolldown-runtime.mjs +47 -0
  67. package/legacy/legacy/index.d.mts +2788 -0
  68. package/legacy/legacy/index.mjs +14984 -0
  69. package/native/_chunks/hls.mjs +3 -0
  70. package/native/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
  71. package/native/_chunks/libs/@use-gesture/core.mjs +1650 -0
  72. package/native/_chunks/libs/@use-gesture/react.mjs +207 -0
  73. package/native/_chunks/libs/detect-gpu.mjs +515 -0
  74. package/native/_chunks/libs/hls.js.mjs +21925 -0
  75. package/native/_chunks/libs/maath.mjs +5200 -0
  76. package/native/_chunks/libs/stats-gl.mjs +301 -0
  77. package/native/_chunks/libs/stats.js.mjs +90 -0
  78. package/native/_chunks/libs/suspend-react.mjs +60 -0
  79. package/native/_chunks/libs/three.mjs +22592 -0
  80. package/native/_chunks/libs/tunnel-rat.mjs +458 -0
  81. package/native/_chunks/libs/zustand.mjs +104 -0
  82. package/native/_chunks/rolldown-runtime.mjs +47 -0
  83. package/native/native/index.d.mts +3168 -0
  84. package/native/native/index.mjs +14863 -0
  85. package/package.json +41 -10
  86. package/webgpu/_chunks/hls.mjs +3 -0
  87. package/webgpu/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
  88. package/webgpu/_chunks/libs/@use-gesture/core.mjs +1650 -0
  89. package/webgpu/_chunks/libs/@use-gesture/react.mjs +207 -0
  90. package/webgpu/_chunks/libs/detect-gpu.mjs +515 -0
  91. package/webgpu/_chunks/libs/hls.js.mjs +21925 -0
  92. package/webgpu/_chunks/libs/maath.mjs +5200 -0
  93. package/webgpu/_chunks/libs/stats-gl.mjs +301 -0
  94. package/webgpu/_chunks/libs/stats.js.mjs +90 -0
  95. package/webgpu/_chunks/libs/suspend-react.mjs +60 -0
  96. package/webgpu/_chunks/libs/three.mjs +22592 -0
  97. package/webgpu/_chunks/libs/tunnel-rat.mjs +458 -0
  98. package/webgpu/_chunks/libs/zustand.mjs +104 -0
  99. package/webgpu/_chunks/rolldown-runtime.mjs +47 -0
  100. package/webgpu/webgpu/index.d.mts +3166 -0
  101. package/webgpu/webgpu/index.mjs +15015 -0
  102. package/core/AccumulativeShadows.cjs.js +0 -1
  103. package/core/AccumulativeShadows.d.ts +0 -59
  104. package/core/AccumulativeShadows.js +0 -310
  105. package/core/AdaptiveDpr.cjs.js +0 -1
  106. package/core/AdaptiveDpr.d.ts +0 -3
  107. package/core/AdaptiveDpr.js +0 -28
  108. package/core/AdaptiveEvents.cjs.js +0 -1
  109. package/core/AdaptiveEvents.d.ts +0 -1
  110. package/core/AdaptiveEvents.js +0 -20
  111. package/core/ArcballControls.cjs.js +0 -1
  112. package/core/ArcballControls.d.ts +0 -15
  113. package/core/ArcballControls.js +0 -67
  114. package/core/AsciiRenderer.cjs.js +0 -1
  115. package/core/AsciiRenderer.d.ts +0 -11
  116. package/core/AsciiRenderer.js +0 -66
  117. package/core/BBAnchor.cjs.js +0 -1
  118. package/core/BBAnchor.d.ts +0 -7
  119. package/core/BBAnchor.js +0 -37
  120. package/core/Backdrop.cjs.js +0 -1
  121. package/core/Backdrop.d.ts +0 -15
  122. package/core/Backdrop.js +0 -33
  123. package/core/BakeShadows.cjs.js +0 -1
  124. package/core/BakeShadows.d.ts +0 -1
  125. package/core/BakeShadows.js +0 -16
  126. package/core/Billboard.cjs.js +0 -1
  127. package/core/Billboard.d.ts +0 -10
  128. package/core/Billboard.js +0 -53
  129. package/core/Bounds.cjs.js +0 -1
  130. package/core/Bounds.d.ts +0 -36
  131. package/core/Bounds.js +0 -254
  132. package/core/Bvh.cjs.js +0 -1
  133. package/core/Bvh.d.ts +0 -19
  134. package/core/Bvh.js +0 -92
  135. package/core/CameraControls.cjs.js +0 -1
  136. package/core/CameraControls.d.ts +0 -48
  137. package/core/CameraControls.js +0 -151
  138. package/core/CameraShake.cjs.js +0 -1
  139. package/core/CameraShake.d.ts +0 -17
  140. package/core/CameraShake.js +0 -57
  141. package/core/CatmullRomLine.cjs.js +0 -1
  142. package/core/CatmullRomLine.d.ts +0 -10
  143. package/core/CatmullRomLine.js +0 -42
  144. package/core/Caustics.cjs.js +0 -1
  145. package/core/Caustics.d.ts +0 -32
  146. package/core/Caustics.js +0 -388
  147. package/core/Center.cjs.js +0 -1
  148. package/core/Center.d.ts +0 -33
  149. package/core/Center.js +0 -67
  150. package/core/Clone.cjs.js +0 -1
  151. package/core/Clone.d.ts +0 -15
  152. package/core/Clone.js +0 -100
  153. package/core/Cloud.cjs.js +0 -1
  154. package/core/Cloud.d.ts +0 -97
  155. package/core/Cloud.js +0 -231
  156. package/core/ComputedAttribute.cjs.js +0 -1
  157. package/core/ComputedAttribute.d.ts +0 -8
  158. package/core/ComputedAttribute.js +0 -33
  159. package/core/ContactShadows.cjs.js +0 -1
  160. package/core/ContactShadows.d.ts +0 -18
  161. package/core/ContactShadows.js +0 -114
  162. package/core/CubeCamera.cjs.js +0 -1
  163. package/core/CubeCamera.d.ts +0 -21
  164. package/core/CubeCamera.js +0 -86
  165. package/core/CubeTexture.cjs.js +0 -1
  166. package/core/CubeTexture.d.ts +0 -14
  167. package/core/CubeTexture.js +0 -25
  168. package/core/CubicBezierLine.cjs.js +0 -1
  169. package/core/CubicBezierLine.d.ts +0 -12
  170. package/core/CubicBezierLine.js +0 -28
  171. package/core/CurveModifier.cjs.js +0 -1
  172. package/core/CurveModifier.d.ts +0 -11
  173. package/core/CurveModifier.js +0 -27
  174. package/core/Decal.cjs.js +0 -1
  175. package/core/Decal.d.ts +0 -16
  176. package/core/Decal.js +0 -128
  177. package/core/Detailed.cjs.js +0 -1
  178. package/core/Detailed.d.ts +0 -10
  179. package/core/Detailed.js +0 -33
  180. package/core/DetectGPU.cjs.js +0 -1
  181. package/core/DetectGPU.d.ts +0 -7
  182. package/core/DetectGPU.js +0 -14
  183. package/core/DeviceOrientationControls.cjs.js +0 -1
  184. package/core/DeviceOrientationControls.d.ts +0 -10
  185. package/core/DeviceOrientationControls.js +0 -51
  186. package/core/Edges.cjs.js +0 -1
  187. package/core/Edges.d.ts +0 -13
  188. package/core/Edges.js +0 -38
  189. package/core/Effects.cjs.js +0 -1
  190. package/core/Effects.d.ts +0 -25
  191. package/core/Effects.js +0 -91
  192. package/core/Environment.cjs.js +0 -1
  193. package/core/Environment.d.ts +0 -37
  194. package/core/Environment.js +0 -189
  195. package/core/Example.cjs.js +0 -1
  196. package/core/Example.d.ts +0 -13
  197. package/core/Example.js +0 -46
  198. package/core/Fbo.cjs.js +0 -1
  199. package/core/Fbo.d.ts +0 -22
  200. package/core/Fbo.js +0 -63
  201. package/core/Fbx.cjs.js +0 -1
  202. package/core/Fbx.d.ts +0 -11
  203. package/core/Fbx.js +0 -23
  204. package/core/FirstPersonControls.cjs.js +0 -1
  205. package/core/FirstPersonControls.d.ts +0 -8
  206. package/core/FirstPersonControls.js +0 -38
  207. package/core/Fisheye.cjs.js +0 -1
  208. package/core/Fisheye.d.ts +0 -10
  209. package/core/Fisheye.js +0 -95
  210. package/core/Float.cjs.js +0 -1
  211. package/core/Float.d.ts +0 -14
  212. package/core/Float.js +0 -37
  213. package/core/FlyControls.cjs.js +0 -1
  214. package/core/FlyControls.d.ts +0 -10
  215. package/core/FlyControls.js +0 -55
  216. package/core/GizmoHelper.cjs.js +0 -1
  217. package/core/GizmoHelper.d.ts +0 -16
  218. package/core/GizmoHelper.js +0 -116
  219. package/core/GizmoViewcube.cjs.js +0 -1
  220. package/core/GizmoViewcube.d.ts +0 -14
  221. package/core/GizmoViewcube.js +0 -133
  222. package/core/GizmoViewport.cjs.js +0 -1
  223. package/core/GizmoViewport.d.ts +0 -16
  224. package/core/GizmoViewport.js +0 -140
  225. package/core/Gltf.cjs.js +0 -1
  226. package/core/Gltf.d.ts +0 -27
  227. package/core/Gltf.js +0 -52
  228. package/core/GradientTexture.cjs.js +0 -1
  229. package/core/GradientTexture.d.ts +0 -18
  230. package/core/GradientTexture.js +0 -54
  231. package/core/Grid.cjs.js +0 -1
  232. package/core/Grid.d.ts +0 -26
  233. package/core/Grid.js +0 -142
  234. package/core/Helper.cjs.js +0 -1
  235. package/core/Helper.d.ts +0 -16
  236. package/core/Helper.js +0 -47
  237. package/core/Hud.cjs.js +0 -1
  238. package/core/Hud.d.ts +0 -6
  239. package/core/Hud.js +0 -55
  240. package/core/Image.cjs.js +0 -1
  241. package/core/Image.d.ts +0 -38
  242. package/core/Image.js +0 -160
  243. package/core/Instances.cjs.js +0 -1
  244. package/core/Instances.d.ts +0 -64
  245. package/core/Instances.js +0 -313
  246. package/core/Ktx2.cjs.js +0 -1
  247. package/core/Ktx2.d.ts +0 -14
  248. package/core/Ktx2.js +0 -48
  249. package/core/Lightformer.cjs.js +0 -1
  250. package/core/Lightformer.d.ts +0 -15
  251. package/core/Lightformer.js +0 -63
  252. package/core/Line.cjs.js +0 -1
  253. package/core/Line.d.ts +0 -13
  254. package/core/Line.js +0 -73
  255. package/core/MapControls.cjs.js +0 -1
  256. package/core/MapControls.d.ts +0 -14
  257. package/core/MapControls.js +0 -63
  258. package/core/MarchingCubes.cjs.js +0 -1
  259. package/core/MarchingCubes.d.ts +0 -24
  260. package/core/MarchingCubes.js +0 -78
  261. package/core/Mask.cjs.js +0 -1
  262. package/core/Mask.d.ts +0 -17
  263. package/core/Mask.js +0 -42
  264. package/core/MatcapTexture.cjs.js +0 -1
  265. package/core/MatcapTexture.d.ts +0 -9
  266. package/core/MatcapTexture.js +0 -51
  267. package/core/MeshDiscardMaterial.cjs.js +0 -1
  268. package/core/MeshDiscardMaterial.d.ts +0 -10
  269. package/core/MeshDiscardMaterial.js +0 -15
  270. package/core/MeshDistortMaterial.cjs.js +0 -1
  271. package/core/MeshDistortMaterial.d.ts +0 -39
  272. package/core/MeshDistortMaterial.js +0 -72
  273. package/core/MeshPortalMaterial.cjs.js +0 -1
  274. package/core/MeshPortalMaterial.d.ts +0 -25
  275. package/core/MeshPortalMaterial.js +0 -467
  276. package/core/MeshReflectorMaterial.cjs.js +0 -1
  277. package/core/MeshReflectorMaterial.d.ts +0 -14
  278. package/core/MeshReflectorMaterial.js +0 -180
  279. package/core/MeshRefractionMaterial.cjs.js +0 -1
  280. package/core/MeshRefractionMaterial.d.ts +0 -19
  281. package/core/MeshRefractionMaterial.js +0 -73
  282. package/core/MeshTransmissionMaterial.cjs.js +0 -1
  283. package/core/MeshTransmissionMaterial.d.ts +0 -34
  284. package/core/MeshTransmissionMaterial.js +0 -402
  285. package/core/MeshWobbleMaterial.cjs.js +0 -1
  286. package/core/MeshWobbleMaterial.d.ts +0 -36
  287. package/core/MeshWobbleMaterial.js +0 -60
  288. package/core/MotionPathControls.cjs.js +0 -1
  289. package/core/MotionPathControls.d.ts +0 -33
  290. package/core/MotionPathControls.js +0 -121
  291. package/core/MultiMaterial.cjs.js +0 -1
  292. package/core/MultiMaterial.d.ts +0 -4
  293. package/core/MultiMaterial.js +0 -29
  294. package/core/NormalTexture.cjs.js +0 -1
  295. package/core/NormalTexture.d.ts +0 -14
  296. package/core/NormalTexture.js +0 -42
  297. package/core/OrbitControls.cjs.js +0 -1
  298. package/core/OrbitControls.d.ts +0 -22
  299. package/core/OrbitControls.js +0 -79
  300. package/core/OrthographicCamera.cjs.js +0 -1
  301. package/core/OrthographicCamera.d.ts +0 -14
  302. package/core/OrthographicCamera.js +0 -76
  303. package/core/Outlines.cjs.js +0 -1
  304. package/core/Outlines.d.ts +0 -17
  305. package/core/Outlines.js +0 -166
  306. package/core/PerformanceMonitor.cjs.js +0 -1
  307. package/core/PerformanceMonitor.d.ts +0 -36
  308. package/core/PerformanceMonitor.js +0 -116
  309. package/core/PerspectiveCamera.cjs.js +0 -1
  310. package/core/PerspectiveCamera.d.ts +0 -14
  311. package/core/PerspectiveCamera.js +0 -72
  312. package/core/PointMaterial.cjs.js +0 -1
  313. package/core/PointMaterial.d.ts +0 -8
  314. package/core/PointMaterial.js +0 -36
  315. package/core/PointerLockControls.cjs.js +0 -1
  316. package/core/PointerLockControls.d.ts +0 -15
  317. package/core/PointerLockControls.js +0 -89
  318. package/core/Points.cjs.js +0 -1
  319. package/core/Points.d.ts +0 -31
  320. package/core/Points.js +0 -202
  321. package/core/PositionalAudio.cjs.js +0 -1
  322. package/core/PositionalAudio.d.ts +0 -9
  323. package/core/PositionalAudio.js +0 -46
  324. package/core/Preload.cjs.js +0 -1
  325. package/core/Preload.d.ts +0 -7
  326. package/core/Preload.js +0 -44
  327. package/core/Progress.cjs.js +0 -1
  328. package/core/Progress.d.ts +0 -14
  329. package/core/Progress.js +0 -55
  330. package/core/QuadraticBezierLine.cjs.js +0 -1
  331. package/core/QuadraticBezierLine.d.ts +0 -14
  332. package/core/QuadraticBezierLine.js +0 -42
  333. package/core/RenderCubeTexture.cjs.js +0 -1
  334. package/core/RenderCubeTexture.d.ts +0 -30
  335. package/core/RenderCubeTexture.js +0 -96
  336. package/core/RenderTexture.cjs.js +0 -1
  337. package/core/RenderTexture.d.ts +0 -18
  338. package/core/RenderTexture.js +0 -105
  339. package/core/Resize.cjs.js +0 -1
  340. package/core/Resize.d.ts +0 -17
  341. package/core/Resize.js +0 -39
  342. package/core/RoundedBox.cjs.js +0 -1
  343. package/core/RoundedBox.d.ts +0 -14
  344. package/core/RoundedBox.js +0 -70
  345. package/core/Sampler.cjs.js +0 -1
  346. package/core/Sampler.d.ts +0 -28
  347. package/core/Sampler.js +0 -75
  348. package/core/ScreenQuad.cjs.js +0 -1
  349. package/core/ScreenQuad.d.ts +0 -5
  350. package/core/ScreenQuad.js +0 -25
  351. package/core/ScreenSizer.cjs.js +0 -1
  352. package/core/ScreenSizer.d.ts +0 -7
  353. package/core/ScreenSizer.js +0 -39
  354. package/core/ScreenSpace.cjs.js +0 -1
  355. package/core/ScreenSpace.d.ts +0 -7
  356. package/core/ScreenSpace.js +0 -25
  357. package/core/Segments.cjs.js +0 -1
  358. package/core/Segments.d.ts +0 -29
  359. package/core/Segments.js +0 -96
  360. package/core/Shadow.cjs.js +0 -1
  361. package/core/Shadow.d.ts +0 -12
  362. package/core/Shadow.js +0 -42
  363. package/core/ShadowAlpha.cjs.js +0 -1
  364. package/core/ShadowAlpha.d.ts +0 -7
  365. package/core/ShadowAlpha.js +0 -108
  366. package/core/Sky.cjs.js +0 -1
  367. package/core/Sky.d.ts +0 -16
  368. package/core/Sky.js +0 -39
  369. package/core/Sparkles.cjs.js +0 -1
  370. package/core/Sparkles.d.ts +0 -26
  371. package/core/Sparkles.js +0 -161
  372. package/core/Splat.cjs.js +0 -1
  373. package/core/Splat.d.ts +0 -56
  374. package/core/Splat.js +0 -506
  375. package/core/SpotLight.cjs.js +0 -1
  376. package/core/SpotLight.d.ts +0 -27
  377. package/core/SpotLight.js +0 -223
  378. package/core/SpriteAnimator.cjs.js +0 -1
  379. package/core/SpriteAnimator.d.ts +0 -88
  380. package/core/SpriteAnimator.js +0 -413
  381. package/core/Stage.cjs.js +0 -1
  382. package/core/Stage.d.ts +0 -27
  383. package/core/Stage.js +0 -133
  384. package/core/Stars.cjs.js +0 -1
  385. package/core/Stars.d.ts +0 -22
  386. package/core/Stars.js +0 -100
  387. package/core/Stats.cjs.js +0 -1
  388. package/core/Stats.d.ts +0 -7
  389. package/core/Stats.js +0 -32
  390. package/core/StatsGl.cjs.js +0 -1
  391. package/core/StatsGl.d.ts +0 -14
  392. package/core/StatsGl.js +0 -44
  393. package/core/Svg.cjs.js +0 -1
  394. package/core/Svg.d.ts +0 -13
  395. package/core/Svg.js +0 -62
  396. package/core/Text.cjs.js +0 -1
  397. package/core/Text.d.ts +0 -38
  398. package/core/Text.js +0 -57
  399. package/core/Text3D.cjs.js +0 -1
  400. package/core/Text3D.d.ts +0 -20
  401. package/core/Text3D.js +0 -74
  402. package/core/Texture.cjs.js +0 -1
  403. package/core/Texture.d.ts +0 -20
  404. package/core/Texture.js +0 -60
  405. package/core/TrackballControls.cjs.js +0 -1
  406. package/core/TrackballControls.d.ts +0 -15
  407. package/core/TrackballControls.js +0 -72
  408. package/core/Trail.cjs.js +0 -1
  409. package/core/Trail.d.ts +0 -21
  410. package/core/Trail.js +0 -150
  411. package/core/TrailTexture.cjs.js +0 -1
  412. package/core/TrailTexture.d.ts +0 -19
  413. package/core/TrailTexture.js +0 -159
  414. package/core/TransformControls.cjs.js +0 -1
  415. package/core/TransformControls.d.ts +0 -28
  416. package/core/TransformControls.js +0 -114
  417. package/core/VideoTexture.cjs.js +0 -1
  418. package/core/VideoTexture.d.ts +0 -26
  419. package/core/VideoTexture.js +0 -111
  420. package/core/Wireframe.cjs.js +0 -1
  421. package/core/Wireframe.d.ts +0 -15
  422. package/core/Wireframe.js +0 -157
  423. package/core/calculateScaleFactor.cjs.js +0 -1
  424. package/core/calculateScaleFactor.d.ts +0 -3
  425. package/core/calculateScaleFactor.js +0 -31
  426. package/core/index.cjs.js +0 -1
  427. package/core/index.d.ts +0 -122
  428. package/core/index.js +0 -150
  429. package/core/meshBounds.cjs.js +0 -1
  430. package/core/meshBounds.d.ts +0 -2
  431. package/core/meshBounds.js +0 -28
  432. package/core/shaderMaterial.cjs.js +0 -1
  433. package/core/shaderMaterial.d.ts +0 -9
  434. package/core/shaderMaterial.js +0 -29
  435. package/core/shapes.cjs.js +0 -1
  436. package/core/shapes.d.ts +0 -26
  437. package/core/shapes.js +0 -65
  438. package/core/softShadows.cjs.js +0 -1
  439. package/core/softShadows.d.ts +0 -6
  440. package/core/softShadows.js +0 -158
  441. package/core/useAnimations.cjs.js +0 -1
  442. package/core/useAnimations.d.ts +0 -13
  443. package/core/useAnimations.js +0 -52
  444. package/core/useAspect.cjs.js +0 -1
  445. package/core/useAspect.d.ts +0 -1
  446. package/core/useAspect.js +0 -10
  447. package/core/useBoxProjectedEnv.cjs.js +0 -1
  448. package/core/useBoxProjectedEnv.d.ts +0 -19
  449. package/core/useBoxProjectedEnv.js +0 -95
  450. package/core/useCamera.cjs.js +0 -1
  451. package/core/useCamera.d.ts +0 -3
  452. package/core/useCamera.js +0 -19
  453. package/core/useContextBridge.cjs.js +0 -1
  454. package/core/useContextBridge.d.ts +0 -4
  455. package/core/useContextBridge.js +0 -20
  456. package/core/useDepthBuffer.cjs.js +0 -1
  457. package/core/useDepthBuffer.d.ts +0 -6
  458. package/core/useDepthBuffer.js +0 -38
  459. package/core/useEnvironment.cjs.js +0 -1
  460. package/core/useEnvironment.d.ts +0 -17
  461. package/core/useEnvironment.js +0 -150
  462. package/core/useFont.cjs.js +0 -1
  463. package/core/useFont.d.ts +0 -24
  464. package/core/useFont.js +0 -24
  465. package/core/useIntersect.cjs.js +0 -1
  466. package/core/useIntersect.d.ts +0 -3
  467. package/core/useIntersect.js +0 -36
  468. package/core/useSpriteLoader.cjs.js +0 -1
  469. package/core/useSpriteLoader.d.ts +0 -57
  470. package/core/useSpriteLoader.js +0 -402
  471. package/helpers/constants.cjs.js +0 -1
  472. package/helpers/constants.d.ts +0 -1
  473. package/helpers/constants.js +0 -6
  474. package/helpers/deprecated.cjs.js +0 -1
  475. package/helpers/deprecated.d.ts +0 -5
  476. package/helpers/deprecated.js +0 -8
  477. package/helpers/environment-assets.cjs.js +0 -1
  478. package/helpers/environment-assets.d.ts +0 -13
  479. package/helpers/environment-assets.js +0 -14
  480. package/helpers/glsl/DefaultSpotlightShadowShadows.glsl.js +0 -3
  481. package/helpers/glsl/distort.vert.glsl.js +0 -3
  482. package/helpers/ts-utils.cjs.js +0 -1
  483. package/helpers/ts-utils.d.ts +0 -7
  484. package/helpers/ts-utils.js +0 -1
  485. package/helpers/useEffectfulState.cjs.js +0 -1
  486. package/helpers/useEffectfulState.d.ts +0 -4
  487. package/helpers/useEffectfulState.js +0 -17
  488. package/index.cjs.js +0 -1
  489. package/index.d.ts +0 -1
  490. package/index.js +0 -139
  491. package/materials/BlurPass.cjs.js +0 -1
  492. package/materials/BlurPass.d.ts +0 -23
  493. package/materials/BlurPass.js +0 -72
  494. package/materials/ConvolutionMaterial.cjs.js +0 -1
  495. package/materials/ConvolutionMaterial.d.ts +0 -7
  496. package/materials/ConvolutionMaterial.js +0 -97
  497. package/materials/DiscardMaterial.cjs.js +0 -1
  498. package/materials/DiscardMaterial.d.ts +0 -3
  499. package/materials/DiscardMaterial.js +0 -5
  500. package/materials/MeshReflectorMaterial.cjs.js +0 -1
  501. package/materials/MeshReflectorMaterial.d.ts +0 -50
  502. package/materials/MeshReflectorMaterial.js +0 -256
  503. package/materials/MeshRefractionMaterial.cjs.js +0 -1
  504. package/materials/MeshRefractionMaterial.d.ts +0 -18
  505. package/materials/MeshRefractionMaterial.js +0 -163
  506. package/materials/SpotLightMaterial.cjs.js +0 -1
  507. package/materials/SpotLightMaterial.d.ts +0 -4
  508. package/materials/SpotLightMaterial.js +0 -115
  509. package/materials/WireframeMaterial.cjs.js +0 -1
  510. package/materials/WireframeMaterial.d.ts +0 -64
  511. package/materials/WireframeMaterial.js +0 -217
  512. package/native/index.cjs.js +0 -1
  513. package/native/index.d.ts +0 -1
  514. package/native/index.js +0 -150
  515. package/web/CycleRaycast.cjs.js +0 -1
  516. package/web/CycleRaycast.d.ts +0 -10
  517. package/web/CycleRaycast.js +0 -93
  518. package/web/DragControls.cjs.js +0 -1
  519. package/web/DragControls.d.ts +0 -17
  520. package/web/DragControls.js +0 -127
  521. package/web/FaceControls.cjs.js +0 -1
  522. package/web/FaceControls.d.ts +0 -29
  523. package/web/FaceControls.js +0 -236
  524. package/web/FaceLandmarker.cjs.js +0 -1
  525. package/web/FaceLandmarker.d.ts +0 -14
  526. package/web/FaceLandmarker.js +0 -49
  527. package/web/Facemesh.cjs.js +0 -1
  528. package/web/Facemesh.d.ts +0 -118
  529. package/web/Facemesh.js +0 -4538
  530. package/web/Html.cjs.js +0 -1
  531. package/web/Html.d.ts +0 -34
  532. package/web/Html.js +0 -375
  533. package/web/KeyboardControls.cjs.js +0 -1
  534. package/web/KeyboardControls.d.ts +0 -37
  535. package/web/KeyboardControls.js +0 -104
  536. package/web/Loader.cjs.js +0 -1
  537. package/web/Loader.d.ts +0 -12
  538. package/web/Loader.js +0 -101
  539. package/web/PresentationControls.cjs.js +0 -1
  540. package/web/PresentationControls.d.ts +0 -16
  541. package/web/PresentationControls.js +0 -79
  542. package/web/ScreenVideoTexture.cjs.js +0 -1
  543. package/web/ScreenVideoTexture.d.ts +0 -17
  544. package/web/ScreenVideoTexture.js +0 -30
  545. package/web/ScrollControls.cjs.js +0 -1
  546. package/web/ScrollControls.d.ts +0 -45
  547. package/web/ScrollControls.js +0 -237
  548. package/web/Select.cjs.js +0 -1
  549. package/web/Select.d.ts +0 -14
  550. package/web/Select.js +0 -171
  551. package/web/View.cjs.js +0 -1
  552. package/web/View.d.ts +0 -34
  553. package/web/View.js +0 -259
  554. package/web/WebcamVideoTexture.cjs.js +0 -1
  555. package/web/WebcamVideoTexture.d.ts +0 -17
  556. package/web/WebcamVideoTexture.js +0 -33
  557. package/web/index.cjs.js +0 -1
  558. package/web/index.d.ts +0 -17
  559. package/web/index.js +0 -176
  560. package/web/pivotControls/AxisArrow.cjs.js +0 -1
  561. package/web/pivotControls/AxisArrow.d.ts +0 -7
  562. package/web/pivotControls/AxisArrow.js +0 -193
  563. package/web/pivotControls/AxisRotator.cjs.js +0 -1
  564. package/web/pivotControls/AxisRotator.d.ts +0 -7
  565. package/web/pivotControls/AxisRotator.js +0 -220
  566. package/web/pivotControls/PlaneSlider.cjs.js +0 -1
  567. package/web/pivotControls/PlaneSlider.d.ts +0 -7
  568. package/web/pivotControls/PlaneSlider.js +0 -202
  569. package/web/pivotControls/ScalingSphere.cjs.js +0 -1
  570. package/web/pivotControls/ScalingSphere.d.ts +0 -7
  571. package/web/pivotControls/ScalingSphere.js +0 -192
  572. package/web/pivotControls/context.cjs.js +0 -1
  573. package/web/pivotControls/context.d.ts +0 -33
  574. package/web/pivotControls/context.js +0 -5
  575. package/web/pivotControls/index.cjs.js +0 -1
  576. package/web/pivotControls/index.d.ts +0 -39
  577. package/web/pivotControls/index.js +0 -213
  578. package/web/useCursor.cjs.js +0 -1
  579. package/web/useCursor.d.ts +0 -1
  580. package/web/useCursor.js +0 -12
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './web';
package/index.js DELETED
@@ -1,139 +0,0 @@
1
- export { Html } from './web/Html.js';
2
- export { CycleRaycast } from './web/CycleRaycast.js';
3
- export { useCursor } from './web/useCursor.js';
4
- export { Loader } from './web/Loader.js';
5
- export { DragControls } from './web/DragControls.js';
6
- export { Scroll, ScrollControls, useScroll } from './web/ScrollControls.js';
7
- export { PresentationControls } from './web/PresentationControls.js';
8
- export { KeyboardControls, useKeyboardControls } from './web/KeyboardControls.js';
9
- export { Select, useSelect } from './web/Select.js';
10
- export { Billboard } from './core/Billboard.js';
11
- export { ScreenSpace } from './core/ScreenSpace.js';
12
- export { ScreenSizer } from './core/ScreenSizer.js';
13
- export { QuadraticBezierLine } from './core/QuadraticBezierLine.js';
14
- export { CubicBezierLine } from './core/CubicBezierLine.js';
15
- export { CatmullRomLine } from './core/CatmullRomLine.js';
16
- export { Line } from './core/Line.js';
17
- export { PositionalAudio } from './core/PositionalAudio.js';
18
- export { Text } from './core/Text.js';
19
- export { Text3D } from './core/Text3D.js';
20
- export { Effects, isWebGL2Available } from './core/Effects.js';
21
- export { GradientTexture, GradientType } from './core/GradientTexture.js';
22
- export { Image } from './core/Image.js';
23
- export { Edges } from './core/Edges.js';
24
- export { Outlines } from './core/Outlines.js';
25
- export { Trail, useTrail } from './core/Trail.js';
26
- export { Sampler, useSurfaceSampler } from './core/Sampler.js';
27
- export { ComputedAttribute } from './core/ComputedAttribute.js';
28
- export { Clone } from './core/Clone.js';
29
- export { MarchingCube, MarchingCubes, MarchingPlane } from './core/MarchingCubes.js';
30
- export { Decal } from './core/Decal.js';
31
- export { Svg } from './core/Svg.js';
32
- export { Gltf, useGLTF } from './core/Gltf.js';
33
- export { AsciiRenderer } from './core/AsciiRenderer.js';
34
- export { Splat } from './core/Splat.js';
35
- export { OrthographicCamera } from './core/OrthographicCamera.js';
36
- export { PerspectiveCamera } from './core/PerspectiveCamera.js';
37
- export { CubeCamera, useCubeCamera } from './core/CubeCamera.js';
38
- export { DeviceOrientationControls } from './core/DeviceOrientationControls.js';
39
- export { FlyControls } from './core/FlyControls.js';
40
- export { MapControls } from './core/MapControls.js';
41
- export { OrbitControls } from './core/OrbitControls.js';
42
- export { TrackballControls } from './core/TrackballControls.js';
43
- export { ArcballControls } from './core/ArcballControls.js';
44
- export { TransformControls } from './core/TransformControls.js';
45
- export { PointerLockControls } from './core/PointerLockControls.js';
46
- export { FirstPersonControls } from './core/FirstPersonControls.js';
47
- export { CameraControls } from './core/CameraControls.js';
48
- export { default as CameraControlsImpl } from 'camera-controls';
49
- export { MotionPathControls, useMotion } from './core/MotionPathControls.js';
50
- export { GizmoHelper, useGizmoContext } from './core/GizmoHelper.js';
51
- export { GizmoViewcube } from './core/GizmoViewcube.js';
52
- export { GizmoViewport } from './core/GizmoViewport.js';
53
- export { Grid } from './core/Grid.js';
54
- export { CubeTexture, useCubeTexture } from './core/CubeTexture.js';
55
- export { Fbx, useFBX } from './core/Fbx.js';
56
- export { Ktx2, useKTX2 } from './core/Ktx2.js';
57
- export { Progress, useProgress } from './core/Progress.js';
58
- export { IsObject, Texture, useTexture } from './core/Texture.js';
59
- export { VideoTexture, useVideoTexture } from './core/VideoTexture.js';
60
- export { useFont } from './core/useFont.js';
61
- export { checkIfFrameIsEmpty, getFirstFrame, useSpriteLoader } from './core/useSpriteLoader.js';
62
- export { Helper, useHelper } from './core/Helper.js';
63
- export { Stats } from './core/Stats.js';
64
- export { StatsGl } from './core/StatsGl.js';
65
- export { useDepthBuffer } from './core/useDepthBuffer.js';
66
- export { useAspect } from './core/useAspect.js';
67
- export { useCamera } from './core/useCamera.js';
68
- export { DetectGPU, useDetectGPU } from './core/DetectGPU.js';
69
- export { Bvh, useBVH } from './core/Bvh.js';
70
- export { useContextBridge } from './core/useContextBridge.js';
71
- export { useAnimations } from './core/useAnimations.js';
72
- export { Fbo, useFBO } from './core/Fbo.js';
73
- export { useIntersect } from './core/useIntersect.js';
74
- export { useBoxProjectedEnv } from './core/useBoxProjectedEnv.js';
75
- export { BBAnchor } from './core/BBAnchor.js';
76
- export { TrailTexture, useTrailTexture } from './core/TrailTexture.js';
77
- export { Example } from './core/Example.js';
78
- export { SpriteAnimator, useSpriteAnimator } from './core/SpriteAnimator.js';
79
- export { CurveModifier } from './core/CurveModifier.js';
80
- export { MeshDistortMaterial } from './core/MeshDistortMaterial.js';
81
- export { MeshWobbleMaterial } from './core/MeshWobbleMaterial.js';
82
- export { MeshReflectorMaterial } from './core/MeshReflectorMaterial.js';
83
- export { MeshRefractionMaterial } from './core/MeshRefractionMaterial.js';
84
- export { MeshTransmissionMaterial } from './core/MeshTransmissionMaterial.js';
85
- export { MeshDiscardMaterial } from './core/MeshDiscardMaterial.js';
86
- export { MultiMaterial } from './core/MultiMaterial.js';
87
- export { PointMaterial, PointMaterialImpl } from './core/PointMaterial.js';
88
- export { shaderMaterial } from './core/shaderMaterial.js';
89
- export { SoftShadows } from './core/softShadows.js';
90
- export { Box, Capsule, Circle, Cone, Cylinder, Dodecahedron, Extrude, Icosahedron, Lathe, Octahedron, Plane, Polyhedron, Ring, Shape, Sphere, Tetrahedron, Torus, TorusKnot, Tube } from './core/shapes.js';
91
- export { RoundedBox, RoundedBoxGeometry } from './core/RoundedBox.js';
92
- export { ScreenQuad } from './core/ScreenQuad.js';
93
- export { Center } from './core/Center.js';
94
- export { Resize } from './core/Resize.js';
95
- export { Bounds, useBounds } from './core/Bounds.js';
96
- export { CameraShake } from './core/CameraShake.js';
97
- export { Float } from './core/Float.js';
98
- export { Stage } from './core/Stage.js';
99
- export { Backdrop } from './core/Backdrop.js';
100
- export { Shadow } from './core/Shadow.js';
101
- export { Caustics } from './core/Caustics.js';
102
- export { ContactShadows } from './core/ContactShadows.js';
103
- export { AccumulativeShadows, RandomizedLight, accumulativeContext } from './core/AccumulativeShadows.js';
104
- export { SpotLight, SpotLightShadow } from './core/SpotLight.js';
105
- export { Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal } from './core/Environment.js';
106
- export { Lightformer } from './core/Lightformer.js';
107
- export { Sky, calcPosFromAngles } from './core/Sky.js';
108
- export { Stars } from './core/Stars.js';
109
- export { Cloud, CloudInstance, Clouds } from './core/Cloud.js';
110
- export { Sparkles } from './core/Sparkles.js';
111
- export { useEnvironment } from './core/useEnvironment.js';
112
- export { MatcapTexture, useMatcapTexture } from './core/MatcapTexture.js';
113
- export { NormalTexture, useNormalTexture } from './core/NormalTexture.js';
114
- export { Wireframe } from './core/Wireframe.js';
115
- export { ShadowAlpha } from './core/ShadowAlpha.js';
116
- export { Point, Points, PointsBuffer, PositionPoint } from './core/Points.js';
117
- export { Instance, InstancedAttribute, Instances, Merged, PositionMesh, createInstances } from './core/Instances.js';
118
- export { Segment, SegmentObject, Segments } from './core/Segments.js';
119
- export { Detailed } from './core/Detailed.js';
120
- export { Preload } from './core/Preload.js';
121
- export { BakeShadows } from './core/BakeShadows.js';
122
- export { meshBounds } from './core/meshBounds.js';
123
- export { AdaptiveDpr } from './core/AdaptiveDpr.js';
124
- export { AdaptiveEvents } from './core/AdaptiveEvents.js';
125
- export { PerformanceMonitor, usePerformanceMonitor } from './core/PerformanceMonitor.js';
126
- export { RenderTexture } from './core/RenderTexture.js';
127
- export { RenderCubeTexture } from './core/RenderCubeTexture.js';
128
- export { Mask, useMask } from './core/Mask.js';
129
- export { Hud } from './core/Hud.js';
130
- export { Fisheye } from './core/Fisheye.js';
131
- export { MeshPortalMaterial } from './core/MeshPortalMaterial.js';
132
- export { calculateScaleFactor } from './core/calculateScaleFactor.js';
133
- export { View } from './web/View.js';
134
- export { PivotControls } from './web/pivotControls/index.js';
135
- export { ScreenVideoTexture } from './web/ScreenVideoTexture.js';
136
- export { WebcamVideoTexture } from './web/WebcamVideoTexture.js';
137
- export { FaceControls, useFaceControls } from './web/FaceControls.js';
138
- export { FaceLandmarker, FaceLandmarkerDefaults, useFaceLandmarker } from './web/FaceLandmarker.js';
139
- export { Facemesh, FacemeshDatas, FacemeshEye, FacemeshEyeDefaults } from './web/Facemesh.js';
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three"),t=require("./ConvolutionMaterial.cjs.js");require("../helpers/constants.cjs.js");exports.BlurPass=class{constructor({gl:r,resolution:i,width:n=500,height:s=500,minDepthThreshold:o=0,maxDepthThreshold:a=1,depthScale:l=0,depthToBlurRatioBias:u=.25}){this.renderToScreen=!1,this.renderTargetA=new e.WebGLRenderTarget(i,i,{minFilter:e.LinearFilter,magFilter:e.LinearFilter,stencilBuffer:!1,depthBuffer:!1,type:e.HalfFloatType}),this.renderTargetB=this.renderTargetA.clone(),this.convolutionMaterial=new t.ConvolutionMaterial,this.convolutionMaterial.setTexelSize(1/n,1/s),this.convolutionMaterial.setResolution(new e.Vector2(n,s)),this.scene=new e.Scene,this.camera=new e.Camera,this.convolutionMaterial.uniforms.minDepthThreshold.value=o,this.convolutionMaterial.uniforms.maxDepthThreshold.value=a,this.convolutionMaterial.uniforms.depthScale.value=l,this.convolutionMaterial.uniforms.depthToBlurRatioBias.value=u,this.convolutionMaterial.defines.USE_DEPTH=l>0;const h=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),c=new Float32Array([0,0,2,0,0,2]),d=new e.BufferGeometry;d.setAttribute("position",new e.BufferAttribute(h,3)),d.setAttribute("uv",new e.BufferAttribute(c,2)),this.screen=new e.Mesh(d,this.convolutionMaterial),this.screen.frustumCulled=!1,this.scene.add(this.screen)}render(e,t,r){const i=this.scene,n=this.camera,s=this.renderTargetA,o=this.renderTargetB;let a=this.convolutionMaterial,l=a.uniforms;l.depthBuffer.value=t.depthTexture;const u=a.kernel;let h,c,d,f=t;for(c=0,d=u.length-1;c<d;++c)h=1&c?o:s,l.kernel.value=u[c],l.inputBuffer.value=f.texture,e.setRenderTarget(h),e.render(i,n),f=h;l.kernel.value=u[c],l.inputBuffer.value=f.texture,e.setRenderTarget(this.renderToScreen?null:r),e.render(i,n)}};
@@ -1,23 +0,0 @@
1
- import { Mesh, Scene, WebGLRenderTarget, WebGLRenderer, Camera } from 'three';
2
- import { ConvolutionMaterial } from './ConvolutionMaterial';
3
- export interface BlurPassProps {
4
- gl: WebGLRenderer;
5
- resolution: number;
6
- width?: number;
7
- height?: number;
8
- minDepthThreshold?: number;
9
- maxDepthThreshold?: number;
10
- depthScale?: number;
11
- depthToBlurRatioBias?: number;
12
- }
13
- export declare class BlurPass {
14
- readonly renderTargetA: WebGLRenderTarget;
15
- readonly renderTargetB: WebGLRenderTarget;
16
- readonly convolutionMaterial: ConvolutionMaterial;
17
- readonly scene: Scene;
18
- readonly camera: Camera;
19
- readonly screen: Mesh;
20
- renderToScreen: boolean;
21
- constructor({ gl, resolution, width, height, minDepthThreshold, maxDepthThreshold, depthScale, depthToBlurRatioBias, }: BlurPassProps);
22
- render(renderer: any, inputBuffer: any, outputBuffer: any): void;
23
- }
@@ -1,72 +0,0 @@
1
- import { WebGLRenderTarget, LinearFilter, HalfFloatType, Vector2, Scene, Camera, BufferGeometry, BufferAttribute, Mesh } from 'three';
2
- import { ConvolutionMaterial } from './ConvolutionMaterial.js';
3
-
4
- class BlurPass {
5
- constructor({
6
- gl,
7
- resolution,
8
- width = 500,
9
- height = 500,
10
- minDepthThreshold = 0,
11
- maxDepthThreshold = 1,
12
- depthScale = 0,
13
- depthToBlurRatioBias = 0.25
14
- }) {
15
- this.renderToScreen = false;
16
- this.renderTargetA = new WebGLRenderTarget(resolution, resolution, {
17
- minFilter: LinearFilter,
18
- magFilter: LinearFilter,
19
- stencilBuffer: false,
20
- depthBuffer: false,
21
- type: HalfFloatType
22
- });
23
- this.renderTargetB = this.renderTargetA.clone();
24
- this.convolutionMaterial = new ConvolutionMaterial();
25
- this.convolutionMaterial.setTexelSize(1.0 / width, 1.0 / height);
26
- this.convolutionMaterial.setResolution(new Vector2(width, height));
27
- this.scene = new Scene();
28
- this.camera = new Camera();
29
- this.convolutionMaterial.uniforms.minDepthThreshold.value = minDepthThreshold;
30
- this.convolutionMaterial.uniforms.maxDepthThreshold.value = maxDepthThreshold;
31
- this.convolutionMaterial.uniforms.depthScale.value = depthScale;
32
- this.convolutionMaterial.uniforms.depthToBlurRatioBias.value = depthToBlurRatioBias;
33
- this.convolutionMaterial.defines.USE_DEPTH = depthScale > 0;
34
- const vertices = new Float32Array([-1, -1, 0, 3, -1, 0, -1, 3, 0]);
35
- const uvs = new Float32Array([0, 0, 2, 0, 0, 2]);
36
- const geometry = new BufferGeometry();
37
- geometry.setAttribute('position', new BufferAttribute(vertices, 3));
38
- geometry.setAttribute('uv', new BufferAttribute(uvs, 2));
39
- this.screen = new Mesh(geometry, this.convolutionMaterial);
40
- this.screen.frustumCulled = false;
41
- this.scene.add(this.screen);
42
- }
43
- render(renderer, inputBuffer, outputBuffer) {
44
- const scene = this.scene;
45
- const camera = this.camera;
46
- const renderTargetA = this.renderTargetA;
47
- const renderTargetB = this.renderTargetB;
48
- let material = this.convolutionMaterial;
49
- let uniforms = material.uniforms;
50
- uniforms.depthBuffer.value = inputBuffer.depthTexture;
51
- const kernel = material.kernel;
52
- let lastRT = inputBuffer;
53
- let destRT;
54
- let i, l;
55
- // Apply the multi-pass blur.
56
- for (i = 0, l = kernel.length - 1; i < l; ++i) {
57
- // Alternate between targets.
58
- destRT = (i & 1) === 0 ? renderTargetA : renderTargetB;
59
- uniforms.kernel.value = kernel[i];
60
- uniforms.inputBuffer.value = lastRT.texture;
61
- renderer.setRenderTarget(destRT);
62
- renderer.render(scene, camera);
63
- lastRT = destRT;
64
- }
65
- uniforms.kernel.value = kernel[i];
66
- uniforms.inputBuffer.value = lastRT.texture;
67
- renderer.setRenderTarget(this.renderToScreen ? null : outputBuffer);
68
- renderer.render(scene, camera);
69
- }
70
- }
71
-
72
- export { BlurPass };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three"),n=require("../helpers/constants.cjs.js");function r(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,t.get?t:{enumerable:!0,get:function(){return e[r]}})}})),n.default=e,Object.freeze(n)}var t=r(e);class i extends t.ShaderMaterial{constructor(e=new t.Vector2){super({uniforms:{inputBuffer:new t.Uniform(null),depthBuffer:new t.Uniform(null),resolution:new t.Uniform(new t.Vector2),texelSize:new t.Uniform(new t.Vector2),halfTexelSize:new t.Uniform(new t.Vector2),kernel:new t.Uniform(0),scale:new t.Uniform(1),cameraNear:new t.Uniform(0),cameraFar:new t.Uniform(1),minDepthThreshold:new t.Uniform(0),maxDepthThreshold:new t.Uniform(1),depthScale:new t.Uniform(0),depthToBlurRatioBias:new t.Uniform(.25)},fragmentShader:`#include <common>\n #include <dithering_pars_fragment> \n uniform sampler2D inputBuffer;\n uniform sampler2D depthBuffer;\n uniform float cameraNear;\n uniform float cameraFar;\n uniform float minDepthThreshold;\n uniform float maxDepthThreshold;\n uniform float depthScale;\n uniform float depthToBlurRatioBias;\n varying vec2 vUv;\n varying vec2 vUv0;\n varying vec2 vUv1;\n varying vec2 vUv2;\n varying vec2 vUv3;\n\n void main() {\n float depthFactor = 0.0;\n \n #ifdef USE_DEPTH\n vec4 depth = texture2D(depthBuffer, vUv);\n depthFactor = smoothstep(minDepthThreshold, maxDepthThreshold, 1.0-(depth.r * depth.a));\n depthFactor *= depthScale;\n depthFactor = max(0.0, min(1.0, depthFactor + 0.25));\n #endif\n \n vec4 sum = texture2D(inputBuffer, mix(vUv0, vUv, depthFactor));\n sum += texture2D(inputBuffer, mix(vUv1, vUv, depthFactor));\n sum += texture2D(inputBuffer, mix(vUv2, vUv, depthFactor));\n sum += texture2D(inputBuffer, mix(vUv3, vUv, depthFactor));\n gl_FragColor = sum * 0.25 ;\n\n #include <dithering_fragment>\n #include <tonemapping_fragment>\n #include <${n.version>=154?"colorspace_fragment":"encodings_fragment"}>\n }`,vertexShader:"uniform vec2 texelSize;\n uniform vec2 halfTexelSize;\n uniform float kernel;\n uniform float scale;\n varying vec2 vUv;\n varying vec2 vUv0;\n varying vec2 vUv1;\n varying vec2 vUv2;\n varying vec2 vUv3;\n\n void main() {\n vec2 uv = position.xy * 0.5 + 0.5;\n vUv = uv;\n\n vec2 dUv = (texelSize * vec2(kernel) + halfTexelSize) * scale;\n vUv0 = vec2(uv.x - dUv.x, uv.y + dUv.y);\n vUv1 = vec2(uv.x + dUv.x, uv.y + dUv.y);\n vUv2 = vec2(uv.x + dUv.x, uv.y - dUv.y);\n vUv3 = vec2(uv.x - dUv.x, uv.y - dUv.y);\n\n gl_Position = vec4(position.xy, 1.0, 1.0);\n }",blending:t.NoBlending,depthWrite:!1,depthTest:!1}),this.toneMapped=!1,this.setTexelSize(e.x,e.y),this.kernel=new Float32Array([0,1,2,2,3])}setTexelSize(e,n){this.uniforms.texelSize.value.set(e,n),this.uniforms.halfTexelSize.value.set(e,n).multiplyScalar(.5)}setResolution(e){this.uniforms.resolution.value.copy(e)}}exports.ConvolutionMaterial=i;
@@ -1,7 +0,0 @@
1
- import * as THREE from 'three';
2
- export declare class ConvolutionMaterial extends THREE.ShaderMaterial {
3
- readonly kernel: Float32Array;
4
- constructor(texelSize?: THREE.Vector2);
5
- setTexelSize(x: number, y: number): void;
6
- setResolution(resolution: THREE.Vector2): void;
7
- }
@@ -1,97 +0,0 @@
1
- import * as THREE from 'three';
2
- import { version } from '../helpers/constants.js';
3
-
4
- class ConvolutionMaterial extends THREE.ShaderMaterial {
5
- constructor(texelSize = new THREE.Vector2()) {
6
- super({
7
- uniforms: {
8
- inputBuffer: new THREE.Uniform(null),
9
- depthBuffer: new THREE.Uniform(null),
10
- resolution: new THREE.Uniform(new THREE.Vector2()),
11
- texelSize: new THREE.Uniform(new THREE.Vector2()),
12
- halfTexelSize: new THREE.Uniform(new THREE.Vector2()),
13
- kernel: new THREE.Uniform(0.0),
14
- scale: new THREE.Uniform(1.0),
15
- cameraNear: new THREE.Uniform(0.0),
16
- cameraFar: new THREE.Uniform(1.0),
17
- minDepthThreshold: new THREE.Uniform(0.0),
18
- maxDepthThreshold: new THREE.Uniform(1.0),
19
- depthScale: new THREE.Uniform(0.0),
20
- depthToBlurRatioBias: new THREE.Uniform(0.25)
21
- },
22
- fragmentShader: `#include <common>
23
- #include <dithering_pars_fragment>
24
- uniform sampler2D inputBuffer;
25
- uniform sampler2D depthBuffer;
26
- uniform float cameraNear;
27
- uniform float cameraFar;
28
- uniform float minDepthThreshold;
29
- uniform float maxDepthThreshold;
30
- uniform float depthScale;
31
- uniform float depthToBlurRatioBias;
32
- varying vec2 vUv;
33
- varying vec2 vUv0;
34
- varying vec2 vUv1;
35
- varying vec2 vUv2;
36
- varying vec2 vUv3;
37
-
38
- void main() {
39
- float depthFactor = 0.0;
40
-
41
- #ifdef USE_DEPTH
42
- vec4 depth = texture2D(depthBuffer, vUv);
43
- depthFactor = smoothstep(minDepthThreshold, maxDepthThreshold, 1.0-(depth.r * depth.a));
44
- depthFactor *= depthScale;
45
- depthFactor = max(0.0, min(1.0, depthFactor + 0.25));
46
- #endif
47
-
48
- vec4 sum = texture2D(inputBuffer, mix(vUv0, vUv, depthFactor));
49
- sum += texture2D(inputBuffer, mix(vUv1, vUv, depthFactor));
50
- sum += texture2D(inputBuffer, mix(vUv2, vUv, depthFactor));
51
- sum += texture2D(inputBuffer, mix(vUv3, vUv, depthFactor));
52
- gl_FragColor = sum * 0.25 ;
53
-
54
- #include <dithering_fragment>
55
- #include <tonemapping_fragment>
56
- #include <${version >= 154 ? 'colorspace_fragment' : 'encodings_fragment'}>
57
- }`,
58
- vertexShader: `uniform vec2 texelSize;
59
- uniform vec2 halfTexelSize;
60
- uniform float kernel;
61
- uniform float scale;
62
- varying vec2 vUv;
63
- varying vec2 vUv0;
64
- varying vec2 vUv1;
65
- varying vec2 vUv2;
66
- varying vec2 vUv3;
67
-
68
- void main() {
69
- vec2 uv = position.xy * 0.5 + 0.5;
70
- vUv = uv;
71
-
72
- vec2 dUv = (texelSize * vec2(kernel) + halfTexelSize) * scale;
73
- vUv0 = vec2(uv.x - dUv.x, uv.y + dUv.y);
74
- vUv1 = vec2(uv.x + dUv.x, uv.y + dUv.y);
75
- vUv2 = vec2(uv.x + dUv.x, uv.y - dUv.y);
76
- vUv3 = vec2(uv.x - dUv.x, uv.y - dUv.y);
77
-
78
- gl_Position = vec4(position.xy, 1.0, 1.0);
79
- }`,
80
- blending: THREE.NoBlending,
81
- depthWrite: false,
82
- depthTest: false
83
- });
84
- this.toneMapped = false;
85
- this.setTexelSize(texelSize.x, texelSize.y);
86
- this.kernel = new Float32Array([0.0, 1.0, 2.0, 2.0, 3.0]);
87
- }
88
- setTexelSize(x, y) {
89
- this.uniforms.texelSize.value.set(x, y);
90
- this.uniforms.halfTexelSize.value.set(x, y).multiplyScalar(0.5);
91
- }
92
- setResolution(resolution) {
93
- this.uniforms.resolution.value.copy(resolution);
94
- }
95
- }
96
-
97
- export { ConvolutionMaterial };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../core/shaderMaterial.cjs.js");require("three");const r=e.shaderMaterial({},"void main() { }","void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }");exports.DiscardMaterial=r;
@@ -1,3 +0,0 @@
1
- export declare const DiscardMaterial: import("@react-three/fiber").ConstructorRepresentation<import("three").ShaderMaterial> & {
2
- key: string;
3
- };
@@ -1,5 +0,0 @@
1
- import { shaderMaterial } from '../core/shaderMaterial.js';
2
-
3
- const DiscardMaterial = /* @__PURE__ */shaderMaterial({}, 'void main() { }', 'void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }');
4
-
5
- export { DiscardMaterial };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three");class t extends e.MeshStandardMaterial{constructor(e={}){super(e),this._tDepth={value:null},this._distortionMap={value:null},this._tDiffuse={value:null},this._tDiffuseBlur={value:null},this._textureMatrix={value:null},this._hasBlur={value:!1},this._mirror={value:0},this._mixBlur={value:0},this._blurStrength={value:.5},this._minDepthThreshold={value:.9},this._maxDepthThreshold={value:1},this._depthScale={value:0},this._depthToBlurRatioBias={value:.25},this._distortion={value:1},this._mixContrast={value:1},this.setValues(e)}onBeforeCompile(e){var t;null!=(t=e.defines)&&t.USE_UV||(e.defines.USE_UV=""),e.uniforms.hasBlur=this._hasBlur,e.uniforms.tDiffuse=this._tDiffuse,e.uniforms.tDepth=this._tDepth,e.uniforms.distortionMap=this._distortionMap,e.uniforms.tDiffuseBlur=this._tDiffuseBlur,e.uniforms.textureMatrix=this._textureMatrix,e.uniforms.mirror=this._mirror,e.uniforms.mixBlur=this._mixBlur,e.uniforms.mixStrength=this._blurStrength,e.uniforms.minDepthThreshold=this._minDepthThreshold,e.uniforms.maxDepthThreshold=this._maxDepthThreshold,e.uniforms.depthScale=this._depthScale,e.uniforms.depthToBlurRatioBias=this._depthToBlurRatioBias,e.uniforms.distortion=this._distortion,e.uniforms.mixContrast=this._mixContrast,e.vertexShader=`\n uniform mat4 textureMatrix;\n varying vec4 my_vUv;\n ${e.vertexShader}`,e.vertexShader=e.vertexShader.replace("#include <project_vertex>","#include <project_vertex>\n my_vUv = textureMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );"),e.fragmentShader=`\n uniform sampler2D tDiffuse;\n uniform sampler2D tDiffuseBlur;\n uniform sampler2D tDepth;\n uniform sampler2D distortionMap;\n uniform float distortion;\n uniform float cameraNear;\n\t\t\t uniform float cameraFar;\n uniform bool hasBlur;\n uniform float mixBlur;\n uniform float mirror;\n uniform float mixStrength;\n uniform float minDepthThreshold;\n uniform float maxDepthThreshold;\n uniform float mixContrast;\n uniform float depthScale;\n uniform float depthToBlurRatioBias;\n varying vec4 my_vUv;\n ${e.fragmentShader}`,e.fragmentShader=e.fragmentShader.replace("#include <emissivemap_fragment>","#include <emissivemap_fragment>\n\n float distortionFactor = 0.0;\n #ifdef USE_DISTORTION\n distortionFactor = texture2D(distortionMap, vUv).r * distortion;\n #endif\n\n vec4 new_vUv = my_vUv;\n new_vUv.x += distortionFactor;\n new_vUv.y += distortionFactor;\n\n vec4 base = texture2DProj(tDiffuse, new_vUv);\n vec4 blur = texture2DProj(tDiffuseBlur, new_vUv);\n\n vec4 merge = base;\n\n #ifdef USE_NORMALMAP\n vec2 normal_uv = vec2(0.0);\n vec4 normalColor = texture2D(normalMap, vUv * normalScale);\n vec3 my_normal = normalize( vec3( normalColor.r * 2.0 - 1.0, normalColor.b, normalColor.g * 2.0 - 1.0 ) );\n vec3 coord = new_vUv.xyz / new_vUv.w;\n normal_uv = coord.xy + coord.z * my_normal.xz * 0.05;\n vec4 base_normal = texture2D(tDiffuse, normal_uv);\n vec4 blur_normal = texture2D(tDiffuseBlur, normal_uv);\n merge = base_normal;\n blur = blur_normal;\n #endif\n\n float depthFactor = 0.0001;\n float blurFactor = 0.0;\n\n #ifdef USE_DEPTH\n vec4 depth = texture2DProj(tDepth, new_vUv);\n depthFactor = smoothstep(minDepthThreshold, maxDepthThreshold, 1.0-(depth.r * depth.a));\n depthFactor *= depthScale;\n depthFactor = max(0.0001, min(1.0, depthFactor));\n\n #ifdef USE_BLUR\n blur = blur * min(1.0, depthFactor + depthToBlurRatioBias);\n merge = merge * min(1.0, depthFactor + 0.5);\n #else\n merge = merge * depthFactor;\n #endif\n\n #endif\n\n float reflectorRoughnessFactor = roughness;\n #ifdef USE_ROUGHNESSMAP\n vec4 reflectorTexelRoughness = texture2D( roughnessMap, vUv );\n reflectorRoughnessFactor *= reflectorTexelRoughness.g;\n #endif\n\n #ifdef USE_BLUR\n blurFactor = min(1.0, mixBlur * reflectorRoughnessFactor);\n merge = mix(merge, blur, blurFactor);\n #endif\n\n vec4 newMerge = vec4(0.0, 0.0, 0.0, 1.0);\n newMerge.r = (merge.r - 0.5) * mixContrast + 0.5;\n newMerge.g = (merge.g - 0.5) * mixContrast + 0.5;\n newMerge.b = (merge.b - 0.5) * mixContrast + 0.5;\n\n diffuseColor.rgb = diffuseColor.rgb * ((1.0 - min(1.0, mirror)) + newMerge.rgb * mixStrength);\n ")}get tDiffuse(){return this._tDiffuse.value}set tDiffuse(e){this._tDiffuse.value=e}get tDepth(){return this._tDepth.value}set tDepth(e){this._tDepth.value=e}get distortionMap(){return this._distortionMap.value}set distortionMap(e){this._distortionMap.value=e}get tDiffuseBlur(){return this._tDiffuseBlur.value}set tDiffuseBlur(e){this._tDiffuseBlur.value=e}get textureMatrix(){return this._textureMatrix.value}set textureMatrix(e){this._textureMatrix.value=e}get hasBlur(){return this._hasBlur.value}set hasBlur(e){this._hasBlur.value=e}get mirror(){return this._mirror.value}set mirror(e){this._mirror.value=e}get mixBlur(){return this._mixBlur.value}set mixBlur(e){this._mixBlur.value=e}get mixStrength(){return this._blurStrength.value}set mixStrength(e){this._blurStrength.value=e}get minDepthThreshold(){return this._minDepthThreshold.value}set minDepthThreshold(e){this._minDepthThreshold.value=e}get maxDepthThreshold(){return this._maxDepthThreshold.value}set maxDepthThreshold(e){this._maxDepthThreshold.value=e}get depthScale(){return this._depthScale.value}set depthScale(e){this._depthScale.value=e}get depthToBlurRatioBias(){return this._depthToBlurRatioBias.value}set depthToBlurRatioBias(e){this._depthToBlurRatioBias.value=e}get distortion(){return this._distortion.value}set distortion(e){this._distortion.value=e}get mixContrast(){return this._mixContrast.value}set mixContrast(e){this._mixContrast.value=e}}exports.MeshReflectorMaterial=t;
@@ -1,50 +0,0 @@
1
- import { Matrix4, MeshStandardMaterial, Texture } from 'three';
2
- export declare class MeshReflectorMaterial extends MeshStandardMaterial {
3
- private _tDepth;
4
- private _distortionMap;
5
- private _tDiffuse;
6
- private _tDiffuseBlur;
7
- private _textureMatrix;
8
- private _hasBlur;
9
- private _mirror;
10
- private _mixBlur;
11
- private _blurStrength;
12
- private _minDepthThreshold;
13
- private _maxDepthThreshold;
14
- private _depthScale;
15
- private _depthToBlurRatioBias;
16
- private _distortion;
17
- private _mixContrast;
18
- constructor(parameters?: {});
19
- onBeforeCompile(shader: any): void;
20
- get tDiffuse(): Texture | null;
21
- set tDiffuse(v: Texture | null);
22
- get tDepth(): Texture | null;
23
- set tDepth(v: Texture | null);
24
- get distortionMap(): Texture | null;
25
- set distortionMap(v: Texture | null);
26
- get tDiffuseBlur(): Texture | null;
27
- set tDiffuseBlur(v: Texture | null);
28
- get textureMatrix(): Matrix4 | null;
29
- set textureMatrix(v: Matrix4 | null);
30
- get hasBlur(): boolean;
31
- set hasBlur(v: boolean);
32
- get mirror(): number;
33
- set mirror(v: number);
34
- get mixBlur(): number;
35
- set mixBlur(v: number);
36
- get mixStrength(): number;
37
- set mixStrength(v: number);
38
- get minDepthThreshold(): number;
39
- set minDepthThreshold(v: number);
40
- get maxDepthThreshold(): number;
41
- set maxDepthThreshold(v: number);
42
- get depthScale(): number;
43
- set depthScale(v: number);
44
- get depthToBlurRatioBias(): number;
45
- set depthToBlurRatioBias(v: number);
46
- get distortion(): number;
47
- set distortion(v: number);
48
- get mixContrast(): number;
49
- set mixContrast(v: number);
50
- }