-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
generateTexture signature is inconsistent #2304
Comments
https://github.com/pixijs/pixi.js/search?utf8=%E2%9C%93&q=generateTexture Looks like the DO one matches the RenderTexture param order: The others in that case seem "backwards". Unfortunately changing it to be correct would be backwards incompatible at this point. |
Hmm, yes, I assume it is not worth to have a type test and swap the params for "old" use? probably resolution and scaleMode can't be recognised from eachother? |
both are numbers :( |
maybe based on the valid ranges? surely there is distinct difference between |
scaleMode is a constant value in the range [0, 5] and the resolution is generally in the range [1,3]. Hard to tell the difference... |
Thanks for highlighting @LukaszGrela ! generateTexture has been moved to the renderer now for v4. This means all objects get rendered through a single function 👍 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I've noticed that:
DisplayObject.prototype.generateTexture = function (renderer, scaleMode, resolution)
and
Container.prototype.generateTexture = function (renderer, resolution, scaleMode)
or
Graphics.prototype.generateTexture = function (resolution, scaleMode)
have different order of arguments (or number), there is no real need to do this and also this upsets the
google-closure-compiler
which reports following error:The text was updated successfully, but these errors were encountered: