修改三维铁轨透明贴图渲染,修改佛山线场景漫游轨迹

This commit is contained in:
sunzhenyu 2021-01-19 16:27:09 +08:00
parent 19cede5338
commit a2bb806b03
2 changed files with 19 additions and 10 deletions

View File

@ -404,19 +404,25 @@ 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));
console.log(stationstandlist.group.children[0]);
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();

View File

@ -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 } );