azerion / phaser-spine

A plugin for Phaser 2 that adds Spine support
MIT License
121 stars 57 forks source link

[spine-ts] Wrong Y-Position of Origin is Rendered #94

Open vicksonzero opened 6 years ago

vicksonzero commented 6 years ago

I am using:

I made a strawberry sprite that sits in the center of the spine scene, It uses deform animations and then I load and create it in-game (at 0, 0) I expect it to appear in the top-left corner, with only the lower-right corner visible.

but actually, the strawberry appear much lower, and the whole right-side is visible in the game.

I then made the following changes to the source and it correctly aligns to the origin again: screenshot 488 cropped

may I know what the purpose is for the deleted piece of code?

Edit: i also removed var scale = Math.max(scale2.x, scale2.y); and used scale2.x and scale2.y as-is why are the scale normalized like this?

Are the lines intended, or did I break something by fixing it?

vicksonzero commented 6 years ago

Edit: i also removed var scale = Math.max(scale2.x, scale2.y); and used scale2.x and scale2.y as-is why are the scale normalized like this?

vicksonzero commented 6 years ago

Also found that this.mvp.ortho2d(x * res, y, width * res, height * res);

doesn't have y * res written. is it also intentional?