Pryme8 Posted February 7, 2018 Share Posted February 7, 2018 I have not tested it, but I was wondering if it was possible to pass a uv to the points on a Line system. so like the first point would be at 0,0 and the last be at 1,0 or something similar? I ask because I want to make a line that gets thicker as it gets close the end and this is part of the solution I cam up with. Unless someone has a better method? Quote Link to comment Share on other sites More sharing options...
JohnK Posted February 8, 2018 Share Posted February 8, 2018 This could be adapted to change thickness along its length if needed. http://doc.babylonjs.com/samples/line2d Worth a look. Quote Link to comment Share on other sites More sharing options...
Christoph Posted February 8, 2018 Share Posted February 8, 2018 How about vertex colors or uv's and one Triangle ? if you set vertex colors for your triangle alle the same it should be filled with that color. If you set - for example - it's vertices correctly you can have a line with increasing thickness: https://doc.babylonjs.com/how_to/custom A possible triangle would be: x = 0, y = 2, z=0 x = 100, y = 3, z=0 x = 100, y = 1, z=0 This would draw a "line" that's 2 units "thick" at it's end and is 100 units "long". If you want to use such a thing you could construct all kinds of lines, like adding a "rounded" head and so on. However this really depends on your needs. By supplying "uv's" you can map anything you want on your triangle. 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.