@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.
- package/README.md +3 -6
- package/assets/cloud.base64.cjs.js +1 -1
- package/assets/cloud.base64.d.ts +1 -2
- package/assets/cloud.base64.js +2 -3
- package/core/AdaptiveDpr.js +2 -2
- package/core/AdaptiveEvents.js +2 -3
- package/core/ArcballControls.js +2 -3
- package/core/Billboard.d.ts +1 -1
- package/core/Bounds.js +1 -2
- package/core/CameraShake.js +1 -1
- package/core/Center.d.ts +1 -1
- package/core/Center.js +1 -1
- package/core/Cloud.cjs.js +1 -1
- package/core/Cloud.js +1 -1
- package/core/ContactShadows.d.ts +1 -1
- package/core/CubeCamera.js +1 -2
- package/core/Detailed.d.ts +1 -1
- package/core/Environment.js +1 -1
- package/core/GizmoHelper.js +1 -1
- package/core/Image.d.ts +1 -1
- package/core/Instances.d.ts +2 -2
- package/core/Line.d.ts +1 -1
- package/core/MeshDistortMaterial.d.ts +1 -1
- package/core/MeshReflectorMaterial.cjs.js +1 -1
- package/core/MeshReflectorMaterial.d.ts +2 -4
- package/core/MeshReflectorMaterial.js +4 -8
- package/core/MeshWobbleMaterial.d.ts +1 -1
- package/core/OrbitControls.js +2 -3
- package/core/OrthographicCamera.cjs.js +1 -1
- package/core/OrthographicCamera.d.ts +1 -1
- package/core/OrthographicCamera.js +1 -2
- package/core/PerspectiveCamera.cjs.js +1 -1
- package/core/PerspectiveCamera.d.ts +1 -1
- package/core/PerspectiveCamera.js +1 -2
- package/core/Points.d.ts +2 -2
- package/core/PositionalAudio.d.ts +1 -1
- package/core/Preload.js +1 -1
- package/core/Reflector.cjs.js +1 -1
- package/core/Reflector.d.ts +2 -4
- package/core/Reflector.js +4 -8
- package/core/RoundedBox.d.ts +1 -1
- package/core/ScreenQuad.d.ts +1 -1
- package/core/Shadow.d.ts +1 -1
- package/core/SpotLight.d.ts +1 -1
- package/core/Stage.js +1 -2
- package/core/Stats.cjs.js +1 -1
- package/core/Stats.js +1 -1
- package/core/Text.d.ts +1 -1
- package/core/TrackballControls.js +2 -3
- package/core/TransformControls.d.ts +1 -1
- package/core/index.cjs.js +1 -1
- package/core/index.d.ts +0 -1
- package/core/index.js +1 -2
- package/core/shaderMaterial.d.ts +6 -11
- package/core/shapes.cjs.js +1 -1
- package/core/shapes.d.ts +21 -25
- package/core/shapes.js +1 -2
- package/core/useAnimations.js +1 -1
- package/core/useFBO.js +2 -2
- package/helpers/useEffectfulState.cjs.js +1 -1
- package/helpers/useEffectfulState.d.ts +1 -1
- package/helpers/useEffectfulState.js +2 -2
- package/index.cjs.js +1 -1
- package/index.js +1 -2
- package/materials/MeshReflectorMaterial.cjs.js +1 -1
- package/materials/MeshReflectorMaterial.d.ts +4 -12
- package/materials/MeshReflectorMaterial.js +10 -38
- package/native/index.cjs.js +1 -1
- package/native/index.js +1 -2
- package/package.json +2 -2
- package/web/Html.js +1 -2
- package/web/index.cjs.js +1 -1
- package/web/index.js +1 -2
- package/core/DepthBuffer.cjs.js +0 -1
- package/core/DepthBuffer.d.ts +0 -5
- 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
|

|
|
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="
|
|
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
|
|
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:
|