From 602dfa006f75e2aaec6fe90efebe6d5a3853d945 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期一, 10 一月 2022 15:33:24 +0800
Subject: [PATCH] #
---
static/js/object/CrnTask.js | 40 +++++++++-------------------------------
1 files changed, 9 insertions(+), 31 deletions(-)
diff --git a/static/js/object/CrnTask.js b/static/js/object/CrnTask.js
index 6a81258..c1e114e 100644
--- a/static/js/object/CrnTask.js
+++ b/static/js/object/CrnTask.js
@@ -4,11 +4,11 @@
const zOffset = -480;
const xOffset0 = -1735;
-const yOffset0 = -108;
+const yOffset0 = -117;
const zOffset0 = -480;
const xOffset1 = -1735;
-const yOffset1 = -107;
+const yOffset1 = -116;
const zOffset1 = -475;
// 鍫嗗灈鏈哄綋鍓嶈繍琛岀姸鎬佸璞�
@@ -54,7 +54,7 @@
that.crnLoad = getArrVal(object.objects, "name", that.crnNo + "-load");
that.crnFork = getArrVal(object.objects, "name", that.crnNo + "-fork");
if (that.crnBody===null || that.crnLoad===null || that.crnFork==null) {
- console.log(that.crnNo + "鍙峰爢鍨涙満娌℃湁鍒濆鍖�");
+ // console.log(that.crnNo + "鍙峰爢鍨涙満娌℃湁鍒濆鍖�");
}
};
init();
@@ -141,29 +141,10 @@
})
}
- // 鍫嗗灈鏈烘湰浣撹繍鍔ㄨ建杩�
- if (that.prePosition.z !== that.position.z && false) {
- curves.push({
- start: false,
- progress: 0,
- part: 'body',
- route: new Route([
- {
- x: that.crnBody.position.x,
- y: that.crnBody.position.y,
- z: that.prePosition.z
- },
- {
- x: that.crnBody.position.x,
- y: that.crnBody.position.y,
- z: that.position.z
- }
- ])
- })
- }
-
curves.map((value, index) => {
- console.log(value.part + " --> " + JSON.stringify(value.route.points))
+ if (that.crnNo === 1) {
+ // console.log(value.part + " --> " + JSON.stringify(value.route.points))
+ }
});
curves[0].start = true;
@@ -187,13 +168,10 @@
let point = curves[i].route.getPoint(curves[i].progress);
if ( point && point.x ) {
switch (curves[i].part) {
- case 'body':
- that.crnBody.position.set(point.x, point.y, point.z);
- break
case 'load':
- that.crnBody.position.z = point.z + zOffset;
- that.crnLoad.position.set(point.x, point.y + yOffset0, point.z + zOffset0);
- that.crnFork.position.set(point.x, point.y + yOffset1, point.z + zOffset1);
+ that.crnBody.position.z = point.z + zOffset - that.crnBody.userData.crnBodyWidth/2;
+ that.crnLoad.position.set(point.x, point.y + yOffset0, point.z + zOffset0 - that.crnLoad.userData.crnLoadWidth/2 + 5);
+ that.crnFork.position.set(point.x, point.y + yOffset1, point.z + zOffset1 - that.crnLoad.userData.crnLoadWidth/2);
break
case 'fork':
that.crnFork.position.set(point.x + xOffset1, point.y, point.z);
--
Gitblit v1.9.1