Explorar el Código

[ts][phaser] Fix SkinsAndAnimationBoundsProvider.

Davide Tantillo hace 7 meses
padre
commit
8f84f8daa5
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      spine-ts/spine-phaser/src/SpineGameObject.ts

+ 2 - 2
spine-ts/spine-phaser/src/SpineGameObject.ts

@@ -149,8 +149,8 @@ export class SkinsAndAnimationBoundsProvider
 				const bounds = skeleton.getBoundsRect();
 				const bounds = skeleton.getBoundsRect();
 				minX = Math.min(minX, bounds.x);
 				minX = Math.min(minX, bounds.x);
 				minY = Math.min(minY, bounds.y);
 				minY = Math.min(minY, bounds.y);
-				maxX = Math.max(maxX, minX + bounds.width);
-				maxY = Math.max(maxY, minY + bounds.height);
+				maxX = Math.max(maxX, bounds.x + bounds.width);
+				maxY = Math.max(maxY, bounds.y + bounds.height);
 			}
 			}
 			const bounds = {
 			const bounds = {
 				x: minX,
 				x: minX,