@@ -16,6 +16,7 @@ const log = require('./util/log');
16
16
17
17
const __isTouchingDrawablesPoint = twgl . v3 . create ( ) ;
18
18
const __candidatesBounds = new Rectangle ( ) ;
19
+ const __fenceBounds = new Rectangle ( ) ;
19
20
const __touchingColor = new Uint8ClampedArray ( 4 ) ;
20
21
const __blendColor = new Uint8ClampedArray ( 4 ) ;
21
22
@@ -1357,7 +1358,7 @@ class RenderWebGL extends EventEmitter {
1357
1358
1358
1359
const dx = x - drawable . _position [ 0 ] ;
1359
1360
const dy = y - drawable . _position [ 1 ] ;
1360
- const aabb = drawable . _skin . getFenceBounds ( drawable ) ;
1361
+ const aabb = drawable . _skin . getFenceBounds ( drawable , __fenceBounds ) ;
1361
1362
const inset = Math . floor ( Math . min ( aabb . width , aabb . height ) / 2 ) ;
1362
1363
1363
1364
const sx = this . _xRight - Math . min ( FENCE_WIDTH , inset ) ;
@@ -1627,14 +1628,14 @@ class RenderWebGL extends EventEmitter {
1627
1628
}
1628
1629
1629
1630
twgl . setUniforms ( currentShader , uniforms ) ;
1630
-
1631
+
1631
1632
/* adjust blend function for this skin */
1632
1633
if ( drawable . skin . hasPremultipliedAlpha ) {
1633
1634
gl . blendFuncSeparate ( gl . ONE , gl . ONE_MINUS_SRC_ALPHA , gl . ONE , gl . ONE_MINUS_SRC_ALPHA ) ;
1634
1635
} else {
1635
1636
gl . blendFuncSeparate ( gl . SRC_ALPHA , gl . ONE_MINUS_SRC_ALPHA , gl . ONE , gl . ONE_MINUS_SRC_ALPHA ) ;
1636
1637
}
1637
-
1638
+
1638
1639
twgl . drawBufferInfo ( gl , this . _bufferInfo , gl . TRIANGLES ) ;
1639
1640
}
1640
1641
0 commit comments