diff --git a/src/jlmap3d/jl3dsimulation/jlmap3d.js b/src/jlmap3d/jl3dsimulation/jlmap3d.js index 290bdc528..95698f847 100644 --- a/src/jlmap3d/jl3dsimulation/jlmap3d.js +++ b/src/jlmap3d/jl3dsimulation/jlmap3d.js @@ -297,17 +297,15 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) { //三维交互点击事件函数 function onselect(event) { - if(event.button == "0"){ - if(controlManager.controlMode != 'fps'){ - //定义光线 - let raycaster = new THREE.Raycaster(); - //定义平面鼠标点击坐标 - let mouse = new THREE.Vector2(); - mouse.x = (event.clientX / window.innerWidth) * 2 - 1; - mouse.y = -(event.clientY / window.innerHeight) * 2 + 1; - - raycaster.setFromCamera( mouse, controlManager.orbitCamera ); + if(controlManager.controlMode != 'fps' && event.button == "0" && stationstandlist){ + //定义光线 + let raycaster = new THREE.Raycaster(); + //定义平面鼠标点击坐标 + let mouse = new THREE.Vector2(); + mouse.x = (event.clientX / window.innerWidth) * 2 - 1; + mouse.y = -(event.clientY / window.innerHeight) * 2 + 1; + raycaster.setFromCamera( mouse, controlManager.orbitCamera ); //从站台对象组获取点击目标 let intersects1 = raycaster.intersectObjects( stationstandlist.group.children,true); @@ -319,7 +317,6 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) { controlManager.attachFpsCamera(intersects1[0].object.parent,intersects1[0].point); } } - } } } diff --git a/src/jlmap3d/main/loaders/AssetLoader.js b/src/jlmap3d/main/loaders/AssetLoader.js index a4a2fdca2..c9f0daef6 100644 --- a/src/jlmap3d/main/loaders/AssetLoader.js +++ b/src/jlmap3d/main/loaders/AssetLoader.js @@ -226,7 +226,6 @@ export function AssetLoader() { if (project == "say") { let nologoStationNc = new AssetModel(nologonc); scope.modellist.push(nologonc); - console.log(nologohc); let nologoStationHc = new AssetModel(nologohc); scope.modellist.push(nologohc); } diff --git a/src/jlmap3d/main/newmodel/StationStandListN.js b/src/jlmap3d/main/newmodel/StationStandListN.js index 0b67b7546..ac87debcc 100644 --- a/src/jlmap3d/main/newmodel/StationStandListN.js +++ b/src/jlmap3d/main/newmodel/StationStandListN.js @@ -184,6 +184,16 @@ export function StationStandListN() { } } + if (project == "say") { + if (assetloader.modellist[j].type == "nologonc") { + nologonc = assetloader.modellist[j].mesh; + // assetloader.modellist[num2].mesh.rotation.y = Math.PI/2; + } + if (assetloader.modellist[j].type == "nologohc") { + nologohc = assetloader.modellist[j].mesh; + } + } + } selectmesh1.traverse(function(child) {