-
-
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
Clean up of sprite helper functions #4775
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this change 👍 Just a little bit about resolving deprecations. Happy to help with this if you'd like.
packages/sprite/src/Sprite.js
Outdated
Sprite.fromSVG = Sprite.from; | ||
Sprite.fromCanvas = Sprite.from; | ||
Sprite.fromVideo = Sprite.from; | ||
Sprite.fromFrame = Sprite.from; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should definitely deprecate these. Particularly converting fromImage
and fromSVG
function signatures to match from(source, options)
. @GoodBoyDigital, do you want me to take care of the deprecations in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets bury the stewardess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @bigtimebuddy if you could that would be great! I think they also exist like that in the Texture class too.
@GoodBoyDigital could you take a look at this? Deprecated
|
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. |
Cleaned up sprite helper functions.
We only really need one!
PIXI.Sprite.from
Added ability to pass texture options
Brings function inline with
PIXI.Texture.from
Also you can now pass a texture in to the from function. Handy!