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

Better support for custom DisplayObject subclasses #107

Closed
MuTsunTsai opened this issue Mar 10, 2023 · 1 comment
Closed

Better support for custom DisplayObject subclasses #107

MuTsunTsai opened this issue Mar 10, 2023 · 1 comment

Comments

@MuTsunTsai
Copy link

This issue was previously mentioned in #90 which is now closed, so I suppose I open a new issue dedicate to it. The problem is if we have custom DisplayObject subclasses that is not part of pixi.js itself, the inspector will crash unless we register the class on the global PIXI object, for example:

class MyDisplayObject extends DisplayObject {
    ...
}

PIXI.MyDisplayObject = MyDisplayObject; // key!

This is necessary even for some semi-official packages, such as @pixi/graphics-smooth, as mentioned in its issue pixijs-userland/graphics-smooth#33.

It would be better if pixi-inspector could support custom classes directly without the need of such workarounds.

@MuTsunTsai
Copy link
Author

Oh SORRY! I failed to update the extension to the latest version! My bad.

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

1 participant