Skip to content

Commit 90559de

Browse files
committed
Updating ifOnEdgeBounce to use new tight bounding box for more precise edge detection.
1 parent adaabd6 commit 90559de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Sprite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ export class Sprite extends SpriteBase {
760760
}
761761

762762
nearestEdge() {
763-
const bounds = this._project.renderer.getBoundingBox(this);
763+
const bounds = this._project.renderer.getTightBoundingBox(this);
764764
const { width: stageWidth, height: stageHeight } = this.stage;
765765
const distLeft = Math.max(0, stageWidth / 2 + bounds.left);
766766
const distTop = Math.max(0, stageHeight / 2 - bounds.top);

0 commit comments

Comments
 (0)