@@ -455,9 +455,9 @@ export class SceneInfra {
455
455
return
456
456
}
457
457
this . currentMouseVector . x =
458
- ( mouseEvent . clientX / mouseEvent . currentTarget . clientWidth ) * 2 - 1
458
+ ( mouseEvent . offsetX / mouseEvent . currentTarget . clientWidth ) * 2 - 1
459
459
this . currentMouseVector . y =
460
- - ( mouseEvent . clientY / mouseEvent . currentTarget . clientHeight ) * 2 + 1
460
+ - ( mouseEvent . offsetY / mouseEvent . currentTarget . clientHeight ) * 2 + 1
461
461
462
462
const planeIntersectPoint = this . getPlaneIntersectPoint ( )
463
463
const intersects = this . raycastRing ( )
@@ -623,9 +623,9 @@ export class SceneInfra {
623
623
return
624
624
}
625
625
this . currentMouseVector . x =
626
- ( event . clientX / event . currentTarget . clientWidth ) * 2 - 1
626
+ ( event . offsetX / event . currentTarget . clientWidth ) * 2 - 1
627
627
this . currentMouseVector . y =
628
- - ( event . clientY / event . currentTarget . clientHeight ) * 2 + 1
628
+ - ( event . offsetY / event . currentTarget . clientHeight ) * 2 + 1
629
629
630
630
const mouseDownVector = this . currentMouseVector . clone ( )
631
631
const intersect = this . raycastRing ( ) [ 0 ]
@@ -648,9 +648,9 @@ export class SceneInfra {
648
648
return
649
649
}
650
650
this . currentMouseVector . x =
651
- ( mouseEvent . clientX / mouseEvent . currentTarget . clientWidth ) * 2 - 1
651
+ ( mouseEvent . offsetX / mouseEvent . currentTarget . clientWidth ) * 2 - 1
652
652
this . currentMouseVector . y =
653
- - ( mouseEvent . clientY / mouseEvent . currentTarget . clientHeight ) * 2 + 1
653
+ - ( mouseEvent . offsetY / mouseEvent . currentTarget . clientHeight ) * 2 + 1
654
654
const planeIntersectPoint = this . getPlaneIntersectPoint ( )
655
655
const intersects = this . raycastRing ( )
656
656
0 commit comments