File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -480,15 +480,13 @@ export const LensFlare = forwardRef<LensFlareEffect, LensFlareProps>(
480480 let target = 1
481481
482482 if ( followMouse ) {
483- uLensPosition . value . x = pointer . x
484- uLensPosition . value . y = pointer . y
483+ uLensPosition . value = [ pointer . x , pointer . y ]
485484 target = 0
486485 } else {
487486 projectedPosition . copy ( position ) . project ( camera )
488487 if ( projectedPosition . z > 1 ) return
489488
490- uLensPosition . value . x = projectedPosition . x
491- uLensPosition . value . y = projectedPosition . y
489+ uLensPosition . value = [ projectedPosition . x , projectedPosition . y ]
492490
493491 mouse2d . set ( projectedPosition . x , projectedPosition . y )
494492 raycaster . setFromCamera ( mouse2d , camera )
@@ -518,8 +516,7 @@ export const LensFlare = forwardRef<LensFlareEffect, LensFlareProps>(
518516 useEffect ( ( ) => {
519517 const screenRes = effect . uniforms . get ( 'screenRes' )
520518 if ( screenRes ) {
521- screenRes . value . x = viewport . width
522- screenRes . value . y = viewport . height
519+ screenRes . value = [ viewport . width , viewport . height ]
523520 }
524521 } , [ effect , viewport ] )
525522
You can’t perform that action at this time.
0 commit comments