-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 outline/shadow tags to markups #4302
Add outline/shadow tags to markups #4302
Conversation
@querielo - this is just an epic PR, awesome! |
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.
Great PR, thanks! Could you also add a few screenshots of this new feature in action and maybe some edge cases, in addition to the profiling one?
…elo/engine into kirill/shadow-outline-text
@jpauloruschel |
I'm afraid not, the closest you can do (if you want to share a project) is to add the custom build of PlayCanvas into the project and set the loading type to be 'after engine' The use_local_engine param only takes in URLs from localhost or code.playcanvas.com |
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.
Looks good on UI System / TextElement side, but still needs another check on the shader + material side.
Thanks so much for the contribution, @querielo! 🙏 |
Abstract: add outline/shadow tags to markups, so a user can set outline and shadow styles with markups.
Usage:
[outline color="#ffffff" thickness="0.5"]Text[/outline]
[shadow color="#ffffff" offset="0.5"]Text[/shadow]
[shadow color="#ffffff" offsetX="0.5" offsetY="0.5"]Text[/shadow]
[shadow color="#ffffff" offset="0.5"]T[color="#000000"]e[outline color="#ffffff" thickness="0.5"]x[/shadow]t[/color][/outline]
Note: since markups use attributes the MR can improve batching of text elements if enableMarkups is enabled. I'd like to share an example, but I don't know how to get PlayCanvas Engine build from Github Action. So, you need to build the engine locally.
Example:
Here is the profiling screenshot using Spectorjs
I confirm I have read the contributing guidelines and signed the Contributor License Agreement.