JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//cdn.rawgit.com/mrdoob/three.js/master/build/three.min.js"></script>
JavaScript
const A = new THREE.Vector3( 1, 0, 0 );
const B = new THREE.Vector3( 0, 1, 0 );
const C = new THREE.Vector3( - 1, 0, 0 );
const B_ON_AC = new THREE.Vector3();
const direction = new THREE.Vector3();
const lineSegment = new THREE.Line3( A, C );
lineSegment.closestPointToPoint( B, true, B_ON_AC );
direction.subVectors( B, B_ON_AC ).normalize();
B.add( direction.multiplyScalar( 10 ) );
console.log( B );