pixijs / spine

Pixi.js plugin that enables Spine support.
Other
566 stars 217 forks source link

2.1.11 breaks flip #366

Open geddski opened 3 years ago

geddski commented 3 years ago

when upgrading from 2.1.10 to 2.1.11 I noticed my spine objects get distorted when they're flipped horizontally (skeleton.scaleX = -1;)

2.1.10 image

2.1.11 image

Reverting pixi-spine to 2.1.10 fixes the problem for me. Not sure what changed in pixi-spine to cause this.

ivanpopelyshev commented 3 years ago

Oh, that's interesting. Any way to reproduce it and make small example please? I honestly dont use spine at all, i just pull changes from spine-ts and ask people if it works for them :)

geddski commented 3 years ago

Yeah I'll make an example to test against. Did any of pixi-spine's dependencies change in 2.1.11?

ivanpopelyshev commented 3 years ago

all deps i have are only for build. pixi-spine and spine-ts on its own dont have any deps

ivanpopelyshev commented 3 years ago

@geddski please?

geddski commented 3 years ago

@ivanpopelyshev oh thanks for the reminder! I'll whip it up now.

geddski commented 3 years ago

@ivanpopelyshev working on it, but having a hard time creating a demo. Pixi loader seems incompatible with services like codesandbox. So I'm switching to a local repo but having trouble now with pixi-spine's requirement of a global PIXI object.

geddski commented 3 years ago

@ivanpopelyshev if you have a demo I can modify I'd be happy to. Or if you'd rather, here is a spine object where you can see the distortion when flipped. (worked fined in pixi-spine 2.1.10 but not in 2.1.11)

https://drive.google.com/file/d/1CtxTDH3FCNtFsI2i_b61mDsnbEpmhSAq/view?usp=sharing, https://drive.google.com/file/d/1WSgpzp4UFymvRSv1qOG6hqWBHdtYl8GH/view?usp=sharing, https://drive.google.com/file/d/1cgRdyX-zSVxyjvnHUP5B_sBAn60knhQO/view?usp=sharing

ivanpopelyshev commented 3 years ago

Thanks! Is it buggy in starting state or in particular animation?

P.S. downloaded all three, now you can remove them

geddski commented 3 years ago

it's when it's flipped horizontally:

hoodie.skeleton.scaleX = -1;

I've noticed it in the idle animation:

hoodie.state.setAnimation(0, 'idle', true);
geddski commented 3 years ago

@ivanpopelyshev did you have a chance to take a look?

ivanpopelyshev commented 3 years ago

No, I was on vacation :) gonna look at it today

ivanpopelyshev commented 3 years ago

OK, after all my adventures, im here.

OK, reproduced the bug, looking at it

ivanpopelyshev commented 3 years ago

Here it is: https://github.com/pixijs/pixi-spine/commit/70e3529f4ca96254ad54c0d0eba4f259846fb9b7#diff-1a966784a6695720504c42a12edab4ce61e80f435c1eee0caf0ab8348201baf2R150

ivanpopelyshev commented 3 years ago

I dont know why it was closed :)