Mekaboo
November 16, 2020, 1:58am
1
Hey!!
https://playground.babylonjs.com/#AA3H19#37
Having trouble fitting text on Plane mesh B(Welcome to…). Tried to add the fit to text area code and adjust it within mine but couldnt get it to work. How to get sentences to fit on mesh?
,
Mekaboo
DynamicTexture.drawText
is using the fillText
function from the 2D context which does not handle multilines / line wrap.
Instead, you can use the TextBlock
GUI control, and to apply it on your plane use the CreateForMesh
method of AdvancedDynamicTexture
:
https://playground.babylonjs.com/#ZI9AK7#908
2 Likes
Mekaboo
November 17, 2020, 3:08am
3
Thank ya so very much Sir @Evgeni_Popov
It worked like charm…even got it to where I deleted the plane background and it looks exactly how I want it to look!!
https://playground.babylonjs.com/#AA3H19#43