const pointsArr = [new THREE.Vector3(0, 0, 0), new THREE.Vector3(2, 2, 2)];
const pathBuilder = new PathBuilder();
const pathPointList = new pathBuilder.PathPointList();
pathPointList.set(pointsArr, 1, 5, false);
// Throws error
const geometry = new pathBuilder.PathTubeGeometry();
react-reconciler.development.js:14370 Uncaught TypeError: Class constructor BufferGeometry cannot be invoked without 'new'
at PathTubeGeometry.PathGeometry [as constructor] (three-path-builder.js:432:20)
at new PathTubeGeometry (three-path-builder.js:626:18)
It has an error when init in react (code is inside a useEffect)