Text Inner Shadow

I’d like to apply an inner-shadow effect to some text in Phaser.

The Docs mention this:

Because it uses the Canvas API you can take advantage of all the features this offers, such as applying gradient fills to the text, or strokes, shadows and more.

…so I thought maybe I could apply a box-shadow, but I’ve not had any luck.

Has anyone seen an example of an inner shadow on text in Phaser 3?

I would try a DOM game object + CSS for that.

Hey, thanks for this suggestion.

Unfortunately I need to add other phaser elements over the top of the text, which I don’t think I can do with a DOM object

Maybe look into shaders. Or switch to bitmap fonts, some of the generators can add effects.