Skip to content

Commit b448aac

Browse files
committed
Always use AABB for fence bounds
1 parent cc5fea8 commit b448aac

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/BitmapSkin.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ class BitmapSkin extends Skin {
5858
return this._texture;
5959
}
6060

61-
/**
62-
* Get the bounds of the drawable for determining its fenced position.
63-
* @param {Array<number>} drawable - The Drawable instance this skin is using.
64-
* @param {?Rectangle} result - Optional destination for bounds calculation.
65-
* @return {!Rectangle} The drawable's bounds. For compatibility with Scratch 2, we always use getAABB for bitmaps.
66-
*/
67-
getFenceBounds (drawable, result) {
68-
return drawable.getAABB(result);
69-
}
70-
7161
/**
7262
* Set the contents of this skin to a snapshot of the provided bitmap data.
7363
* @param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} bitmapData - new contents for this skin.

src/Skin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ class Skin extends EventEmitter {
146146
* Get the bounds of the drawable for determining its fenced position.
147147
* @param {Array<number>} drawable - The Drawable instance this skin is using.
148148
* @param {?Rectangle} result - Optional destination for bounds calculation.
149-
* @return {!Rectangle} The drawable's bounds.
149+
* @return {!Rectangle} The drawable's bounds. For compatibility with Scratch 2, we always use getAABB.
150150
*/
151151
getFenceBounds (drawable, result) {
152-
return drawable.getFastBounds(result);
152+
return drawable.getAABB(result);
153153
}
154154

155155
/**

0 commit comments

Comments
 (0)