From 2a39905de38373e312d1b9a5a1b78f3ee5134743 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Thu, 31 Oct 2019 13:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BF=E7=9C=9F=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jl3ddrive/moveupdate/DrivingConnect.js | 36 +------------------ src/jlmap3d/jl3dsimulation/jlmap3d.js | 6 ++-- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js index c7412d4b9..c0e607333 100644 --- a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js +++ b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js @@ -309,7 +309,7 @@ export function Jl3dDriving(updatemmi,sound,translation) { if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == false) { if (rails.linkrail[data.body[i].linkCode]) { - // console.log(trainlisttest.group); + console.log(trainlisttest.group); if(trainlisttest.group.children.length<1){ trainlisttest.group.add(trainlisttest.list[code]); } @@ -421,41 +421,7 @@ export function Jl3dDriving(updatemmi,sound,translation) { } } if (trainlisttest.list[code].status != data.body[i].directionType) { - if (data.body[i].directionType == '02') { // 向右 - trainlisttest.list[code].progress = 0; - const rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12]; - const rotaposz = trainlisttest.list[code].children[0].matrixWorld.elements[14]; - trainlisttest.list[code].rotation.y = 0; - trainlisttest.list[code].position.x = rotaposx; - for (let tl=0; tl<6; tl++) { - trainlisttest.list[code].children[tl].position.z = rotaposz; - } - - trainlisttest.list[code].progress = (rotaposx-rails.linkrail[data.body[i].linkCode].lp.x)/rails.linkrail[data.body[i].linkCode].lengthfact; - trainlisttest.list[code].status = '02'; - trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineleft; - trainlisttest.list[code].nextcurve = null; - - trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact; - - } else if (data.body[i].directionType == '03') { // 向左 - trainlisttest.list[code].progress = 0; - const rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12]; - const rotaposz = Math.abs(trainlisttest.list[code].children[0].matrixWorld.elements[14]); - trainlisttest.list[code].rotation.y = Math.PI; - trainlisttest.list[code].position.x = rotaposx; - for (let tl=0; tl<6; tl++) { - trainlisttest.list[code].children[tl].position.z = -rotaposz; - } - trainlisttest.list[code].progress = 1-(rotaposx-rails.linkrail[data.body[i].linkCode].lp.x)/rails.linkrail[data.body[i].linkCode].lengthfact; - trainlisttest.list[code].status = '03'; - trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineright; - trainlisttest.list[code].nextcurve = null; - - trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact; - - } } diff --git a/src/jlmap3d/jl3dsimulation/jlmap3d.js b/src/jlmap3d/jl3dsimulation/jlmap3d.js index b9a419e2a..dc3d834a7 100644 --- a/src/jlmap3d/jl3dsimulation/jlmap3d.js +++ b/src/jlmap3d/jl3dsimulation/jlmap3d.js @@ -90,8 +90,8 @@ export function JLmap3d(dom, data,skinCode,storemod) { ModelLoad(data,scope,netdata.data,mapdata,camera,controls,scene,storemod); }); // - let stats = new Stats(); - dom.appendChild( stats.dom ); + // let stats = new Stats(); + // dom.appendChild( stats.dom ); //开启渲染 animate(); startWorker(); @@ -108,7 +108,7 @@ export function JLmap3d(dom, data,skinCode,storemod) { //根据相机渲染场景 renderer.render(scene,camera); //检测动画构造器播放动画 - stats.update(); + // stats.update(); } }