Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/BitmapSkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ class BitmapSkin extends Skin {
return this._texture;
}

/**
* Get the bounds of the drawable for determining its fenced position.
* @param {Array<number>} drawable - The Drawable instance this skin is using.
* @param {?Rectangle} result - Optional destination for bounds calculation.
* @return {!Rectangle} The drawable's bounds. For compatibility with Scratch 2, we always use getAABB for bitmaps.
*/
getFenceBounds (drawable, result) {
return drawable.getAABB(result);
}

/**
* Set the contents of this skin to a snapshot of the provided bitmap data.
* @param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} bitmapData - new contents for this skin.
Expand Down
4 changes: 2 additions & 2 deletions src/Skin.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ class Skin extends EventEmitter {
* Get the bounds of the drawable for determining its fenced position.
* @param {Array<number>} drawable - The Drawable instance this skin is using.
* @param {?Rectangle} result - Optional destination for bounds calculation.
* @return {!Rectangle} The drawable's bounds.
* @return {!Rectangle} The drawable's bounds. For compatibility with Scratch 2, we always use getAABB.
*/
getFenceBounds (drawable, result) {
return drawable.getFastBounds(result);
return drawable.getAABB(result);
}

/**
Expand Down
Binary file added test/integration/scratch-tests/fencing-bounds.sb3
Binary file not shown.