@react-three/drei 9.105.6 → 9.106.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
CHANGED
|
@@ -437,6 +437,8 @@ type ScrollControlsProps = {
|
|
|
437
437
|
* then a maxSpeed of e.g. 0.1 which will clamp the speed to 0.1 units per second, it may now
|
|
438
438
|
* take much longer than damping to reach the target if it is far away. Default: Infinity */
|
|
439
439
|
maxSpeed?: number
|
|
440
|
+
/** If true attaches the scroll container before the canvas */
|
|
441
|
+
prepend?: boolean
|
|
440
442
|
enabled?: boolean
|
|
441
443
|
style?: React.CSSProperties
|
|
442
444
|
children: React.ReactNode
|
|
@@ -3231,11 +3233,11 @@ const envMap = useCubeTexture(['px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png',
|
|
|
3231
3233
|
<a href="https://codesandbox.io/s/2cemck"><img width="20%" src="https://codesandbox.io/api/v1/sandboxes/2cemck/screenshot.png?v2" alt="Demo"/></a>
|
|
3232
3234
|
</p>
|
|
3233
3235
|
|
|
3234
|
-
A convenience hook that returns a `THREE.VideoTexture` and integrates loading into suspense. By default it falls back until the `
|
|
3236
|
+
A convenience hook that returns a `THREE.VideoTexture` and integrates loading into suspense. By default it falls back until the `loadedmetadata` event. Then it starts playing the video, which, if the video is muted, is allowed in the browser without user interaction.
|
|
3235
3237
|
|
|
3236
3238
|
```tsx
|
|
3237
3239
|
type VideoTextureProps = {
|
|
3238
|
-
unsuspend?: 'canplay' | 'canplaythrough' | 'loadedmetadata'
|
|
3240
|
+
unsuspend?: 'canplay' | 'canplaythrough' | 'loadstart' | 'loadedmetadata'
|
|
3239
3241
|
muted?: boolean
|
|
3240
3242
|
loop?: boolean
|
|
3241
3243
|
start?: boolean
|
|
@@ -3244,7 +3246,7 @@ type VideoTextureProps = {
|
|
|
3244
3246
|
|
|
3245
3247
|
export function useVideoTexture(src: string, props: VideoTextureProps) {
|
|
3246
3248
|
const { unsuspend, start, crossOrigin, muted, loop } = {
|
|
3247
|
-
unsuspend: '
|
|
3249
|
+
unsuspend: 'loadedmetadata',
|
|
3248
3250
|
crossOrigin: 'Anonymous',
|
|
3249
3251
|
muted: true,
|
|
3250
3252
|
loop: true,
|