فهرست منبع

[ts] Skeleton.getBoundsRect can now consider clipping attachments.

Davide Tantillo 7 ماه پیش
والد
کامیت
3685fa7e35
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      spine-ts/spine-core/src/Skeleton.ts

+ 2 - 2
spine-ts/spine-core/src/Skeleton.ts

@@ -613,10 +613,10 @@ export class Skeleton {
 
 
 	/** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose as `{ x: number, y: number, width: number, height: number }`.
 	/** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose as `{ x: number, y: number, width: number, height: number }`.
 	 * Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */
 	 * Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */
-	getBoundsRect () {
+	getBoundsRect (clipper?: SkeletonClipping) {
 		let offset = new Vector2();
 		let offset = new Vector2();
 		let size = new Vector2();
 		let size = new Vector2();
-		this.getBounds(offset, size);
+		this.getBounds(offset, size, undefined, clipper);
 		return { x: offset.x, y: offset.y, width: size.x, height: size.y };
 		return { x: offset.x, y: offset.y, width: size.x, height: size.y };
 	}
 	}