Skew bitmapText

Hi !

Is there a way to skew a bitmapText ?

Thanks

I don’t think so.

Ok, thanks
And a text element ?

No skew there either.

Ok,
I’ve resolved my issue by creating an base64 image from HTML Dom ( with domtoimage ) and integrate to phaser as quad image with rexplugin so I can create skew manualy with controlPoints.

domtoimage.toPng(document.getElementById('my_id'))
            .then(function (dataUrl) {
            scene.textures.addBase64('texture', dataUrl);
            });
---------------
scene.add.rexQuadImage(x, y, 'texture');

You could maybe draw to a render texture and then add a mesh game object with that texture.

Hi @samme !
thanks for your answers,

Ok for draw in a render texture :

var text  = scene.add.text(0, 0, 'My text').setFontSize(148);
text.setVisible(false);
var rt = this.add.renderTexture(1410, 1000, 400, 400);
rt.draw(text, 0, 0);

but I can’t find how to apply a render texture in a mesh game object
Can you help me ?

rt.saveTexture('text');
1 Like

Perfect !
Thanks