I don’t know if there’s a property or function for doing this and I couldn’t find something related (that wasn’t css or so). Is there a way to do it directly on Phaser?
I don’t think so.
I found out that you can use pipelines to add some effects to game objects, I tried doing this example with text and it actually works!
But now my question is:
Is there any pipeline that could help me achieve the effect of curved text? I have zero experience with them, so I don’t know how to make a custom one or which one could I use.
Not sure if this is what you’re talking about, but do you mean text that follows a curved path? I found a codepen that achieves this in Phaser 2, seems like it could be updated to work in Phaser 3, but it’s written pretty much from scratch - not using a built-in Phaser method.
A slightly more native method that might not take as much coding would be running text along an actual Phaser.Curves.Path object. There’s A Phaser 3 example in bitmaptext/dynamic that animates this idea, but it might be generic enough for you to pull what you need from there. You could angle the letters appropriately using the Path method getTangent. Still might be a bit more work than you were hoping for… but you’d be able to put text on any wildly-shaped path that you’d like!
If you mean distorting the text into a curved shape, then playing around with that bend pipeline might be your best bet.
Great, thank you!
At the end I was forced to use html text boxes for other reasons, but the second option you’re describing is what I needed, thank you!