How can I make good tube with three.js? for example railings

I remember having a similar problem once.
CatmullRomCurve3 must create a balance between the points. You have very few points. Try setting few points on the straight sections and very close distances on the curves.

If you need sharp corners, I have this design:
Construction of frames with contour/profile
ProfiledContourGeometryMM

see also
DynamicTubeGeometryCaps
CustomCylinderAndKnee

2 Likes