Jump to content

Updating text on dynamic texture


Varsha Kamble
 Share

Recommended Posts

Hi @Deltakosh and @kcoley ,

 

I am adding text meshes in model using following link.

https://github.com/BabylonJS/Babylon.js/issues/4300

Mesh is getting added properly and it is getting saved as well.

Now my requirement is to update the text on it. As this mesh texture is getting saved dynamically, i am trying to remove previous mesh along with its texture and adding new in place.

Created a playground to replicate my issue.

http://playground.babylonjs.com/#Z3WLYL

 

Here, my problem is, Text is getting cropped if its of larger length. Also font of text gets changed based on length of added text. Tried with different length text . For smaller text font  becomes small for larger text font gets increased.

I want the font of text to be consistent, no matter what is length of text. Also the plane should get dynamic width based on length of text. No text should get cropped.

Please help me in this.

Thanks.

 

Regards,

Varsha

 

Link to comment
Share on other sites

@Varsha Kamble

Your math is incorrect. The font that you use is not able to fit in the math you set for the length of your plane and dynamic texture. If you still have issues, then I can easily build a PG scene which accommodates any text. But I hope you can identify your errors in expecting the font to fit within the mesh.

DB

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...