Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spine-TS] Loading in of Spine projects moves the other spine objects that are already on stage #76

Open
shibekin69 opened this issue Aug 23, 2017 · 2 comments

Comments

@shibekin69
Copy link

shibekin69 commented Aug 23, 2017

I noticed this while trying to debug the other problem. When I add in other spine projects of bigger dimensions or with bones and graphics that I've deliberately placed far apart, when adding these in to the stage, other Spine object's x,y positions move about in an unpredictable way. Like pasting in images in a invisible container, and this container auto-resizes or something.

@marcusIB
Copy link

marcusIB commented Oct 5, 2017

Hi, I have the same problem. In my case I instance a spine object in a group and it works correctly but when I instance another spine object, in this case in the stage, the first one (spin in the group) changes his position or maybe his anchor. Otherwise, in another state I had instanced two diferents spine object in the main stage and both works correctly.

@spayton
Copy link

spayton commented Mar 28, 2018

It's because they are using the same default texture and its properties.

I fixed it in the .js because I've been modding that rather than the .ts. Find this line in the .js:

            var _this = _super.call(this, game, x, y, '') || this;

and replace it with this:

            var _this = _super.call(this, game, x, y, new PIXI.Texture(new PIXI.BaseTexture)) || this;

or work this mod back up into the .ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants