@react-three/drei 7.27.2 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +3 -6
  2. package/assets/cloud.base64.cjs.js +1 -1
  3. package/assets/cloud.base64.d.ts +1 -2
  4. package/assets/cloud.base64.js +2 -3
  5. package/core/AdaptiveDpr.js +2 -2
  6. package/core/AdaptiveEvents.js +2 -3
  7. package/core/ArcballControls.js +2 -3
  8. package/core/Billboard.d.ts +1 -1
  9. package/core/Bounds.js +1 -2
  10. package/core/CameraShake.js +1 -1
  11. package/core/Center.d.ts +1 -1
  12. package/core/Center.js +1 -1
  13. package/core/Cloud.cjs.js +1 -1
  14. package/core/Cloud.js +1 -1
  15. package/core/ContactShadows.d.ts +1 -1
  16. package/core/CubeCamera.js +1 -2
  17. package/core/Detailed.d.ts +1 -1
  18. package/core/Environment.js +1 -1
  19. package/core/GizmoHelper.js +1 -1
  20. package/core/Image.d.ts +1 -1
  21. package/core/Instances.d.ts +2 -2
  22. package/core/Line.d.ts +1 -1
  23. package/core/MeshDistortMaterial.d.ts +1 -1
  24. package/core/MeshReflectorMaterial.cjs.js +1 -1
  25. package/core/MeshReflectorMaterial.d.ts +2 -4
  26. package/core/MeshReflectorMaterial.js +4 -8
  27. package/core/MeshWobbleMaterial.d.ts +1 -1
  28. package/core/OrbitControls.js +2 -3
  29. package/core/OrthographicCamera.cjs.js +1 -1
  30. package/core/OrthographicCamera.d.ts +1 -1
  31. package/core/OrthographicCamera.js +1 -2
  32. package/core/PerspectiveCamera.cjs.js +1 -1
  33. package/core/PerspectiveCamera.d.ts +1 -1
  34. package/core/PerspectiveCamera.js +1 -2
  35. package/core/Points.d.ts +2 -2
  36. package/core/PositionalAudio.d.ts +1 -1
  37. package/core/Preload.js +1 -1
  38. package/core/Reflector.cjs.js +1 -1
  39. package/core/Reflector.d.ts +2 -4
  40. package/core/Reflector.js +4 -8
  41. package/core/RoundedBox.d.ts +1 -1
  42. package/core/ScreenQuad.d.ts +1 -1
  43. package/core/Shadow.d.ts +1 -1
  44. package/core/SpotLight.d.ts +1 -1
  45. package/core/Stage.js +1 -2
  46. package/core/Stats.cjs.js +1 -1
  47. package/core/Stats.js +1 -1
  48. package/core/Text.d.ts +1 -1
  49. package/core/TrackballControls.js +2 -3
  50. package/core/TransformControls.d.ts +1 -1
  51. package/core/index.cjs.js +1 -1
  52. package/core/index.d.ts +0 -1
  53. package/core/index.js +1 -2
  54. package/core/shaderMaterial.d.ts +6 -11
  55. package/core/shapes.cjs.js +1 -1
  56. package/core/shapes.d.ts +21 -25
  57. package/core/shapes.js +1 -2
  58. package/core/useAnimations.js +1 -1
  59. package/core/useFBO.js +2 -2
  60. package/helpers/useEffectfulState.cjs.js +1 -1
  61. package/helpers/useEffectfulState.d.ts +1 -1
  62. package/helpers/useEffectfulState.js +2 -2
  63. package/index.cjs.js +1 -1
  64. package/index.js +1 -2
  65. package/materials/MeshReflectorMaterial.cjs.js +1 -1
  66. package/materials/MeshReflectorMaterial.d.ts +4 -12
  67. package/materials/MeshReflectorMaterial.js +10 -38
  68. package/native/index.cjs.js +1 -1
  69. package/native/index.js +1 -2
  70. package/package.json +2 -2
  71. package/web/Html.js +1 -2
  72. package/web/index.cjs.js +1 -1
  73. package/web/index.js +1 -2
  74. package/core/DepthBuffer.cjs.js +0 -1
  75. package/core/DepthBuffer.d.ts +0 -5
  76. package/core/DepthBuffer.js +0 -36
package/README.md CHANGED
@@ -147,7 +147,6 @@ The `native` route of the library **does not** export `Html` or `Loader`. The de
147
147
  <li><a href="#shapes">Dodecahedron</a></li>
