File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1807,12 +1807,12 @@ class RenderWebGL extends EventEmitter {
1807
1807
let rr = - 1 ;
1808
1808
let Q ;
1809
1809
for ( let y = 0 ; y < height ; y ++ ) {
1810
- _pixelPos [ 1 ] = y / height ;
1810
+ _pixelPos [ 1 ] = ( y + 0.5 ) / height ;
1811
1811
// Scan from left to right, looking for a touchable spot in the
1812
1812
// skin.
1813
1813
let x = 0 ;
1814
1814
for ( ; x < width ; x ++ ) {
1815
- _pixelPos [ 0 ] = x / width ;
1815
+ _pixelPos [ 0 ] = ( x + 0.5 ) / width ;
1816
1816
EffectTransform . transformPoint ( drawable , _pixelPos , _effectPos ) ;
1817
1817
if ( drawable . skin . isTouchingLinear ( _effectPos ) ) {
1818
1818
Q = [ x , y ] ;
@@ -1842,7 +1842,7 @@ class RenderWebGL extends EventEmitter {
1842
1842
// Scan from right to left, looking for a touchable spot in the
1843
1843
// skin.
1844
1844
for ( x = width - 1 ; x >= 0 ; x -- ) {
1845
- _pixelPos [ 0 ] = x / width ;
1845
+ _pixelPos [ 0 ] = ( x + 0.5 ) / width ;
1846
1846
EffectTransform . transformPoint ( drawable , _pixelPos , _effectPos ) ;
1847
1847
if ( drawable . skin . isTouchingLinear ( _effectPos ) ) {
1848
1848
Q = [ x , y ] ;
You can’t perform that action at this time.
0 commit comments