From a56777639efc65d506b85d2bcff68ce0e3748490 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期三, 15 十二月 2021 11:02:43 +0800
Subject: [PATCH] #

---
 static/js/object/Route.js |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/static/js/object/Route.js b/static/js/object/Route.js
index 92a4274..9388143 100644
--- a/static/js/object/Route.js
+++ b/static/js/object/Route.js
@@ -1,3 +1,4 @@
+
 /**
  *  points:[
      {x:-100,y:1,z:50},
@@ -14,15 +15,29 @@
     let curvePoints=[];
     // 1.鍘诲彇璐� ------------------------------------------------------------------------
     // z杞�
-    curvePoints.push(option[0]);
-    curvePoints.push({
-        x: option[0].x,
-        y: option[0].y,
-        z: option[1].z
-    });
-    return new THREE.CatmullRomCurve3(curvePoints,false,'catmullrom',0.000000001);
+    // 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
+    ));
 
 
 

--
Gitblit v1.9.1