mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
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:
parent
ed26c35d47
commit
d774632ccf
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user