replaces setTransform on slotObject

setTransform on pixi displayObjects performs:
```
this.scale.x = !scaleX ? 1 : scaleX;
this.scale.y = !scaleY ? 1 : scaleY;
```
meaning any transformations to scale 0 will become scale 1
This commit is contained in:
Gordon Cummings 2024-08-13 09:28:33 +01:00 committed by Davide
parent ed26c35d47
commit d774632ccf

View File

@ -329,7 +329,9 @@ export class Spine extends Container {
}
}
private updatePixiObject (pixiObject: Container, slot: Slot, zIndex: number) {
pixiObject.setTransform(slot.bone.worldX, slot.bone.worldY, slot.bone.getWorldScaleX(), slot.bone.getWorldScaleX(), slot.bone.getWorldRotationX() * MathUtils.degRad);
pixiObject.position.set(slot.bone.worldX, slot.bone.worldY);
pixiObject.scale.set(slot.bone.getWorldScaleX(), slot.bone.getWorldScaleX());
pixiObject.rotation = slot.bone.getWorldRotationX() * MathUtils.degRad;
pixiObject.zIndex = zIndex + 1;
pixiObject.alpha = this.skeleton.color.a * slot.color.a;
}