修改三维static配置地址,修改三维驾驶车厢内视角位置,修改切换列车屏蔽门三维动画状态,修改三维沙盘信号机道岔动画播放

This commit is contained in:
sunzhenyu 2020-10-10 18:22:30 +08:00
parent dbdb3f7e51
commit 895aae1438
41 changed files with 429 additions and 8330 deletions

View File

@ -1,5 +1,5 @@
export function SetRender(dom) {
var renderer = new THREE.WebGLRenderer();//{antialias: true}
var renderer = new THREE.WebGLRenderer({logarithmicDepthBuffer: true});//{antialias: true}
renderer.setSize(dom.offsetWidth, dom.offsetHeight);
return renderer;
}

View File

@ -2,7 +2,7 @@ export function SetScene(project) {
var scene = new THREE.Scene();
// var cubeTextureLoader = new THREE.CubeTextureLoader();
//
// cubeTextureLoader.setPath( '../../cbtc/static/skybox/star/' );
// cubeTextureLoader.setPath( '/cbtc/static/skybox/star/' );
//
// var cubeTexture = cubeTextureLoader.load( [
// 'px.png', 'nx.png',
@ -13,9 +13,9 @@ export function SetScene(project) {
var bgTexture;
// console.log(project);
if(project == "login" || project == undefined){
bgTexture = new THREE.TextureLoader().load("../../cbtc/static/background/other.jpg");
bgTexture = new THREE.TextureLoader().load("/cbtc/static/background/other.jpg");
}else if(project == "heb"){
bgTexture = new THREE.TextureLoader().load("../../cbtc/static/background/other.jpg");
bgTexture = new THREE.TextureLoader().load("/cbtc/static/background/other.jpg");
}
scene.background = bgTexture;
// cubeTexture.dispos e();

View File

@ -46,7 +46,7 @@ export function getmodels(data) {
packageName:"高位三灯信号机",
deviceType:"SimulationSignal",
type:"signal",
url:"../../cbtc/static/MODEL/signal/d3d.FBX"
url:"/cbtc/static/MODEL/signal/d3d.FBX"
}
assets.push(assetsignal);
@ -57,7 +57,7 @@ export function getmodels(data) {
packageName:"6节列车",
deviceType:"SimulationTrain",
type:"train",
url:"../../cbtc/static/MODEL/train/train.FBX"
url:"/cbtc/static/MODEL/train/train.FBX"
}
assets.push(assettrain);
@ -67,8 +67,8 @@ export function getmodels(data) {
packageName:"沙盘驾驶内侧站台",
deviceType:"SimulationStation",
type:"stationInside",
url:"../../cbtc/static/MODEL/station/fuzhou.FBX"
}//"../../cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
url:"/cbtc/static/MODEL/station/fuzhou.FBX"
}//"/cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
assets.push(assetneicestation);
let assetswitch = {
@ -77,7 +77,7 @@ export function getmodels(data) {
packageName:"轨道通用道岔",
deviceType:"SimulationSwitch",
type:"switch",
url:"../../cbtc/static/MODEL/auto/autoswitch.FBX"
url:"/cbtc/static/MODEL/auto/autoswitch.FBX"
}
assets.push(assetswitch);
@ -87,7 +87,7 @@ export function getmodels(data) {
packageName:"沙盘驾驶外侧站台",
deviceType:"SimulationStation",
type:"stationOutside",
url:"../../cbtc/static/MODEL/station/waicestation.FBX"
url:"/cbtc/static/MODEL/station/waicestation.FBX"
}
assets.push(assetwaicestation);
@ -97,7 +97,7 @@ export function getmodels(data) {
packageName:"沙盘驾驶三站台",
deviceType:"SimulationStation",
type:"stationThree",
url:"../../cbtc/static/MODEL/station/station3.FBX"
url:"/cbtc/static/MODEL/station/station3.FBX"
}
assets.push(assetstation3);
@ -107,7 +107,7 @@ export function getmodels(data) {
packageName:"隧道背景",
deviceType:"SimulationBg",
type:"suidao",
url:"../../cbtc/static/MODEL/suidao/xiansuidao.FBX"
url:"/cbtc/static/MODEL/suidao/xiansuidao.FBX"
}
assets.push(backgroundmodel);

View File

@ -19,10 +19,10 @@ export function TrainList() {
// model
THREE.Loader.Handlers.add( /\.dds$/i, new THREE.DDSLoader() ) ;
for(let i=0;i<data.length;i++){
new THREE.MTLLoader().setPath( '../../cbtc/static/MODEL/train/' ).load( 'train.mtl', function ( materials ) {
new THREE.MTLLoader().setPath( '/cbtc/static/MODEL/train/' ).load( 'train.mtl', function ( materials ) {
materials.preload();
new THREE.OBJLoader().setMaterials( materials ).setPath( '../../cbtc/static/MODEL/train/' ).load( 'train.obj', function ( object ) {
new THREE.OBJLoader().setMaterials( materials ).setPath( '/cbtc/static/MODEL/train/' ).load( 'train.obj', function ( object ) {
object.name = data[i].code;

View File

@ -384,7 +384,7 @@ export function JLmap3dEdit(dom, data, mapid) {
alignmentModel.railpoint[1].x -= offsetX;
alignmentModel.railpoint[1].y -= offsetY;
alignmentModel.railpoint[1].z -= offsetZ;
alignmentModel.railpoint[1].z -= offsetZ+0.0001;
alignmentModel.railpoint[2].x -= offsetX;
alignmentModel.railpoint[2].y -= offsetY;
@ -405,7 +405,7 @@ export function JLmap3dEdit(dom, data, mapid) {
alignmentModel.railpoint[1].x -= offsetX;
alignmentModel.railpoint[1].y -= offsetY;
alignmentModel.railpoint[1].z -= offsetZ;
alignmentModel.railpoint[1].z -= offsetZ+0.0001;
alignmentModel.railpoint[0].x -= offsetX;
alignmentModel.railpoint[0].y -= offsetY;

View File

@ -733,7 +733,7 @@ export function SectionList() {
// console.log("-------------------");
// console.log(jlmap3ddata.sectionlist.sections.datalist);
// console.log(sectiondata);
var texture = new THREE.TextureLoader().load( '../../cbtc/static/test/z0251.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1);

View File

@ -20,7 +20,7 @@ export function SectionList() {
this.initpromise = function(jlmap3ddata,assetloader,sectiondata,switchdata,scene){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/test/z0251.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1);
@ -414,7 +414,7 @@ export function SectionList() {
};
function createsection(origin,position,start,py){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/test/z0251.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1);
@ -455,7 +455,7 @@ export function SectionList() {
})
let testmesh2;
if(scope.sections.datalist[start].standTrack == false){
testmesh2 = new THREE.Mesh( geometry, randomMaterail );
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
}else{
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
}
@ -804,7 +804,7 @@ export function SectionList() {
}
this.loadpromise = function(jlmap3ddata,assetloader,sectiondata,section2d,switch2d,scene){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/test/z0251.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1);
@ -862,7 +862,7 @@ export function SectionList() {
});
if(newsection.standTrack == false){
testmesh2 = new THREE.Mesh( geometry, randomMaterail );
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
}else{
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
}

View File

@ -1,13 +1,13 @@
export function Signallightload(lights) {
settexture(lights, "red", '../../cbtc/static/MODEL/device/signal/1.jpg');
settexture(lights, "red", '/cbtc/static/MODEL/device/signal/1.jpg');
settexture(lights, "yellow", '../../cbtc/static/MODEL/device/signal/2.jpg');
settexture(lights, "yellow", '/cbtc/static/MODEL/device/signal/2.jpg');
settexture(lights, "green", '../../cbtc/static/MODEL/device/signal/3.jpg');
settexture(lights, "green", '/cbtc/static/MODEL/device/signal/3.jpg');
settexture(lights, "black", '../../cbtc/static/MODEL/device/signal/4.jpg');
settexture(lights, "black", '/cbtc/static/MODEL/device/signal/4.jpg');
}
function settexture(lights, name, textureurl) {

View File

@ -7,14 +7,14 @@ var Staticmodel = {
picUrl: "",
assetUrl: "./../cbtc/static/MODEL/device/switch/ZD6D.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX"
//../../cbtc/static/MODEL/device/switch.FBX
///cbtc/static/MODEL/device/switch.FBX
Signal: {
id: "2",
name: "信号机",
deviceType: "Signal",
type: "low",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/device/signal/signal.FBX"
assetUrl: "/cbtc/static/MODEL/device/signal/signal.FBX"
},
stationstand: {
id: "3",
@ -22,9 +22,9 @@ var Staticmodel = {
deviceType: "stationstand",
type: "low",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/device/stationstand/stationstand.FBX"
assetUrl: "/cbtc/static/MODEL/device/stationstand/stationstand.FBX"
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
//../../cbtc/static/MODEL/device/stationstand.FBX
///cbtc/static/MODEL/device/stationstand.FBX
},
section: {
@ -33,9 +33,9 @@ var Staticmodel = {
deviceType: "section",
type: "low",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/device/section/section.FBX"
assetUrl: "/cbtc/static/MODEL/device/section/section.FBX"
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
//../../cbtc/static/MODEL/device/stationstand.FBX
///cbtc/static/MODEL/device/stationstand.FBX
},
room: {
@ -44,9 +44,9 @@ var Staticmodel = {
deviceType: "room",
type: "low",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/device/room/room.FBX"
assetUrl: "/cbtc/static/MODEL/device/room/room.FBX"
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
//../../cbtc/static/MODEL/device/stationstand.FBX
///cbtc/static/MODEL/device/stationstand.FBX
}

View File

@ -688,7 +688,7 @@ export function Jl3ddevice(dom,group,token) {
}
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png";
beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -828,7 +828,7 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
}
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png";
beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -1,7 +1,7 @@
import { getBaseUrl } from '@/utils/baseUrl';
const BASE_API = getBaseUrl();
let modelurl = "../../cbtc/static/MODEL/jdq/";
let modelurl = "/cbtc/static/MODEL/jdq/";
// if(BASE_API == 'https://joylink.club/jlcloud'){
// modelurl = "https://joylink.club/oss/jdq/";
// }else if(BASE_API == 'https://test.joylink.club/jlcloud'){

View File

@ -61,7 +61,7 @@ export function Jl3ddevice(dom,serviceid) {
//定义场景(渲染容器)
let scene = new THREE.Scene();
var bgTexture = new THREE.TextureLoader().load("../../cbtc/static/background/other.jpg");
var bgTexture = new THREE.TextureLoader().load("/cbtc/static/background/other.jpg");
scene.background = bgTexture;
//定义全局光
@ -540,7 +540,7 @@ export function Jl3ddevice(dom,serviceid) {
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png";
beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -56,7 +56,7 @@ export function Jl3ddevice(dom,serviceid) {
//定义场景(渲染容器)
let scene = new THREE.Scene();
var bgTexture = new THREE.TextureLoader().load("../../cbtc/static/background/other.jpg");
var bgTexture = new THREE.TextureLoader().load("/cbtc/static/background/other.jpg");
scene.background = bgTexture;
//定义全局光
@ -537,7 +537,7 @@ export function Jl3ddevice(dom,serviceid) {
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png";
beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -110,7 +110,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
var rails = null;
this.webwork=new Worker('../../cbtc/static/workertest/trainworker.js');
this.webwork=new Worker('/cbtc/static/workertest/trainworker.js');
// 地图模型数据
let mapdata = new Jl3ddata();
@ -130,7 +130,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
// load a sound and set it as the Audio object's buffer
// let audioLoader = new THREE.AudioLoader();
// audioLoader.load( '../../cbtc/static/audio/trainmove.ogg', function( buffer ) {
// audioLoader.load( '/cbtc/static/audio/trainmove.ogg', function( buffer ) {
// sound.setBuffer( buffer );
// sound.setLoop( true );
// sound.setVolume( 0 );
@ -144,10 +144,11 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
scene.add(controls3.getObject());
let cameracctv = new THREE.PerspectiveCamera(50, dom.clientWidth/dom.clientHeight, 0.1, 50);
cameracctv.position.set( 0, -0.4,29 );
cameracctv.position.set( -3, 0,1.5 );
// cameracctv.rotation.y = Math.PI/2;
camera.add(cameracctv);
cameracctv.rotation.y = -Math.PI/2;
cameracctv.rotation.x = Math.PI/2;
// camera.add(cameracctv);
// 初始化加载数据和模型
@ -159,7 +160,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
if(assetsdata.link){
scope.datatype = "old";
// datanew();
// scope.jsonwebwork = new Worker("../../cbtc/static/workertest/jsonworker.js");
// scope.jsonwebwork = new Worker("/cbtc/static/workertest/jsonworker.js");
// scope.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork);
// scope.Subscribe.socketon(scope.Subscribe.topic);
@ -208,7 +209,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
}, 2000);
}else{
scope.datatype = "new";
driverWebWorker = new Worker("../../cbtc/static/workertest/driverWebWorker.js");
driverWebWorker = new Worker("/cbtc/static/workertest/driverWebWorker.js");
scope.Subscribe = new Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,driverWebWorker,stats);
datanew();
@ -433,6 +434,9 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
trainlisttest = loadtrainlisttest;
realsectionlist = loadrealsectionlist;
rails = loadrails;
console.log(trainlisttest.group.children[0]);
trainlisttest.group.children[0].getObjectByName("c1").add(cameracctv);
}
this.eventon = function() {

View File

@ -50,8 +50,10 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
driverWebWorker.onmessage = function (event) {
let data = event.data;
// console.log(data);
if(data.type == "Train_Position"){
trainrun(data.body);
nowTrainRun(data.body);
return;
}
@ -60,7 +62,15 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
otherTrainRun(data.body);
return;
}
if(data.type == "Train_Hmi_3D"){
//改变当前列车code
if(data.body.groupNumber){
changeNowTrain(data.body);
}
updatestatus(data.body);
return;
}
@ -92,7 +102,88 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
return;
}
}
//切换车辆修改列车属性
function changeNowTrain(data){
if(data.right == "0"){
if(data.rightDoorCanClose == false){
trainmodel.openright = '0';
for (let an=actions["traindoor"].down.length-1; an>=0; an--) {
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = 0;
actions["traindoor"].down[an].timeScale = -1;
actions["traindoor"].down[an].play();
}
}else{
trainmodel.openright = "1";
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].down[an].timeScale = 1;
actions["traindoor"].down[an].play();
}
}
if(data.leftDoorCanClose == false){
trainmodel.openleft = "0";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = 0;
actions["traindoor"].top[an].timeScale = -1;
actions["traindoor"].top[an].play();
}
}else{
trainmodel.openleft = "1";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].top[an].timeScale = 1;
actions["traindoor"].top[an].play();
}
}
}else{
if(data.leftDoorCanClose == false){
trainmodel.openleft = "0";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = 0;
actions["traindoor"].top[an].timeScale = -1;
actions["traindoor"].top[an].play();
}
}else{
trainmodel.openleft = "1";
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].top[an].timeScale = 1;
actions["traindoor"].top[an].play();
}
}
if(data.rightDoorCanClose == false){
trainmodel.openright = '0';
for (let an=actions["traindoor"].down.length-1; an>=0; an--) {
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = 0;
actions["traindoor"].down[an].timeScale = -1;
actions["traindoor"].down[an].play();
}
}else{
trainmodel.openright = "1";
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = actions["traindoor"].top[an]._clip.duration;
actions["traindoor"].down[an].timeScale = 1;
actions["traindoor"].down[an].play();
}
}
}
}
this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails, materiallist, nowaction, scene) {
// console.log(mapdata);
// console.log(newtrainlisttest);
@ -115,7 +206,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
this.socketon = function(topic) {
try {
// console.log("teststomp");
scope.teststomp.subscribe(topic, callback, header);
// scope.teststomp.subscribe(topic, callback, header);
} catch (error) {
console.error('websocket订阅失败');
}
@ -153,9 +244,9 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
let data = JSON.parse(Response.body);
// stats.update();
// 遍历后台数据
// console.log(data);
console.log(data);
if(data.type == "Train_Position"){
trainrun(data.body);
nowTrainRun(data.body);
return;
}
@ -405,13 +496,10 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
//更新当前驾驶车辆
function nowTrainRun(data){
function trainrun(data){
// console.log(data);
// if(data.code = "336"){
// console.log(data);
// }
//改变当前列车code
if(data.code != trainmodel.code){
if(trainlisttest.otherTrainList[trainmodel.code] && trainmodel.code){
trainlisttest.otherTrainList[trainmodel.code].offset = 0;
@ -421,11 +509,13 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
trainmodel.nowcode = data.code;
}
//改变当前列车行驶的区段code
if(data.section != trainmodel.nowsection){
trainmodel.nowsection = data.section;
trainmodel.curve = rails.sectionrail[data.section].lineleft;
}
// console.log(trainmodel.right);
//判断转向
if(trainmodel.right != data.right){
if(data.right == "0"){
@ -528,8 +618,8 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
let offsetz = pos.z + trainmodel.children[0].position.z;
trainmodel.children[0].position.z -= offsetz;
let offsety = pos.y - trainmodel.children[0].position.y;
trainmodel.children[0].position.y += offsetz;
// let offsety = pos.y - trainmodel.children[0].position.y;
// trainmodel.children[0].position.y += offsetz;
// trainmodel.position.z = point.z;
}
@ -768,8 +858,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
}
}else{
if (trainmodel.openright != data.open && data.open == '0') {
trainmodel.openright = '0';
for (let an=actions["traindoor"].down.length-1; an>=0; an--) {
@ -787,11 +875,9 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
actions["traindoor"].down[an].play();
}
}
}
}
}
}

View File

@ -701,7 +701,7 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
}
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png";
beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -73,7 +73,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
let playerPosition = new THREE.Vector3( -3.5, 0.5, 5.5 );
let targetPosition = new THREE.Vector3();
let pathFinder = new THREE.Pathfinding();
var textureNav = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/daohang.png' );
var textureNav = new THREE.TextureLoader().load( '/cbtc/static/vrtest/daohang.png' );
textureNav.wrapS = THREE.RepeatWrapping;
textureNav.wrapT=THREE.RepeatWrapping;
textureNav.repeat.x = 40;
@ -195,7 +195,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
// load a resource
loaderObj.load(
// resource URL
'../../cbtc/static/vrtest/path.obj',
'/cbtc/static/vrtest/path.obj',
// called when resource is loaded
function ( object ) {
@ -267,7 +267,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
document.addEventListener( "mousedown", onselect, false );
let vrwebworker = new Worker("../../cbtc/static/workertest/vrwebworker.js");
let vrwebworker = new Worker("/cbtc/static/workertest/vrwebworker.js");
let connectmsg = {
type:'init',
@ -1144,7 +1144,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
var loader = new THREE.TextureLoader();
var circle;
loader.load(
'../../cbtc/static/vrtest/ring.png',
'/cbtc/static/vrtest/ring.png',
// onLoad callback
function ( texture ) {
@ -1404,7 +1404,7 @@ export function Jl3dfaultdeviceVR(dom,group,skinCode) {
}
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png";
beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -170,7 +170,7 @@ export function Jl3dOtherVR(dom,group,skinCode) {
this.controls.update();
let otherVrViewWorker = new Worker("../../cbtc/static/workertest/otherVrViewWorker.js");
let otherVrViewWorker = new Worker("/cbtc/static/workertest/otherVrViewWorker.js");
let connectmsg = {
type:'init',
@ -822,7 +822,7 @@ export function Jl3dOtherVR(dom,group,skinCode) {
}
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png";
beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -105,7 +105,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
this.controls.update();
this.modelmanager = new ModelManagerVR();
loader.load(
'../../cbtc/static/vrtest/ring.png',
'/cbtc/static/vrtest/ring.png',
// onLoad callback
function ( texture ) {
@ -163,7 +163,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
document.addEventListener( "mousedown", onselect, false );
let vrwebworker = new Worker("../../cbtc/static/workertest/vrwebworker.js");
let vrwebworker = new Worker("/cbtc/static/workertest/vrwebworker.js");
let connectmsg = {
type:'init',
@ -611,7 +611,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
}
}
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png";
beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -4,36 +4,36 @@ var TrainRescueStatic = {
name: "动画模型",
deviceType: "animatemodel",
type: "animatemodel",
url: "../../cbtc/static/vrtest/trainrescue/DH923.FBX"
url: "/cbtc/static/vrtest/trainrescue/DH923.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX"
//../../cbtc/static/MODEL/device/switch.FBX
///cbtc/static/MODEL/device/switch.FBX
floorplane: {
id: "2",
name: "行走范围",
deviceType: "runplane",
type: "runplane",
url: "../../cbtc/static/vrtest/trainrescue/diban.FBX"
url: "/cbtc/static/vrtest/trainrescue/diban.FBX"
},
controlmodel: {
id: "3",
name: "控制台",
deviceType: "controlmodel",
type: "controlmodel",
url: "../../cbtc/static/vrtest/trainrescue/kongzhigan.FBX"
url: "/cbtc/static/vrtest/trainrescue/kongzhigan.FBX"
},
other: {
id: "4",
name: "其他",
deviceType: "other",
type: "other",
url: "../../cbtc/static/vrtest/trainrescue/TK.FBX"
url: "/cbtc/static/vrtest/trainrescue/TK.FBX"
},
handR: {
id: "5",
name: "handr",
deviceType: "handr",
type: "handr",
url: "../../cbtc/static/vrtest/trainrescue/handr.FBX"
url: "/cbtc/static/vrtest/trainrescue/handr.FBX"
}
}

View File

@ -102,7 +102,7 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
//地图模型数据
let mapdata = new Jl3ddata();
this.webwork = new Worker("../../cbtc/static/workertest/trainworker.js");
this.webwork = new Worker("/cbtc/static/workertest/trainworker.js");
//初始化加载数据和模型getPublishMapDetail
getPublishMapDetail(skinCode).then(data => {
let mapnetdata = data.data;
@ -124,7 +124,7 @@ export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project
}else{
scope.datatype = "new";
scope.jsonwebworknew = new Worker("../../cbtc/static/workertest/maintainerworker.js");
scope.jsonwebworknew = new Worker("/cbtc/static/workertest/maintainerworker.js");
scope.Subscribe = new Maintainerconnect(scope,routegroup,scope.jsonwebworknew,lablecodemap);
scope.Subscribe.socketon(scope.Subscribe.topic);
MaintainerLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);

View File

@ -7,7 +7,7 @@ export function TrainControl(){
// load a sound and set it as the Audio object's buffer
let audioLoader = new THREE.AudioLoader();
audioLoader.load( '../../cbtc/static/audio/trainmove.ogg', function( buffer ) {
audioLoader.load( '/cbtc/static/audio/trainmove.ogg', function( buffer ) {
scope.sound.setBuffer( buffer );
scope.sound.setLoop( true );
scope.sound.setVolume( 3 );

View File

@ -17,7 +17,7 @@ export function VrGui(){
var geometryPlane = new THREE.PlaneBufferGeometry( 1.4, 2, 16);
var texturePlane = new THREE.TextureLoader().load( '../../cbtc/static/texture/devicemsgpane.png' );
var texturePlane = new THREE.TextureLoader().load( '/cbtc/static/texture/devicemsgpane.png' );
var materialPlane = new THREE.MeshBasicMaterial( {
map: texturePlane,
side: THREE.DoubleSide,
@ -36,7 +36,7 @@ export function VrGui(){
var geometryButtonPane = new THREE.PlaneBufferGeometry( 0.4, 0.2, 16 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonHome.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonHome.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -48,7 +48,7 @@ export function VrGui(){
buttonHome.position.z = 0.02;
plane.add( buttonHome );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonStationList.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonStationList.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -60,7 +60,7 @@ export function VrGui(){
buttonStationList.position.z = 0.02;
plane.add( buttonStationList );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonFaultList.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonFaultList.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -78,7 +78,7 @@ export function VrGui(){
var geometryButtonPage = new THREE.PlaneBufferGeometry( 0.3, 0.1, 16 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonPrevious.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonPrevious.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -90,7 +90,7 @@ export function VrGui(){
buttonPreviousFault.position.z = 0.02;
scope.faultListGroup.add( buttonPreviousFault );
//
// var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/nav.png' );
// var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/nav.png' );
// var material = new THREE.MeshBasicMaterial( {
// map: texture,
// transparent: true,
@ -102,7 +102,7 @@ export function VrGui(){
// buttonPrevious.position.z = 0.02;
// plane.add( buttonPrevious );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonNext.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonNext.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -114,7 +114,7 @@ export function VrGui(){
buttonNextFault.position.z = 0.02;
scope.faultListGroup.add( buttonNextFault );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonPrevious.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonPrevious.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -127,7 +127,7 @@ export function VrGui(){
scope.stationListGroup.add( buttonPreviousStation );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/buttonNext.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/buttonNext.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -145,7 +145,7 @@ export function VrGui(){
var geometryButtonBox = new THREE.PlaneBufferGeometry( 0.25, 0.25, 16 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/nav.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/nav.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -157,7 +157,7 @@ export function VrGui(){
button1.position.z = 0.02;
scope.deviceGroup.add( button1 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/anime.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/anime.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -171,7 +171,7 @@ export function VrGui(){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/reset.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/reset.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -183,7 +183,7 @@ export function VrGui(){
button2.position.z = 0.02;
scope.deviceGroup.add( button2 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/repire.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/repire.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -208,7 +208,7 @@ export function VrGui(){
var geometryButtonBox = new THREE.PlaneBufferGeometry( 0.3, 0.3, 16 );
var textureshebei = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/shebei.png' );
var textureshebei = new THREE.TextureLoader().load( '/cbtc/static/vrtest/shebei.png' );
var material = new THREE.MeshBasicMaterial( {
map: textureshebei,
transparent: true,
@ -220,7 +220,7 @@ export function VrGui(){
buttonShiBei.position.z = 0.02;
plane.add( buttonShiBei );
var texturezhankong = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/zhankong.png' );
var texturezhankong = new THREE.TextureLoader().load( '/cbtc/static/vrtest/zhankong.png' );
var material = new THREE.MeshBasicMaterial( {
map: texturezhankong,
transparent: true,
@ -234,7 +234,7 @@ export function VrGui(){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/station1.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/station1.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -246,7 +246,7 @@ export function VrGui(){
buttonStation1.position.z = 0.02;
plane.add( buttonStation1 );
var texture = new THREE.TextureLoader().load( '../../cbtc/static/vrtest/station2.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/vrtest/station2.png' );
var material = new THREE.MeshBasicMaterial( {
map: texture,
transparent: true,
@ -452,7 +452,7 @@ export function VrGui(){
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/scene.png";
beauty.src = "/cbtc/static/texture/scene.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text,type){

View File

@ -6,42 +6,42 @@ export function ModelManagerVR(){
// code:"test",
// locateType:"01",
// mesh:null,
// url:"../../cbtc/static/vrtest/vrtest.FBX"
// url:"/cbtc/static/vrtest/vrtest.FBX"
// };
this.stationIn = {
code:"stationIn",
locateType:"1",
mesh:null,
url:"../../cbtc/static/vrtest/stationIn.FBX"
url:"/cbtc/static/vrtest/stationIn.FBX"
};
this.stationOut = {
code:"stationOut",
locateType:"2",
mesh:null,
url:"../../cbtc/static/vrtest/stationIn.FBX"
url:"/cbtc/static/vrtest/stationIn.FBX"
};
this.otherDevice = {
code:"otherDevice",
locateType:"3",
mesh:null,
url:"../../cbtc/static/vrtest/otherDevice.FBX"
url:"/cbtc/static/vrtest/otherDevice.FBX"
};
this.train = {
code:"train",
locateType:"4",
mesh:null,
url:"../../cbtc/static/vrtest/vrTrain.FBX"
url:"/cbtc/static/vrtest/vrTrain.FBX"
};
this.human = {
code:"human",
locateType:"5",
mesh:null,
url:"../../cbtc/static/vrtest/vrHuman.FBX"
url:"/cbtc/static/vrtest/vrHuman.FBX"
};
this.loadpromise = function (mixers){

View File

@ -5,16 +5,16 @@ var Staticmodel = {
deviceType: "man",
type: "man",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/man1.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/man1.FBX"
},//"https://joylink.club/oss/wx/switch/switch.FBX"
//../../cbtc/static/MODEL/device/switch.FBX
///cbtc/static/MODEL/device/switch.FBX
man2: {
id: "2",
name: "人物2",
deviceType: "man",
type: "man",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/man2.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/man2.FBX"
},
station: {
id: "3",
@ -22,7 +22,7 @@ var Staticmodel = {
deviceType: "station",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/station.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/station.FBX"
},
zhajiin: {
id: "4",
@ -30,7 +30,7 @@ var Staticmodel = {
deviceType: "zhajiin",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/zhajiin.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/zhajiin.FBX"
},
zhajiout: {
id: "5",
@ -38,7 +38,7 @@ var Staticmodel = {
deviceType: "zhajiout",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/zhajiout.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/zhajiout.FBX"
},
monitor: {
id: "6",
@ -46,7 +46,7 @@ var Staticmodel = {
deviceType: "monitor",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/monitor.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/monitor.FBX"
},
train: {
id: "7",
@ -54,7 +54,7 @@ var Staticmodel = {
deviceType: "train",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/train/train.FBX"
assetUrl: "/cbtc/static/MODEL/train/train.FBX"
},
section: {
id: "8",
@ -62,7 +62,7 @@ var Staticmodel = {
deviceType: "section",
type: "hrb",
picUrl: "",
assetUrl: "../../cbtc/static/MODEL/passflow/section.FBX"
assetUrl: "/cbtc/static/MODEL/passflow/section.FBX"
},

View File

@ -52,8 +52,8 @@ let zhajiout = [];
let deviceaction = [];
// let passerwebwork = new Worker("../../cbtc/static/workertest/passsimulation/passer.js");
let stationwebwork = new Worker("../../cbtc/static/workertest/passsimulation/station.js");
// let passerwebwork = new Worker("/cbtc/static/workertest/passsimulation/passer.js");
let stationwebwork = new Worker("/cbtc/static/workertest/passsimulation/station.js");
let stationzon = new ZoneManager();
//老版本临时ai控制
@ -297,7 +297,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup,viewMap) {
// load a resource
loader.load(
// resource URL
'../../cbtc/static/jl3d/path/path.obj',
'/cbtc/static/jl3d/path/path.obj',
// called when resource is loaded
function ( object ) {

View File

@ -68,7 +68,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
for(let i=0,leni=event.data.body.length;i<leni;i++){
// console.log(event.data.body[i]);
trainrunnew(event.data.body[i]);
trainRunNew(event.data.body[i]);
}
return;
}
@ -152,7 +152,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
}
};
function trainrunnew(data){
function trainRunNew(data){
let code = data.code;
if(trainlisttest.list[code].right != data.right){
@ -833,20 +833,20 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
function switchupdate(data) {
code = data.code;
if (actions[code].normal != data.normal) {
if (data.normal == '02') {
if (data.normal == '1') {
// sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset();
actions[code].action.time = 0;
actions[code].action.timeScale = 1;
actions[code].action.play();
actions[code].normal = "02";
} else if (data.normal == '01') {
actions[code].normal = "1";
} else if (data.normal == '0') {
// sectionlist.switchs.modellist[j].normal = data.normal;
actions[code].action.reset();
actions[code].action.time = actions[code].action._clip.duration;
actions[code].action.timeScale = -1;
actions[code].action.play();
actions[code].normal = "01";
actions[code].normal = "0";
}
}
}

View File

@ -103,7 +103,7 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
//连接到通信
//console.log(this.Subscribe.config);
this.webwork = new Worker("../../cbtc/static/workertest/trainworker.js");
this.webwork = new Worker("/cbtc/static/workertest/trainworker.js");
//初始化加载数据和模型getPublishMapDetail
getPublishMapDetail(skinCode).then(data => {
let mapnetdata = data.data;
@ -111,14 +111,14 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
let assetsdata = JSON.parse(netdata.data.sections);
if(assetsdata.link){
scope.datatype = "old";
scope.jsonwebwork = new Worker("../../cbtc/static/workertest/jsonworker.js");
scope.jsonwebwork = new Worker("/cbtc/static/workertest/jsonworker.js");
scope.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork);
scope.Subscribe.socketon(scope.Subscribe.topic);
SimulationLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
}else{
scope.datatype = "new";
scope.jsonwebworknew = new Worker("../../cbtc/static/workertest/jsonworkernew.js");
scope.jsonwebworknew = new Worker("/cbtc/static/workertest/jsonworkernew.js");
scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew);
scope.Subscribe.socketon(scope.Subscribe.topic);
SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);

View File

@ -11,7 +11,7 @@ let defaultsignal = {
deviceType:"signal",
type:"low",
picUrl:"",
url:"../../cbtc/static/MODEL/signal/d3d.FBX"
url:"/cbtc/static/MODEL/signal/d3d.FBX"
}
let defaulttrain = {
@ -20,7 +20,7 @@ let defaulttrain = {
deviceType:"train",
type:"num4",
picUrl:"",
url:"../../cbtc/static/MODEL/train/train.FBX"
url:"/cbtc/static/MODEL/train/train.FBX"
}
@ -30,15 +30,15 @@ let defaultstation = {
deviceType:"stand",
type:"num4",
picUrl:"",
url:"../../cbtc/static/MODEL/station/fuzhou.FBX"
}//"../../cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
url:"/cbtc/static/MODEL/station/fuzhou.FBX"
}//"/cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
let waicestation = {
id:"10",
name:"外侧车站",
deviceType:"standwaice",
type:"num4",
picUrl:"",
url:"../../cbtc/static/MODEL/station/waicestation.FBX"
url:"/cbtc/static/MODEL/station/waicestation.FBX"
}
let station3 = {
id:"10000",
@ -46,12 +46,12 @@ let station3 = {
deviceType:"station3",
type:"num4",
picUrl:"",
url:"../../cbtc/static/MODEL/station/station3.FBX"
url:"/cbtc/static/MODEL/station/station3.FBX"
}
//"../../cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
//"/cbtc/static/MODEL/station/fuzhou/fuzhou.FBX"
//https://test.joylink.club/oss/station/fuzhou/fuzhou.FBX
//https://joylink.club/oss/station/fuzhou/fuzhou.FBX
//../../cbtc/static/MODEL/station/zhantai715(2).FBX
///cbtc/static/MODEL/station/zhantai715(2).FBX
let defaultswitch = {
id:"11",
@ -59,7 +59,7 @@ let defaultswitch = {
deviceType:"switch",
type:"fuzhou",
picUrl:"",
url:"../../cbtc/static/MODEL/daocha/daocha.FBX"
url:"/cbtc/static/MODEL/daocha/daocha.FBX"
}
@ -69,7 +69,7 @@ let defaultsuidao = {
deviceType:"suidao",
type:"suidao",
picUrl:"",
url:"../../cbtc/static/MODEL/suidao/suidao.FBX"
url:"/cbtc/static/MODEL/suidao/suidao.FBX"
}
let hebsuidao = {
@ -78,7 +78,7 @@ let hebsuidao = {
deviceType:"hebsuidao",
type:"hebsuidao",
picUrl:"",
url:"../../cbtc/static/MODEL/suidao/hebsuidao.FBX"
url:"/cbtc/static/MODEL/suidao/hebsuidao.FBX"
}
let nbsuidao = {
id:"1010",
@ -86,7 +86,7 @@ let nbsuidao = {
deviceType:"nbsuidao",
type:"nbsuidao",
picUrl:"",
url:"../../cbtc/static/MODEL/suidao/nbsuidao.FBX"
url:"/cbtc/static/MODEL/suidao/nbsuidao.FBX"
}
let defaultbackground = {
id:"16",
@ -94,12 +94,12 @@ let defaultbackground = {
deviceType:"background",
type:"background",
picUrl:"",
url:"../../cbtc/static/MODEL/suidao/background.FBX"
url:"/cbtc/static/MODEL/suidao/background.FBX"
}
//"../../cbtc/static/MODEL/suidao/suidao.FBX"
//"/cbtc/static/MODEL/suidao/suidao.FBX"
//https://test.joylink.club/oss/suidao/suidao.FBX
//https://joylink.club/oss/suidao/suidao.FBX
//../../cbtc/static/MODEL/suidao/suidao.FBX
///cbtc/static/MODEL/suidao/suidao.FBX
let defaultautorail = {
id:"100",
@ -107,7 +107,7 @@ let defaultautorail = {
deviceType:"autorail",
type:"autorail",
picUrl:"",
url:"../../cbtc/static/MODEL/auto/rail.FBX"
url:"/cbtc/static/MODEL/auto/rail.FBX"
}
let autoswitch = {
@ -116,7 +116,7 @@ let autoswitch = {
deviceType:"autoswitch",
type:"fuzhou",
picUrl:"",
url:"../../cbtc/static/MODEL/auto/autoswitch.FBX"
url:"/cbtc/static/MODEL/auto/autoswitch.FBX"
}
let autoswitch1 = {
@ -125,7 +125,7 @@ let autoswitch1 = {
deviceType:"autoswitch1",
type:"fuzhou",
picUrl:"",
url:"../../cbtc/static/MODEL/auto/switch1.FBX"
url:"/cbtc/static/MODEL/auto/switch1.FBX"
}
let autoswitch2 = {
@ -134,7 +134,7 @@ let autoswitch2 = {
deviceType:"autoswitch2",
type:"fuzhou",
picUrl:"",
url:"../../cbtc/static/MODEL/auto/switch2.FBX"
url:"/cbtc/static/MODEL/auto/switch2.FBX"
}
export function AssetLoader(){

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,13 +2,13 @@ import { BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
export function Materialload(jlmap3dedit,standTextureData){
if(jlmap3dedit.materiallist){
settexture(jlmap3dedit.materiallist,"red",'../../cbtc/static/material/signal/1.jpg');
settexture(jlmap3dedit.materiallist,"red",'/cbtc/static/material/signal/1.jpg');
settexture(jlmap3dedit.materiallist,"yellow",'../../cbtc/static/material/signal/2.jpg');
settexture(jlmap3dedit.materiallist,"yellow",'/cbtc/static/material/signal/2.jpg');
settexture( jlmap3dedit.materiallist,"green",'../../cbtc/static/material/signal/3.jpg');
settexture( jlmap3dedit.materiallist,"green",'/cbtc/static/material/signal/3.jpg');
settexture( jlmap3dedit.materiallist,"black",'../../cbtc/static/material/signal/5.jpg');
settexture( jlmap3dedit.materiallist,"black",'/cbtc/static/material/signal/5.jpg');
}
if(standTextureData.urls.length > 1){
@ -20,98 +20,98 @@ export function Materialload(jlmap3dedit,standTextureData){
// if(assettype){
// if(assettype.stationtexture == "xian3"){
// if(jlmap3dedit.stationtexture){
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../cbtc/static/texture/xian3/xian3list.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../cbtc/static/texture/xian3/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station18000",'../../cbtc/static/texture/xian3/Station18000.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station61238",'../../cbtc/static/texture/xian3/Station61238.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station41790",'../../cbtc/static/texture/xian3/Station41790.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station67945",'../../cbtc/static/texture/xian3/Station67945.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station85598",'../../cbtc/static/texture/xian3/Station85598.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station4324",'../../cbtc/static/texture/xian3/Station4324.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station55755",'../../cbtc/static/texture/xian3/Station55755.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station53597",'../../cbtc/static/texture/xian3/Station53597.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station68029",'../../cbtc/static/texture/xian3/Station68029.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station17596",'../../cbtc/static/texture/xian3/Station17596.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station66742",'../../cbtc/static/texture/xian3/Station66742.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station90701",'../../cbtc/static/texture/xian3/Station90701.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station90652",'../../cbtc/static/texture/xian3/Station90652.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station54200",'../../cbtc/static/texture/xian3/Station54200.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station19253",'../../cbtc/static/texture/xian3/Station19253.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station37821",'../../cbtc/static/texture/xian3/Station37821.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station47557",'../../cbtc/static/texture/xian3/Station47557.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78551",'../../cbtc/static/texture/xian3/Station78551.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station64474",'../../cbtc/static/texture/xian3/Station64474.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station21203",'../../cbtc/static/texture/xian3/Station21203.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station34499",'../../cbtc/static/texture/xian3/Station34499.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station571",'../../cbtc/static/texture/xian3/Station571.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station99903",'../../cbtc/static/texture/xian3/Station99903.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station43447",'../../cbtc/static/texture/xian3/Station43447.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station67917",'../../cbtc/static/texture/xian3/Station67917.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station60649",'../../cbtc/static/texture/xian3/Station60649.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'/cbtc/static/texture/xian3/xian3list.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'/cbtc/static/texture/xian3/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station18000",'/cbtc/static/texture/xian3/Station18000.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station61238",'/cbtc/static/texture/xian3/Station61238.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station41790",'/cbtc/static/texture/xian3/Station41790.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station67945",'/cbtc/static/texture/xian3/Station67945.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station85598",'/cbtc/static/texture/xian3/Station85598.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station4324",'/cbtc/static/texture/xian3/Station4324.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station55755",'/cbtc/static/texture/xian3/Station55755.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station53597",'/cbtc/static/texture/xian3/Station53597.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station68029",'/cbtc/static/texture/xian3/Station68029.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station17596",'/cbtc/static/texture/xian3/Station17596.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station66742",'/cbtc/static/texture/xian3/Station66742.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station90701",'/cbtc/static/texture/xian3/Station90701.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station90652",'/cbtc/static/texture/xian3/Station90652.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station54200",'/cbtc/static/texture/xian3/Station54200.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station19253",'/cbtc/static/texture/xian3/Station19253.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station37821",'/cbtc/static/texture/xian3/Station37821.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station47557",'/cbtc/static/texture/xian3/Station47557.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78551",'/cbtc/static/texture/xian3/Station78551.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station64474",'/cbtc/static/texture/xian3/Station64474.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station21203",'/cbtc/static/texture/xian3/Station21203.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station34499",'/cbtc/static/texture/xian3/Station34499.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station571",'/cbtc/static/texture/xian3/Station571.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station99903",'/cbtc/static/texture/xian3/Station99903.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station43447",'/cbtc/static/texture/xian3/Station43447.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station67917",'/cbtc/static/texture/xian3/Station67917.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station60649",'/cbtc/static/texture/xian3/Station60649.jpg');
// }
// }
// if(assettype.stationtexture == "haerbin1"){
// if(jlmap3dedit.stationtexture){
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../cbtc/static/texture/heb/haerbinlist.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../cbtc/static/texture/heb/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station5361",'../../cbtc/static/texture/heb/Station5361.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11094",'../../cbtc/static/texture/heb/Station11094.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11136",'../../cbtc/static/texture/heb/Station11136.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station17293",'../../cbtc/static/texture/heb/Station17293.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station18398",'../../cbtc/static/texture/heb/Station18398.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station22163",'../../cbtc/static/texture/heb/Station22163.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station25464",'../../cbtc/static/texture/heb/Station25464.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28090",'../../cbtc/static/texture/heb/Station28090.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station41999",'../../cbtc/static/texture/heb/Station41999.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station44338",'../../cbtc/static/texture/heb/Station44338.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station46464",'../../cbtc/static/texture/heb/Station46464.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station50565",'../../cbtc/static/texture/heb/Station50565.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station60068",'../../cbtc/static/texture/heb/Station60068.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station62429",'../../cbtc/static/texture/heb/Station62429.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station64444",'../../cbtc/static/texture/heb/Station64444.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station71700",'../../cbtc/static/texture/heb/Station71700.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72132",'../../cbtc/static/texture/heb/Station72132.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78164",'../../cbtc/static/texture/heb/Station78164.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station79537",'../../cbtc/static/texture/heb/Station79537.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station82618",'../../cbtc/static/texture/heb/Station82618.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station85520",'../../cbtc/static/texture/heb/Station85520.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station89483",'../../cbtc/static/texture/heb/Station89483.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station96090",'../../cbtc/static/texture/heb/Station96090.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'/cbtc/static/texture/heb/haerbinlist.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'/cbtc/static/texture/heb/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station5361",'/cbtc/static/texture/heb/Station5361.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11094",'/cbtc/static/texture/heb/Station11094.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11136",'/cbtc/static/texture/heb/Station11136.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station17293",'/cbtc/static/texture/heb/Station17293.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station18398",'/cbtc/static/texture/heb/Station18398.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station22163",'/cbtc/static/texture/heb/Station22163.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station25464",'/cbtc/static/texture/heb/Station25464.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28090",'/cbtc/static/texture/heb/Station28090.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station41999",'/cbtc/static/texture/heb/Station41999.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station44338",'/cbtc/static/texture/heb/Station44338.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station46464",'/cbtc/static/texture/heb/Station46464.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station50565",'/cbtc/static/texture/heb/Station50565.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station60068",'/cbtc/static/texture/heb/Station60068.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station62429",'/cbtc/static/texture/heb/Station62429.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station64444",'/cbtc/static/texture/heb/Station64444.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station71700",'/cbtc/static/texture/heb/Station71700.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72132",'/cbtc/static/texture/heb/Station72132.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78164",'/cbtc/static/texture/heb/Station78164.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station79537",'/cbtc/static/texture/heb/Station79537.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station82618",'/cbtc/static/texture/heb/Station82618.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station85520",'/cbtc/static/texture/heb/Station85520.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station89483",'/cbtc/static/texture/heb/Station89483.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station96090",'/cbtc/static/texture/heb/Station96090.jpg');
// }
// }
// if(assettype.stationtexture == "nb1"){
// if(jlmap3dedit.stationtexture){
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../cbtc/static/texture/nb1/nb1list.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../cbtc/static/texture/nb1/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station1533",'../../cbtc/static/texture/nb1/Station1533.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11231",'../../cbtc/static/texture/nb1/Station11231.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station12421",'../../cbtc/static/texture/nb1/Station12421.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station16356",'../../cbtc/static/texture/nb1/Station16356.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station18678",'../../cbtc/static/texture/nb1/Station18678.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station19817",'../../cbtc/static/texture/nb1/Station19817.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station23567",'../../cbtc/static/texture/nb1/Station23567.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station24903",'../../cbtc/static/texture/nb1/Station24903.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station26416",'../../cbtc/static/texture/nb1/Station26416.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station27207",'../../cbtc/static/texture/nb1/Station27207.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28032",'../../cbtc/static/texture/nb1/Station28032.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28958",'../../cbtc/static/texture/nb1/Station28958.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station30520",'../../cbtc/static/texture/nb1/Station30520.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station32955",'../../cbtc/static/texture/nb1/Station32955.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station38286",'../../cbtc/static/texture/nb1/Station38286.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station38674",'../../cbtc/static/texture/nb1/Station38674.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station44173",'../../cbtc/static/texture/nb1/Station44173.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station63100",'../../cbtc/static/texture/nb1/Station63100.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station69378",'../../cbtc/static/texture/nb1/Station69378.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72310",'../../cbtc/static/texture/nb1/Station72310.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72764",'../../cbtc/static/texture/nb1/Station72764.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75414",'../../cbtc/static/texture/nb1/Station75414.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75494",'../../cbtc/static/texture/nb1/Station75494.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75703",'../../cbtc/static/texture/nb1/Station75703.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78392",'../../cbtc/static/texture/nb1/Station78392.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station81700",'../../cbtc/static/texture/nb1/Station81700.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station84098",'../../cbtc/static/texture/nb1/Station84098.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station86112",'../../cbtc/static/texture/nb1/Station86112.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station99584",'../../cbtc/static/texture/nb1/Station99584.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"stationlist",'/cbtc/static/texture/nb1/nb1list.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'/cbtc/static/texture/nb1/pingbimen.png');
// setstationtexture(jlmap3dedit.stationtexture,"Station1533",'/cbtc/static/texture/nb1/Station1533.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station11231",'/cbtc/static/texture/nb1/Station11231.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station12421",'/cbtc/static/texture/nb1/Station12421.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station16356",'/cbtc/static/texture/nb1/Station16356.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station18678",'/cbtc/static/texture/nb1/Station18678.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station19817",'/cbtc/static/texture/nb1/Station19817.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station23567",'/cbtc/static/texture/nb1/Station23567.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station24903",'/cbtc/static/texture/nb1/Station24903.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station26416",'/cbtc/static/texture/nb1/Station26416.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station27207",'/cbtc/static/texture/nb1/Station27207.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28032",'/cbtc/static/texture/nb1/Station28032.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station28958",'/cbtc/static/texture/nb1/Station28958.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station30520",'/cbtc/static/texture/nb1/Station30520.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station32955",'/cbtc/static/texture/nb1/Station32955.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station38286",'/cbtc/static/texture/nb1/Station38286.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station38674",'/cbtc/static/texture/nb1/Station38674.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station44173",'/cbtc/static/texture/nb1/Station44173.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station63100",'/cbtc/static/texture/nb1/Station63100.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station69378",'/cbtc/static/texture/nb1/Station69378.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72310",'/cbtc/static/texture/nb1/Station72310.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station72764",'/cbtc/static/texture/nb1/Station72764.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75414",'/cbtc/static/texture/nb1/Station75414.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75494",'/cbtc/static/texture/nb1/Station75494.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station75703",'/cbtc/static/texture/nb1/Station75703.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station78392",'/cbtc/static/texture/nb1/Station78392.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station81700",'/cbtc/static/texture/nb1/Station81700.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station84098",'/cbtc/static/texture/nb1/Station84098.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station86112",'/cbtc/static/texture/nb1/Station86112.jpg');
// setstationtexture(jlmap3dedit.stationtexture,"Station99584",'/cbtc/static/texture/nb1/Station99584.jpg');
// }
// }
// }

View File

@ -84,7 +84,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
}
}
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList);
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,3);
// assetloader.setmodellistnew(netdata.assets);

View File

@ -226,7 +226,7 @@ export function StationStandList() {
//canvas文字贴图方法
//PS:待提炼 增强功能
var stationcanvas = new Image();
stationcanvas.src = "../../cbtc/static/texture/msgt.png";
stationcanvas.src = "/cbtc/static/texture/msgt.png";
function getTextCanvas(text){
let canvas = document.getElementById('canvastexture');

View File

@ -213,7 +213,7 @@ let onProgress = function ( xhr ) {
let onError = function () { };
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guide.png";
beauty.src = "/cbtc/static/texture/guide.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){

View File

@ -147,9 +147,9 @@ export function RailListN(){
for(let i=0;i<section.length;i++){
scope.sectionrail[section[i].code].lineleft = new THREE.CatmullRomCurve3(scope.sectionrail[section[i].code].points);
scope.sectionrail[section[i].code].lineleft.curveType = "centripetal";
scope.sectionrail[section[i].code].lineleft.curveType = "chordal";
scope.sectionrail[section[i].code].lineleft.tension = 0.15;
scope.sectionrail[section[i].code].lineleft.name = section[i].code;
// scope.sectionrail[section[i].code].lineleft.tension = 0.2;
let rightpoints = [];
scope.sectionrail[section[i].code].points.forEach(item=>{
rightpoints.push(item);
@ -157,7 +157,8 @@ export function RailListN(){
);
rightpoints.reverse();
scope.sectionrail[section[i].code].lineright = new THREE.CatmullRomCurve3(rightpoints);
scope.sectionrail[section[i].code].lineright.curveType = "centripetal";
scope.sectionrail[section[i].code].lineright.curveType = "chordal";
scope.sectionrail[section[i].code].lineright.tension = 0.15;
scope.sectionrail[section[i].code].lineright.name = section[i].code;
if(section[i].standTrack == true){
scope.sectionrail[section[i].code].standTrack = true;
@ -240,37 +241,37 @@ export function RailListN(){
scope.sectionrail[sectioncode].lineright.closed = false;
scope.sectionrail[sectioncode].lineright.name = sectioncode;
// for(let n=0,nm=scope.sectionrail[sectioncode].lineleft.points.length;n<nm;n++){
// var geometry = new THREE.CircleGeometry( 0.05, 16 );
// var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
// var circle = new THREE.Mesh( geometry, material );
// // console.log(n);
// // console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
// circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x;
// circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y;
// circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z;
// circle.rotation.x = -Math.PI/2;
// scene.add( circle );
// }
// // scope.sectionrail[section[i].code].lineright.tension = 0.11;
// var points = scope.sectionrail[sectioncode].lineleft.getPoints( 50 );
// var geometry = new THREE.BufferGeometry().setFromPoints( points );
// var material;
// if(scope.sectionrail[sectioncode].type == "a"){
// material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
// }
// if(scope.sectionrail[sectioncode].type == "b"){
// material = new THREE.LineBasicMaterial( { color : 0x00ff00 } );
// }
// if(scope.sectionrail[sectioncode].type == "c"){
// material = new THREE.LineBasicMaterial( { color : 0x0000ff } );
// }
//
//
// // Create the final object to add to the scene
// var curveObject = new THREE.Line( geometry, material );
//
// curveObject.position.y = Math.random();
// scene.add(curveObject);
for(let n=0,nm=scope.sectionrail[sectioncode].lineleft.points.length;n<nm;n++){
var geometry = new THREE.CircleGeometry( 0.05, 16 );
var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } );
var circle = new THREE.Mesh( geometry, material );
// console.log(n);
// console.log(scope.sectionrail[section[i].code].lineleft.points[n]);
circle.position.x = scope.sectionrail[sectioncode].lineleft.points[n].x;
circle.position.y = scope.sectionrail[sectioncode].lineleft.points[n].y;
circle.position.z = scope.sectionrail[sectioncode].lineleft.points[n].z;
circle.rotation.x = -Math.PI/2;
scene.add( circle );
}
// scope.sectionrail[section[i].code].lineright.tension = 0.11;
var points = scope.sectionrail[sectioncode].lineleft.getPoints( 50 );
var geometry = new THREE.BufferGeometry().setFromPoints( points );
var material;
if(scope.sectionrail[sectioncode].type == "a"){
material = new THREE.LineBasicMaterial( { color : 0xff0000 } );
}
if(scope.sectionrail[sectioncode].type == "b"){
material = new THREE.LineBasicMaterial( { color : 0x00ff00 } );
}
if(scope.sectionrail[sectioncode].type == "c"){
material = new THREE.LineBasicMaterial( { color : 0x0000ff } );
}
// Create the final object to add to the scene
var curveObject = new THREE.Line( geometry, material );
curveObject.position.y = Math.random();
scene.add(curveObject);
}
}

View File

@ -19,7 +19,7 @@ export function SectionListN() {
var autorail;
this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
var texture = new THREE.TextureLoader().load( '../../cbtc/static/test/z0251.png' );
var texture = new THREE.TextureLoader().load( '/cbtc/static/test/z0251.png' );
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 1,1);
@ -99,16 +99,30 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
if(newsection.railpoint.length>=3){
// console.log(newsection);
let height = Math.random()/1000;
var closedSpline = new THREE.CatmullRomCurve3( [
new THREE.Vector3(newsection.railpoint[0].x,newsection.railpoint[0].y,newsection.railpoint[0].z),
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[1].y,newsection.railpoint[1].z+0.0001),
new THREE.Vector3(newsection.railpoint[2].x,newsection.railpoint[2].y,newsection.railpoint[2].z)
] );
var closedSpline;
if(Math.abs(newsection.railpoint[0].y-newsection.railpoint[2].y)>0.01){
console.log(newsection.railpoint);
closedSpline = new THREE.CatmullRomCurve3( [
new THREE.Vector3(newsection.railpoint[0].x,newsection.railpoint[0].y,newsection.railpoint[0].z),
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[1].y,newsection.railpoint[1].z+0.001),
new THREE.Vector3(newsection.railpoint[2].x,newsection.railpoint[2].y,newsection.railpoint[2].z)
] );
}else{
closedSpline = new THREE.CatmullRomCurve3( [
new THREE.Vector3(newsection.railpoint[0].x,newsection.railpoint[0].y,newsection.railpoint[0].z),
new THREE.Vector3(newsection.railpoint[1].x,newsection.railpoint[0].y,newsection.railpoint[1].z+0.001),
new THREE.Vector3(newsection.railpoint[2].x,newsection.railpoint[0].y,newsection.railpoint[2].z)
] );
}
closedSpline.type = 'catmullrom';
// closedSpline.type = 'catmullrom';
closedSpline.curveType = "chordal";
closedSpline.tension = 0.15;
closedSpline.closed = false;
var extrudeSettings = {
steps : 5,
steps : 6,
curveSegments : 1,
bevelSegments : 1,
bevelEnabled : false,
@ -117,7 +131,9 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
var shape = new THREE.Shape();
len = closedSpline.getLength();
if(newsection.railpoint[0].y != newsection.railpoint[2].y){
if(Math.abs(newsection.railpoint[0].y - newsection.railpoint[2].y)>0.001){
shape.moveTo( -2, 0 );
shape.lineTo( 2, 0 );
}else{
@ -133,16 +149,16 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
if(i%2 != 0){
mesh.geometry.attributes.uv.array[ui] = 0;
mesh.geometry.attributes.uv.array[ui+1] = 1;
mesh.geometry.attributes.uv.array[ui+2] = len/5;
mesh.geometry.attributes.uv.array[ui+2] = len/6;
mesh.geometry.attributes.uv.array[ui+3] = 1;
mesh.geometry.attributes.uv.array[ui+4] = len/5;
mesh.geometry.attributes.uv.array[ui+4] = len/6;
mesh.geometry.attributes.uv.array[ui+5] = 0;
}else{
mesh.geometry.attributes.uv.array[ui] = 0;
mesh.geometry.attributes.uv.array[ui+1] = 0;
mesh.geometry.attributes.uv.array[ui+2] = 0;
mesh.geometry.attributes.uv.array[ui+3] = 1;
mesh.geometry.attributes.uv.array[ui+4] = len/5;
mesh.geometry.attributes.uv.array[ui+4] = len/6;
mesh.geometry.attributes.uv.array[ui+5] = 0;
}
}
@ -158,7 +174,9 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
new THREE.Vector3(newsection.railpoint[1].x,height,newsection.railpoint[0].z),
] );
closedSpline.type = 'catmullrom';
// closedSpline.type = 'catmullrom';
closedSpline.curveType = "chordal";
closedSpline.tension = 0.15;
closedSpline.closed = false;
// Set up settings for later extrusion
var extrudeSettings = {

View File

@ -401,7 +401,7 @@ export function StationStandListN() {
//canvas文字贴图方法
//PS:待提炼 增强功能
var stationcanvas = new Image();
stationcanvas.src = "../../cbtc/static/texture/msgtnew.png";
stationcanvas.src = "/cbtc/static/texture/msgtnew.png";
function getTextCanvas(text){
let canvas = document.getElementById('canvastexture');

View File

@ -77,11 +77,11 @@ export function TrainListN() {
//
// fclip = new THREE.AnimationClip("four",2,ntracks2);
ntracks2 = assetloader.modellist[n].animations.slice(6,13);
ntracks2 = assetloader.modellist[n].animations.slice(6,14);
fclip = new THREE.AnimationClip("four",2,ntracks2);
ntracks1 = assetloader.modellist[n].animations.slice(0,5);
ntracks1 = assetloader.modellist[n].animations.slice(0,6);
tclip = new THREE.AnimationClip("three",2,ntracks1);
@ -218,11 +218,11 @@ export function TrainListN() {
//
// fclip = new THREE.AnimationClip("four",2,ntracks2);
ntracks2 = assetloader.modellist[n].animations.slice(6,13);
ntracks2 = assetloader.modellist[n].animations.slice(6,14);
fclip = new THREE.AnimationClip("four",2,ntracks2);
ntracks1 = assetloader.modellist[n].animations.slice(0,5);
ntracks1 = assetloader.modellist[n].animations.slice(0,6);
tclip = new THREE.AnimationClip("three",2,ntracks1);
n = 0;
@ -281,33 +281,33 @@ export function TrainListN() {
}
}else{
for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){
if(newmesh.children[j].children[n].name == "top"){
newmesh.children[j].children[n].animations = [];
newmesh.children[j].children[n].animations.push(fclip.clone());
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
newmesh.mixer.push(mixer);
newmesh.mixerpush = false;
// mixers.push(mixer);
let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] );
//action.play();
action.setLoop(THREE.LoopOnce);
action.clampWhenFinished = true;
actionss[data[i].groupNumber].top.push(action);
}
if(newmesh.children[j].children[n].name == "top"){
newmesh.children[j].children[n].animations = [];
newmesh.children[j].children[n].animations.push(fclip.clone());
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
newmesh.mixer.push(mixer);
newmesh.mixerpush = false;
// mixers.push(mixer);
let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] );
//action.play();
action.setLoop(THREE.LoopOnce);
action.clampWhenFinished = true;
actionss[data[i].groupNumber].top.push(action);
}
if(newmesh.children[j].children[n].name == "down"){
newmesh.children[j].children[n].animations = [];
newmesh.children[j].children[n].animations.push(fclip.clone());
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
newmesh.mixer.push(mixer);
newmesh.mixerpush = false;
// mixers.push(mixer);
let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] );
//action.play();
action.setLoop(THREE.LoopOnce);
action.clampWhenFinished = true;
actionss[data[i].groupNumber].down.push(action);
}
if(newmesh.children[j].children[n].name == "down"){
newmesh.children[j].children[n].animations = [];
newmesh.children[j].children[n].animations.push(fclip.clone());
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
newmesh.mixer.push(mixer);
newmesh.mixerpush = false;
// mixers.push(mixer);
let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] );
//action.play();
action.setLoop(THREE.LoopOnce);
action.clampWhenFinished = true;
actionss[data[i].groupNumber].down.push(action);
}
}
}
//newmesh.children[j].name = data[i].code;
@ -415,7 +415,7 @@ let onProgress = function ( xhr ) {
let onError = function () { };
var beauty = new Image();
beauty.src = "../../cbtc/static/texture/guidenew.png";
beauty.src = "/cbtc/static/texture/guidenew.png";
//canvas文字贴图方法
//PS:待提炼 增强功能
function getTextCanvas(text){