Skip to content

Commit f63fc6a

Browse files
committed
Push touching candidate bounds to integer coords
1 parent d0d98de commit f63fc6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/RenderWebGL.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,11 @@ class RenderWebGL extends EventEmitter {
12841284
drawable.updateMatrix();
12851285
drawable.skin.updateSilhouette(this._getDrawableScreenSpaceScale(drawable));
12861286
const candidateBounds = drawable.getFastBounds();
1287+
1288+
// Push bounds out to integers. If a drawable extends out into half a pixel,
1289+
// that half-pixel still needs to be tested.
1290+
candidateBounds.snapToInt();
1291+
12871292
if (bounds.intersects(candidateBounds)) {
12881293
result.push({
12891294
id,

0 commit comments

Comments
 (0)