Jump to content

Modifying attributes of LinesMesh


Recommended Posts


I would like to modify few attributes of a line rendered using LinesMesh such as

1. line thickness

2. Line Start type / End type to display an arrow.  

Looks like this is not directly possible. Should I render these as cylinders (for thick line) and cone (say for start type arrow). ?

The thing is if we try to zoom in these will get bigger and bigger. Is there a way to maintain the same thickness irrespective of the zoom level.




Link to comment
Share on other sites

1. Line thickness is not supported, you can even do an arrow by yourself, just by adding some end segments to your line

please have a look at this little function : it draws three axis, each ended by a line arrow https://github.com/BabylonJS/UserFunctions/blob/master/showWorldAxis.js

2. Depending on your need, you could use a ribbon (billboarded) or a tube, what is easier to start, end and rotate than a cylinder. Both are actually standard meshes, so they grow up when you zoom in as you noticed. Maybe in this case, this needs to implement the adjusting of the tube radius (it's possible, the tube is dynamically morphable) to the current distance from the camera.


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.

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.


  • Recently Browsing   0 members

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