lars Posted January 14, 2020 Share Posted January 14, 2020 Im trying to use a spine in a PIXI.Particlecontainer with no luck ? const sprites = new PIXI.ParticleContainer(100, { scale: true, position: true, rotation: true, uvs: true, alpha: true, }); app.stage.addChild(sprites); const mImgSpine = new PIXI.spine.Spine(this.mpAssets.con); sprites.addChild(mImgSpine); // this fails Getting the error: Cannot read property 'baseTexture' of undefined Anyone knows if it's possible or its just a stupid idea ? It works fine with a sprite: const mImg = PIXI.Sprite.from(this.image); sprites.addChild(mImgSpine); // this fails Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 14, 2020 Share Posted January 14, 2020 Even if ParticleContainer supported nested containers - Spine update would destroy performance anyway. The number of vertices/weights in spine attachments is a real bottleneck. You want to optimize spine - look at when update() is called and don't call it when possible. Quote Link to comment Share on other sites More sharing options...
lars Posted January 14, 2020 Author Share Posted January 14, 2020 Ok. thanks ... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.