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

image after invisible spine isn't drawn #6380

Closed
spayton opened this issue Feb 1, 2023 · 1 comment
Closed

image after invisible spine isn't drawn #6380

spayton opened this issue Feb 1, 2023 · 1 comment
Labels
🐛 Spine An issue arising from the Spine runtime

Comments

@spayton
Copy link
Contributor

spayton commented Feb 1, 2023

Version

  • Phaser Version: 3.60, spine 3.8

Description

Place the following in a container: spine1 (drawDebug=true), spine2, image1

you will see both spines and the image, the spine1 will be displaying the debug draw.

now set visible=false on spine2, would expect only spine2 to disapper but the image1 disappears as well.

Example Test Code

go to labs example: here

replace create() with this:

create ()
    {

        let boy1 = this.add.spine(120, 400, 'boy', 'idle', true).setScale(0.5);
        boy1.drawDebug = true;
        let boy2 = this.add.spine(400, 400, 'boy', 'idle', true).setScale(0.5);
        let image1 = this.add.image(200, 450, 'logo').setOrigin(0);

        let container = this.add.container();
        container.add([ boy1, boy2, image1 ]);

        // boy2.visible = false;  // uncomment this to show fault, only 2nd boy should disappear
    }

Additional Information

Roughly, the debug drawing clears the sceneRenderer.batcher.isDrawing, which in turn skips the sceneRenderer.end() & plugin.renderer.pipelines.rebind() in willRender().

@photonstorm photonstorm added the 🐛 Spine An issue arising from the Spine runtime label Feb 1, 2023
@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Spine An issue arising from the Spine runtime
Projects
None yet
Development

No branches or pull requests

2 participants