TubePainter Threejs react

Hello everyone
I,m trying to paint with TubePainter of Threejs through an array of x,y and z. but I,m not really sure how I should do it. I create first a const variable of new THREE.Vector3D and I give it to my painter for each item.
here is my code:
image
and I call it by useEffect of react hook
image

can someone help me or give tipps!?
I really appreciate it thanks in advance