We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
onRender
Currently, if you have a class that extends a Pixi object, say:
class SomeClass extends Container{}
And then you add a class definition for onRender like so:
class SomeClass extends Container{ onRender(){ console.log('This will not work'); } }
It won't work; this seems to be because of getters and setters being used for onRender under the hood.
What you have to do instead is:
class SomeClass extends Container{ constructor(){ super(); this.onRender = () => { console.log('This will work'); } } }
Overriding with class definitions should produce the same result, or at least this behavior should be documented
The steps are listed above!
pixi.js
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current Behavior
Currently, if you have a class that extends a Pixi object, say:
And then you add a class definition for
onRender
like so:It won't work; this seems to be because of getters and setters being used for
onRender
under the hood.What you have to do instead is:
Expected Behavior
Overriding with class definitions should produce the same result, or at least this behavior should be documented
Steps to Reproduce
The steps are listed above!
Environment
pixi.js
version: 8.0.2Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: