Babylon Does not provide an api with wide lines?

babylon Does not provide an api with wide lines?
three.js All support
const geometry = new THREE.Geometry()
const path = new THREE.Path()
path.arc(0, 0, 50, 0, Math.PI * 2)
const points = path.getPoints(40)
const line = new MeshLine()

const material = new MeshLineMaterial({
color: ‘#33b’,
lineWidth: 4, // this lineWidth
dashArray: 0.1,
dashRatio: 0.5,
transparent: true,
opacity: 1
var mesh = new THREE.Mesh(line.geometry, material)
mesh.rotateX(Math.PI / 2)

Similar to the above effect, three Js is easy to implement, but Babylon seems to be difficult to support, and 3D wide lines are difficult

No, I don’t think so. There are a number of posts in this forum around this subject.
Just make a search with line + width and you should be able to spot them easily.
Solutions are around using either a ribbon or a path with meshes from what I can recall just right now.

1 Like

@wudao It may not be exactly what you’re after but you can enable edges rendering on any mesh (including lines) then set the edge width e.g.

let lines = BABYLON.MeshBuilder.CreateLines("lines", {points: myPoints}); 
lines.edgesWidth = 3;
lines.edgesColor = new BABYLON.Color4(1, 0, 0, 1);

A normal straight line is OK, but there will be cracks in Bezier space curve

Thank you for your reply
I know what you said, but it’s only 2D. Lines with width in 3D space are not supported

Yes, hence the solution using a ribbon or a mesh with path. I don’t have time right now for a search but I am sure you can find it if you search around the words line + thikness or +3d. It’s somewhere in here and fairly recent.

A couple of examples using curves, and a fixed normal or path3D to obtain normals along the curve.

Fixed normal

normals to tangents along curve


Anything you are used to is always easier than anything you come new to. Also whatever you are used to always gives you expectations for the new which often do not follow through.


From your image it seems you want to make your lines glow

fixed normal

normal to tangent