From 3685fa7e35795dfad5df6e3123fa519b181faa1a Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Mon, 27 Jan 2025 15:00:43 +0100 Subject: [PATCH] [ts] Skeleton.getBoundsRect can now consider clipping attachments. --- spine-ts/spine-core/src/Skeleton.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-ts/spine-core/src/Skeleton.ts b/spine-ts/spine-core/src/Skeleton.ts index e6729840d..871212191 100644 --- a/spine-ts/spine-core/src/Skeleton.ts +++ b/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 }`. * 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 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 }; }