File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -203,8 +203,9 @@ export function getNextValidTextureDimension (size) {
203203// (in terms of 2^n, see getNextValidTextureDimension)
204204// size for the domElement of the threeRenderer
205205export function renderTargetHasRightSize ( renderTarget , threeRenderer ) {
206- const screenW = threeRenderer . domElement . clientWidth
207- const screenH = threeRenderer . domElement . clientHeight
206+ // Use .width/.height to match createRenderTarget (not clientWidth/clientHeight)
207+ const screenW = threeRenderer . domElement . width
208+ const screenH = threeRenderer . domElement . height
208209
209210 let targetTexWidth = getNextValidTextureDimension ( screenW , _chooseBiggerSize )
210211 let targetTexHeight = getNextValidTextureDimension ( screenH , _chooseBiggerSize )
You can’t perform that action at this time.
0 commit comments