148
148
  <li><a href="#shapes">Extrude</a></li>
149
149
  <li><a href="#shapes">Lathe</a></li>
150
- <li><a href="#shapes">Parametric</a></li>
151
150
  <li><a href="#roundedbox">RoundedBox</a></li>
152
151
  <li><a href="#screenquad">Screenquad</a></li>
153
152
  </ul>
@@ -279,7 +278,7 @@ If you are using other controls (Orbit, Trackball, etc), you will notice how the
279
278
  ![](https://img.shields.io/badge/-Dom only-red)
280
279
 
281
280
  <p align="center">
282
- <a href="https://codesandbox.io/s/l4klb"><img width="16%" src="https://codesandbox.io/api/v1/sandboxes/l4klb/screenshot.png" alt="Horizintal tiles"/></a>
281
+ <a href="https://codesandbox.io/s/l4klb"><img width="16%" src="https://codesandbox.io/api/v1/sandboxes/l4klb/screenshot.png" alt="Horizontal tiles"/></a>
283
282
  <a href="https://codesandbox.io/s/4m0d0"><img width="16%" src="https://codesandbox.io/api/v1/sandboxes/4m0d0/screenshot.png" alt="M1 scroll"/></a>
284
283
  <a href="https://codesandbox.io/s/gsm1y"><img width="16%" src="https://codesandbox.io/api/v1/sandboxes/gsm1y/screenshot.png" alt="useIntersect"/></a>
285
284
  <a href="https://codesandbox.io/s/x8gvs"><img width="16%" src="https://codesandbox.io/api/v1/sandboxes/x8gvs/screenshot.png" alt="Infinite scroll"/></a>
@@ -363,7 +362,7 @@ Semi-OrbitControls with spring-physics, polar zoom and snap-back, for presentati
363
362
 
364
363
  # Shapes
365
364
 
366
- [Buffer-geometry](https://threejs.org/docs/index.html#api/en/core/BufferGeometry) short-cuts for Plane, Box, Sphere, Circle, Cone, Cylinder, Tube, Torus, TorusKnot, Ring, Tetrahedron, Polyhedron, Icosahedron, Octahedron, Dodecahedron, Extrude, Lathe, Parametric.
365
+ [Buffer-geometry](https://threejs.org/docs/index.html#api/en/core/BufferGeometry) short-cuts for Plane, Box, Sphere, Circle, Cone, Cylinder, Tube, Torus, TorusKnot, Ring, Tetrahedron, Polyhedron, Icosahedron, Octahedron, Dodecahedron, Extrude, Lathe.
367
366
 
368
367
  ```jsx
369
368
  <Plane args={[2, 2]} />
@@ -618,15 +617,13 @@ Easily add reflections and/or blur to any mesh. It takes surface roughness into
618
617
  blur={[0, 0]} // Blur ground reflections (width, heigt), 0 skips blur
619
618
  mixBlur={0} // How much blur mixes with surface roughness (default = 1)
620
619
  mixStrength={1} // Strength of the reflections
620
+ mixContrast={1} // Contrast of the reflections
621
621
  resolution={256} // Off-buffer resolution, lower=faster, higher=better quality, slower
622
622
  mirror={0} // Mirror environment, 0 = texture colors, 1 = pick up env colors
623
623
  depthScale={0} // Scale the depth factor (0 = no depth, default = 0)
624
624
  minDepthThreshold={0.9} // Lower edge for the depthTexture interpolation (default = 0)
625
625
  maxDepthThreshold={1} // Upper edge for the depthTexture interpolation (default = 0)
626
626
  depthToBlurRatioBias={0.25} // Adds a bias factor to the depthTexture before calculating the blur amount [blurFactor = blurTexture * (depthTexture + bias)]. It accepts values between 0 and 1, default is 0.25. An amount > 0 of bias makes sure that the blurTexture is not too sharp because of the multiplication with the depthTexture
627
- gamma={1} // Reflection layer gamma
628
- contrast={1} // Reflection layer contrast
629
- brightness={0} // Reflection layer brightness
630
627
  distortion={1} // Amount of distortion based on the distortionMap texture
631
628
  distortionMap={distortionTexture} // The red channel of this texture is used as the distortion map. Default is null
632
629
  debug={0} /* Depending on the assigned value, one of the following channels is shown: