al404 Posted August 10, 2016 Share Posted August 10, 2016 I'm trying to create a plane surface where i write some text on http://www.babylonjs-playground.com/#1ON4DP#0 with a shorter word it works if it gets longer it mess up not sure what i'm doing wrong Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted August 10, 2016 Share Posted August 10, 2016 Hi, @al404 your uv scales & offsets were all messy http://www.babylonjs-playground.com/#1ON4DP#2 But hey, while you're at it with 2d text, try out the new canvas 2Dhttp://babylonjs-playground.com/#2AVSFH#35 Tutorial: https://doc.babylonjs.com/tutorials/Using_the_Canvas2D Quote Link to comment Share on other sites More sharing options...
al404 Posted August 10, 2016 Author Share Posted August 10, 2016 thanks, text seems a little stretched but is not a big issue from your example canvas 2D it looks more like a static overlay, i need text over a 3D element Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted August 10, 2016 Share Posted August 10, 2016 @al404 Check this one out: http://babylonjs-playground.com/#1N9RJY#5 And at the bottom of this page: http://doc.babylonjs.com/overviews/Canvas2D_Home there are a bunch of different PG's showing different features of the canvas 2D Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 10, 2016 Share Posted August 10, 2016 the first null in draw text messed it up outputplaneTexture.drawText("bla bla bla bla", NULL fixedhttp://www.babylonjs-playground.com/#1ON4DP#3 al404 1 Quote Link to comment Share on other sites More sharing options...
al404 Posted August 10, 2016 Author Share Posted August 10, 2016 outputplaneTexture.drawText("bla bla bla bla",12, 160, "bold 160px verdana", "white", "#00ffAA"); the 2 numeric value as far as i read are supposed to set the position but i'm not really sure var outputplaneTexture = new BABYLON.DynamicTexture("dynamictexture", 512, scene, true); I guess I need to change 512 to make it feet all my text Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.