How Can I add an element textbox on the canvas in special coordinates

Hi All,

I want to add a textbox to alter the length of the line in the center of the line.
How can I know the right coordinates of this textbox?

    const material = new THREE.LineBasicMaterial({ color: 0x000000 });
            const points = [];
              new THREE.Vector3(line1X, y, line1Z)
              new THREE.Vector3(line2X, y, line2Z)
            const geometryTop = new THREE.BufferGeometry().setFromPoints(points);
           let lineRight = new THREE.Line(geometryTop, material);
           lineRight.userData.type = "measures-line";


Since it seems you want to convert coordinates from world space into 2D screen space, you can used the approach that was outlined in the following topic:

1 Like

Thank you :heart: @Mugen87