-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add BitmapText support? #393
Comments
Can't agree more, pixi-tagged-text has awsome flexibility but with pretty much cost. |
Even being able to use the "minimum" number of Will have a bit of a hack and see if I can quickly create a fork that leverages BitmapText instead ❤️ |
Alright I hacked together a basic fork that is sufficient for our use case (draft PR here). SetupUpdate
|
Hello. Thanks @reececomo for the idea. It has been a while since I started this project so I can't remember exactly why I didn't do this from the start. Most likely it was unfamiliarity with the details of the library on my part. |
I refreshed my knowledge of BitmapText and I think this change would actually be fairly major and would be difficult / impossible to get the full feature set. Here's what I am seeing...
For me, I don't think this is something I want to pursue, especially if the second point about styles being lost holds true. If your fork is working for you and you're happy, I think that's awesome. If you have been using it and you're happy with it, and if you can think of a way to incorporate it as an optional feature, that could be cool. Maybe instead of asking people to create a subclass, we provide a new class called BTW, I think there are some other areas, like caching / memoizing, that could yield some performance benefits. Maybe not on the magnitude of switching to bitmap text, but also wouldn't sacrifice any user experience or features. Thanks! (Keeping this issue open for now in case more discussion is needed) |
I don't think you fully refreshed your knowledge of BitmapText 😂 IBitmapTextStyle is not a drop-in replacement because that style goes into the BitmapFont like in my examples above. I appreciate you wanting to eagerly reject the PR, but you should at least change the "private" to "protected" for Honestly the library is super handy, but the performance is very poor, and it only needs some minor tweaks to be ready for a production environment. Best of luck! |
@rfvtgbzxc quick update: We've published a SetupUpdate
|
Thanks for adding the extra details. It helps a lot to see a more complete solution. |
TaggedText is now a generic class and some methods are extendable so that it could be made to work with bitmapText objects. It shouldn't affect existing code. re #393
@reececomo I updated the code in 3.15.0. Let me know if this is helpful or if it's missing something. From here, you should be able to create a TaggedBitmapText subclass that reimplements text field creation methods (or maybe give the users options within TaggedText like you did in your v2).
|
Awesome! Thanks man, that's a huge help 🙌 |
@reececomo I'd encourage you to submit a new pull request with a TaggedBitmapText class that's fully implemented. It would be especially great if you include tests, docs, etc. |
Would love to, might have to be a future weekend project though, between work and this game 😆 |
These two have already made it massively configurable:
It's the whole Pareto thing - making these small changes has solved 90% of it. Like you flagged @mimshwright (and rightly so), there are heaps of BitmapText-specific considerations that make it not 1:1 with Text. In particular things like preloading/generating BitmapFonts. e.g. I noticed problems with emoji, even with generated font characters. We don't actually use emoji anyway so I left it alone. |
Any chance of support for using
PIXI.BitmapText(...)
under-the-hood instead ofPIXI.Text(...)
?This library is awesome, but for performance reasons (especially on mobile devices), it would be phenomenal to leverage
PIXI.BitmapText
instead ofPIXI.Text
.Example:
This is an almost drop-in replacement, that shouldn't be too much of a performance hit in 99% of cases:
The text was updated successfully, but these errors were encountered: