File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ The rendertarget is automatically disposed when unmounted.
31
31
` ` ` tsx
32
32
export type FboProps = {
33
33
children? : (renderTarget : Fbo ) => React .ReactNode
34
- width: UseFBOParams [0 ]
35
- height: UseFBOParams [1 ]
34
+ width? : UseFBOParams [0 ]
35
+ height? : UseFBOParams [1 ]
36
36
} & FBOSettings
37
37
` ` `
38
38
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ import * as React from 'react'
2
2
import * as THREE from 'three'
3
3
import { useThree } from '@react-three/fiber'
4
4
import { forwardRef , useImperativeHandle } from 'react'
5
-
6
- type WebGLRenderTargetCtorParams = ConstructorParameters < typeof THREE . WebGLRenderTarget >
7
- type WebGLRenderTargetOptions = WebGLRenderTargetCtorParams [ 2 ]
5
+ import { type WebGLRenderTargetOptions } from 'three'
8
6
9
7
type FBOSettings = {
10
8
/** @deprecated use `depthBuffer` instead. If set, the scene depth will be rendered into buffer.depthTexture. Default: false */
@@ -20,7 +18,7 @@ export function useFBO(
20
18
height ?: number ,
21
19
/**Settings */
22
20
settings ?: FBOSettings
23
- ) : THREE . WebGLRenderTarget {
21
+ ) {
24
22
const size = useThree ( ( state ) => state . size )
25
23
const viewport = useThree ( ( state ) => state . viewport )
26
24
const _width = typeof width === 'number' ? width : size . width * viewport . dpr
You can’t perform that action at this time.
0 commit comments