@react-three/drei 8.10.5 → 8.10.6
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 +2 -2
- package/core/useHelper.d.ts +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1456,7 +1456,7 @@ A very fast, but often good-enough bounds-only raycast for meshes. You can use t
|
|
|
1456
1456
|
|
|
1457
1457
|
#### AdaptiveDpr
|
|
1458
1458
|
|
|
1459
|
-
Drop this component into your scene and it will cut the pixel-ratio on
|
|
1459
|
+
Drop this component into your scene and it will cut the pixel-ratio on regress according to the canvas's performance min/max settings. This allows you to temporarily reduce visual quality in exchange for more performance, for instance when the camera moves (look into drei's controls regress flag). Optionally, you can set the canvas to a pixelated filter, which would be even faster.
|
|
1460
1460
|
|
|
1461
1461
|
```jsx
|
|
1462
1462
|
<AdaptiveDpr pixelated />
|
|
@@ -1489,7 +1489,7 @@ useBVH(mesh)
|
|
|
1489
1489
|
|
|
1490
1490
|
[](https://drei.pmnd.rs/?path=/story/staging-center--default-story)
|
|
1491
1491
|
|
|
1492
|
-
Calculates a boundary box and centers its children accordingly. `alignTop`
|
|
1492
|
+
Calculates a boundary box and centers its children accordingly. `alignTop` adjusts it so that it sits flush on y=0.
|
|
1493
1493
|
|
|
1494
1494
|
```jsx
|
|
1495
1495
|
<Center alignTop>
|
package/core/useHelper.d.ts
CHANGED
|
@@ -4,5 +4,7 @@ import { Falsey } from 'utility-types';
|
|
|
4
4
|
declare type Helper = Object3D & {
|
|
5
5
|
update: () => void;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
declare type Constructor = new (...args: any[]) => any;
|
|
8
|
+
declare type Rest<T> = T extends [infer _, ...infer R] ? R : never;
|
|
9
|
+
export declare function useHelper<T extends Constructor>(object3D: React.MutableRefObject<Object3D | undefined> | Falsey | undefined, helperConstructor: T, ...args: Rest<ConstructorParameters<T>>): React.MutableRefObject<Helper | undefined>;
|
|
8
10
|
export {};
|