Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
745dbd6859
@ -390,7 +390,6 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
||||
|
||||
//相机轨迹动画
|
||||
this.camerarailmove = function(){
|
||||
console.log(scope.mixers);
|
||||
camerarail.moveswitch = true;
|
||||
camerarail.progress = 0;
|
||||
let points = [];
|
||||
@ -404,19 +403,24 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
||||
// points.push(new THREE.Vector3(stationp1.x+38,11,stationp1.z-15));
|
||||
// points.push(new THREE.Vector3(stationp1.x+38,11,stationp1.z+2));
|
||||
// points.push(new THREE.Vector3(stationp1.x+13,5,stationp1.z+2));
|
||||
|
||||
if(stationstandlist.group.children[0].inside == false){
|
||||
points.push(new THREE.Vector3(stationp1.x-65,11,stationp1.z-26));
|
||||
points.push(new THREE.Vector3(stationp1.x+60,11,stationp1.z-26));
|
||||
points.push(new THREE.Vector3(stationp1.x+60,7,stationp1.z-26));
|
||||
points.push(new THREE.Vector3(stationp1.x-55,5,stationp1.z-26));
|
||||
if(stationstandlist.group.children[0].code == "Station34"){
|
||||
points.push(new THREE.Vector3(stationp1.x+60,4,stationp1.z-23));
|
||||
points.push(new THREE.Vector3(stationp1.x-55,4,stationp1.z-23));
|
||||
}else{
|
||||
points.push(new THREE.Vector3(stationp1.x-65,11,stationp1.z+12));
|
||||
points.push(new THREE.Vector3(stationp1.x+60,11,stationp1.z+12));
|
||||
points.push(new THREE.Vector3(stationp1.x+60,7,stationp1.z+12));
|
||||
points.push(new THREE.Vector3(stationp1.x-55,5,stationp1.z+12));
|
||||
if(stationstandlist.group.children[0].inside == false){
|
||||
points.push(new THREE.Vector3(stationp1.x-65,11,stationp1.z-26));
|
||||
points.push(new THREE.Vector3(stationp1.x+60,11,stationp1.z-26));
|
||||
points.push(new THREE.Vector3(stationp1.x+60,7,stationp1.z-26));
|
||||
points.push(new THREE.Vector3(stationp1.x-55,5,stationp1.z-26));
|
||||
}else{
|
||||
points.push(new THREE.Vector3(stationp1.x-65,11,stationp1.z+12));
|
||||
points.push(new THREE.Vector3(stationp1.x+60,11,stationp1.z+12));
|
||||
points.push(new THREE.Vector3(stationp1.x+60,7,stationp1.z+12));
|
||||
points.push(new THREE.Vector3(stationp1.x-55,5,stationp1.z+12));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// points.push(new THREE.Vector3(stationp1.x+40,3,stationp1.z+15));
|
||||
// controls.target = new THREE.Vector3(camera.position.x+1,camera.position.y,camera.position.z);
|
||||
// controls.update();
|
||||
|
@ -22,6 +22,9 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
|
||||
|
||||
var texture = new THREE.TextureLoader().load( JL3D_LOCAL_STATIC+'/test/z0251.png' );
|
||||
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
|
||||
texture.anisotropy = 0;
|
||||
texture.magFilter = THREE.NearestFilter;
|
||||
texture.minFilter = THREE.NearestFilter;
|
||||
texture.repeat.set( 1,1);
|
||||
|
||||
var selectmaterial = new THREE.MeshPhongMaterial( { map: texture,transparent:true,alphaTest:0.1 } );
|
||||
|
@ -110,7 +110,7 @@ export function StationStandListN() {
|
||||
let textmaterial = new THREE.MeshBasicMaterial( { side: THREE.DoubleSide,map:textt ,transparent: true} );
|
||||
let textplane = new THREE.Mesh( textgeometry, textmaterial );
|
||||
textplane.name = stationdata[i].code;
|
||||
textplane.position.y = 70;
|
||||
textplane.position.y = 80;
|
||||
textplane.rotation.x = Math.PI/2;
|
||||
//textplane.position.x = -30;
|
||||
scope.textlist.push(textplane);
|
||||
@ -372,9 +372,10 @@ export function StationStandListN() {
|
||||
let textmaterial = new THREE.MeshBasicMaterial( { side: THREE.DoubleSide,map:textt ,transparent: true} );
|
||||
let textplane = new THREE.Mesh( textgeometry, textmaterial );
|
||||
textplane.name = standsdata[i].code;
|
||||
console.log("sss");
|
||||
textplane.position.y = 70;
|
||||
textplane.rotation.x = Math.PI/2;
|
||||
textplane.position.z = 50;
|
||||
textplane.position.z = 80;
|
||||
scope.textlist.push(textplane);
|
||||
newstationmesh.add(textplane);
|
||||
textgeometry.dispose();
|
||||
|
@ -763,7 +763,8 @@ class SkinCode extends defaultStyle {
|
||||
targetCodePrefix: '000', // 目的地码前缀
|
||||
defaultTargetCode: 'AAA', // 默认目的地码
|
||||
trainTargetTextAlign: 'left', // 车次号文字显示位置
|
||||
trainNumberOffset: { x: 48, y: 3 }// 目的地码偏移量
|
||||
trainNumberOffset: { x: 48, y: 3 }, // 目的地码偏移量
|
||||
fontColor: '#00C300'
|
||||
},
|
||||
trainServer: {
|
||||
serviceNumberPrefix: '000', // 服务号(表号)前缀
|
||||
@ -792,12 +793,16 @@ class SkinCode extends defaultStyle {
|
||||
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||
},
|
||||
driveModeText: { // 驾驶模式
|
||||
driveModeTextOffset: { x: 30, y: 25 }
|
||||
},
|
||||
common: {
|
||||
hasTravelSigns: true, // 是否有行进标志
|
||||
hasAtrStatus: true, // 是否有atr状态
|
||||
hasDelayTime: true, // 是否有延迟时间
|
||||
hasCrewNum: true, // 是否有乘务组号
|
||||
hasTravelNum: true, // 是否有行程号
|
||||
hasDriveMode: true, // 是否有驾驶模式
|
||||
fixedCoordinates: true, // 列车车组号等固定坐标
|
||||
trainHeight: 40, // 列车高度
|
||||
trainHeadDistance: 2, // 列车和车头之间的间距
|
||||
@ -808,7 +813,12 @@ class SkinCode extends defaultStyle {
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
|
||||
trainWidthMoreText: 2, // 计算列车长度时--列车长比text多出尺寸
|
||||
trainTip:true // 鼠标悬停列车状态信息框是否显示
|
||||
trainTip:true, // 鼠标悬停列车状态信息框是否显示
|
||||
cbtcSpeedColor: true, // 列车车组号 驾驶模式等 是否在cbtc列车中随速度变化颜色
|
||||
cbtcSpeedColorLevel1: '#F00', // cbtc 列车禁止时 车组号 驾驶模式 颜色
|
||||
cbtcSpeedColorLevel2: '#BA00BA', // cbtc 列车 速度 小于25 大于0 时 颜色
|
||||
cbtcSpeedColorLevel3: '#F3FE00', // cbtc 列车 速度 大于25 小于60 时 颜色
|
||||
cbtcSpeedColorLevel4: '#00FF00' // cttc 列车 速度 大于60时 颜色
|
||||
},
|
||||
trainStatusStyle: {
|
||||
defaultDestinationColor: '#FFFF00', // 默认目的地状态显示颜色
|
||||
@ -845,32 +855,32 @@ class SkinCode extends defaultStyle {
|
||||
driveModeStatus: [
|
||||
{
|
||||
status: 'AM',
|
||||
trainLColor: '#00FF00',
|
||||
trainRColor: '#00FF00'
|
||||
traveNumColor: '#00FF00',
|
||||
serviceColor: '#00FF00',
|
||||
tripColor: '#00FF00'
|
||||
},
|
||||
{
|
||||
status: 'CM',
|
||||
trainLColor: '#FFFF00',
|
||||
trainRColor: '#FFFF00'
|
||||
traveNumColor: '#FF0000',
|
||||
serviceColor: '#FF0000',
|
||||
tripColor: '#FF0000'
|
||||
},
|
||||
{
|
||||
status: 'RM',
|
||||
trainLColor: '#EA700D',
|
||||
trainRColor: '#EA700D'
|
||||
traveNumColor: '#FF0000',
|
||||
serviceColor: '#FF0000',
|
||||
tripColor: '#FF0000'
|
||||
},
|
||||
{
|
||||
status: 'NRM',
|
||||
trainLColor: '#A0522D',
|
||||
trainRColor: '#A0522D'
|
||||
traveNumColor: '#FF0000',
|
||||
serviceColor: '#FF0000',
|
||||
tripColor: '#FF0000'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM
|
||||
runControlStatus: [], // 设置运行控制状态类型 eg:{status: '01', hShow: false, sShow: false}
|
||||
doorStatus: [], // 设置车门状态类型
|
||||
communicationStatus: [
|
||||
{status: 'CBTC', trainColor: '#000000'},
|
||||
{status: 'ITC', trainColor: '#C0C0C0'},
|
||||
{status: 'IL', trainColor: '#C0C0C0'}
|
||||
], // 设置通信状态
|
||||
communicationStatus: [], // 设置通信状态
|
||||
alarmStatus: [], // 设置报警状态 eg:{status: '01', aShow: false}
|
||||
serverNoType: []// 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'}
|
||||
}
|
||||
|
@ -281,6 +281,23 @@ export default class TrainBody extends Group {
|
||||
});
|
||||
this.add(this.delayTime);
|
||||
}
|
||||
if (style.Train.common.hasDriveMode) {
|
||||
this.driveModeText = new ETextName({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 1,
|
||||
x: parseInt(model.point.x + style.Train.driveModeText.driveModeTextOffset.x),
|
||||
y: parseInt(model.point.y + style.Train.driveModeText.driveModeTextOffset.y),
|
||||
text: model.driveMode,
|
||||
textFill: '#DADA00',
|
||||
textStroke: style.trainTextColor,
|
||||
textStrokeWidth: 0,
|
||||
fontSize: model.fontSize,
|
||||
fontFamily: style.Train.common.fontFamily,
|
||||
textAlign: 'left',
|
||||
textVerticalAlign: 'top'
|
||||
});
|
||||
this.add(this.driveModeText);
|
||||
}
|
||||
}
|
||||
|
||||
removeTrainDetail() {
|
||||
@ -326,6 +343,15 @@ export default class TrainBody extends Group {
|
||||
return new BoundingRect(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
setTravelNumColor(color) { // 设置目的地码颜色
|
||||
this.travelNum && this.travelNum.setStyle({ textFill: color });
|
||||
}
|
||||
setServiceColor(color) { // 设置服务号颜色
|
||||
this.textTrainServer && this.textTrainServer.setStyle({ textFill: color });
|
||||
}
|
||||
setTripColor(color) { // 设置车次号颜色
|
||||
this.textTrainTrip && this.textTrainTrip.setStyle({ textFill: color });
|
||||
}
|
||||
getBoundingRectOfFont() { // 获取文字高度
|
||||
if (this.textTrainServer) {
|
||||
const tempRect = this.textTrainServer.getBoundingRect().clone();
|
||||
@ -431,6 +457,26 @@ export default class TrainBody extends Group {
|
||||
}
|
||||
}
|
||||
}
|
||||
setSpeedColor(speed) {
|
||||
const style = this.style;
|
||||
if (speed == 0) {
|
||||
this.crewNum && this.crewNum.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel1});
|
||||
this.textTrainGroup && this.textTrainGroup.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel1});
|
||||
this.driveModeText && this.driveModeText.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel1});
|
||||
} else if (speed < 25) {
|
||||
this.crewNum && this.crewNum.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel2});
|
||||
this.textTrainGroup && this.textTrainGroup.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel2});
|
||||
this.driveModeText && this.driveModeText.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel2});
|
||||
} else if (speed < 60) {
|
||||
this.crewNum && this.crewNum.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel3});
|
||||
this.textTrainGroup && this.textTrainGroup.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel3});
|
||||
this.driveModeText && this.driveModeText.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel3});
|
||||
} else {
|
||||
this.crewNum && this.crewNum.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel4});
|
||||
this.textTrainGroup && this.textTrainGroup.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel4});
|
||||
this.driveModeText && this.driveModeText.setStyle({textFill: style.Train.common.cbtcSpeedColorLevel4});
|
||||
}
|
||||
}
|
||||
setPositionText(model, right) {
|
||||
let widthText = 0;
|
||||
let point = {
|
||||
|
@ -272,8 +272,11 @@ export default class Train extends Group {
|
||||
if (this.style.Train.trainStatusStyle.driveModeStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.driveModeStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainL && this.trainL.setColor(item.trainLColor);
|
||||
this.trainR && this.trainR.setColor(item.trainRColor);
|
||||
this.trainL && item.trainLColor && this.trainL.setColor(item.trainLColor);
|
||||
this.trainR && item.trainRColor && this.trainR.setColor(item.trainRColor);
|
||||
this.trainB && item.traveNumColor && this.trainB.setTravelNumColor(item.traveNumColor);
|
||||
this.trainB && item.serviceColor && this.trainB.setServiceColor(item.serviceColor);
|
||||
this.trainB && item.tripColor && this.trainB.setTripColor(item.tripColor);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -354,6 +357,9 @@ export default class Train extends Group {
|
||||
this.setCommunicationStatus(model.runLevel);
|
||||
this.setSoonerOrLater(model.dt);
|
||||
}
|
||||
if (this.style.Train.common.cbtcSpeedColor && model.runLevel === 'CBTC') { // 南京二号线 ctc列车随速度变化 列车部分颜色发生变化
|
||||
this.trainB.setSpeedColor(model.speed);
|
||||
}
|
||||
this.setDoorStatus(model.doorCloseLock);
|
||||
this.setAlarmStatus(model.alarmStatus);
|
||||
this.setHoldStatus(model.hold);
|
||||
|
Loading…
Reference in New Issue
Block a user