/** * points:[ {x:-100,y:1,z:50}, {x:-500,y:1,z:50}, {x:-800,y:1,z:50}, {x:-800,y:1,z:420}, {x:-1400,y:1,z:420}, {x:-1400,y:1,z:480}, {x:-100,y:1,z:480}, {x:-100,y:1,z:50} ] */ function Route(option) { let curvePoints=[]; // 1.去取货 ------------------------------------------------------------------------ // z轴 // curvePoints.push(option[0]); // curvePoints.push( // new THREE.Vector3( // option[0].x, // option[0].y, // option[1].z/2 // ) // ); // curvePoints.push( // new THREE.Vector3( // option[0].x, // option[0].y, // option[1].z // ) // ); // return new THREE.CatmullRomCurve3(curvePoints,false,'centripetal',0.000000001); return new THREE.LineCurve3(option[0],new THREE.Vector3( option[0].x, option[0].y, option[1].z )); // 2. // let curvePoints=[]; // for(let i=0;i