Jump to content

Question about pixi-spine


rhythmras
 Share

Recommended Posts

Hello, I'm sorry to bother you again, in the latest version I found that the blending mode doesn't seem to work.
 

  "pixi-spine": "^4.0.3",
  "pixi.js": "^7.1.3",


image.png.e451835f1c51c84d714ffcd5ec6f5483.png
image.png.c5786c163a5f1ed616fc7a6c709d02d4.png

async load(url: string) {
    Assets.add(url, url, { imageMetadata: { alphaMode: ALPHA_MODES.PMA } });
    const res = await Assets.load<spineData>(url, (progress) => {
      console.log(progress);
    });
    // res.spineAtlas.pages.forEach(p => {
    //   p.baseTexture.alphaMode = ALPHA_MODES.PMA;
    // });
    console.log(res);
    const spine = new Spine(res.spineData!);
    const { width, height } = app.PIXI.renderer;
    spine.position.set(width / 2, height / 2);
    spine.scale.set(2000 / spine.width);
    spine.state.setAnimation(0, 'wait', true);
    app.addChild(spine);
  }
Link to comment
Share on other sites

  • 2 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...