修改3D分布图 网络连接

This commit is contained in:
hzz 2023-06-16 14:29:45 +08:00
parent f961a0674b
commit c0bbca1e72
2 changed files with 42 additions and 34 deletions

View File

@ -404,10 +404,10 @@ const init = () => {
/**创建ac */
createAc({x:52.56,y:0,z:52.24})
createAc({ x: 52.56, y: 0, z: 52.24 })
//
createAc({x:-88.39,y:0,z:-249.36})
createAc({x:82.99,y:0,z:-170.17})
createAc({ x: -88.39, y: 0, z: -249.36 })
createAc({ x: 82.99, y: 0, z: -170.17 })
/**创建AC结束 */
@ -442,7 +442,11 @@ const init = () => {
/*创建第一条线******************/
let garyLine = 0x595959;
let whiteColor = 0xffffff;
createLine(whiteColor, [{ x: -346.00, y: 23.6, z: 59.40 }, { x: -160.50, y: 2, z: 142.08 }], 2)
createLine(whiteColor, [
{ x: -346.00, y: 23.6, z: 39.78 },
{ x: -159.75, y: 2, z: 39.78 },
{ x: -159.75, y: 2, z: 139.78 },
], 2)
//
createLine(whiteColor, [
{ x: -345.65, y: 2, z: 36.40 },
@ -457,7 +461,7 @@ const init = () => {
])
createLine(garyLine, [{x:-88.73,y:2,z:-249.01},{x:-88.73,y:2,z:-117.33} , { x: -174.65, y: 2, z: -117.33 }])
createLine(garyLine, [{ x: -88.73, y: 2, z: -249.01 }, { x: -88.73, y: 2, z: -117.33 }, { x: -174.65, y: 2, z: -117.33 }])
//
createLine(whiteColor, [{ x: -293.44, y: 2, z: 52.52 }, { x: -293.44, y: 2, z: 36.40 }, { x: -235.84, y: 2, z: -30.87 }], 2)
//
@ -505,7 +509,7 @@ const init = () => {
{ x: -164.26, y: 2, z: 30.98 },
{ x: -164.26, y: 2, z: 140.05 }
],2)
], 2)
createLine(garyLine, [
{ x: -164.26, y: 2, z: 140.05 },
{ x: -214.35, y: 2, z: 140.05 }
@ -513,10 +517,10 @@ const init = () => {
])
// ---
createLine(garyLine, [
{ x: 26.61, y: 2, z: -27.08 },
{ x: 26.61, y: 2, z: -27.08 },
{ x: 26.61, y: 2, z: 39.27 },
{ x: -0.90, y: 2, z: 39.27 },
{x:-0.90,y:2,z:52.24},
{ x: -0.90, y: 2, z: 52.24 },
{ x: 133.97, y: 2, z: 53.16 },
{ x: 133.97, y: 2, z: 154.31 }
])
@ -525,13 +529,13 @@ const init = () => {
{ x: 53.43, y: 2, z: 53.16 },
{ x: 53.43, y: 2, z: 154.31 }
])
/**
*
{ x: 26.61, y: 2, z: -27.08 },
{ x: 26.61, y: 2, z: 39.27 },
{ x: -0.90, y: 2, z: 39.27 },
{ x: 53.43, y: 2, z: 154.31 }
*/
/**
*
{ x: 26.61, y: 2, z: -27.08 },
{ x: 26.61, y: 2, z: 39.27 },
{ x: -0.90, y: 2, z: 39.27 },
{ x: 53.43, y: 2, z: 154.31 }
*/
//
createLine(whiteColor, [
{ x: -292.24, y: 2, z: 30.98 },
@ -554,7 +558,7 @@ const init = () => {
createLine(whiteColor, [
{ x: 18.30, y: 2, z: 30.98 },
{ x: 18.30, y: 2, z: -28.94 }
],2)
], 2)
setTipDom()
sethoveMesh()
@ -609,7 +613,7 @@ const init = () => {
// console.log("", "{x:" + (+selected.point.x - 0.83).toFixed(2) + ",y:2 ,z:" + (selected.point.z + 3.52).toFixed(2) + "}");
let workerShop = intersects[0]?.object?.name
if (workerShopRoute.hasOwnProperty(workerShop) && !edit) {
router.push({ path: workerShopRoute[workerShop],query:{isBack:'back'} })
router.push({ path: workerShopRoute[workerShop], query: { isBack: 'back' } })
}
}
@ -747,7 +751,7 @@ function createLine(color: number, pointsList: any, width: number = 4) {
color: color,
transparent: true,
// opacity: 0.5,
dashed: width !== 2?true:false,
dashed: width !== 2 ? true : false,
dashScale: 1,
dashSize: 3,
gapSize: 1,
@ -831,21 +835,21 @@ const createSwitch = (boxposition: positionType, shadow: boolean = true): object
const createAc = (boxposition: positionType, shadow: boolean = true): object => {
const wallTexture = new THREE.TextureLoader().load(requires.ac);
const wall = new THREE.BoxGeometry(15, 5, 10);
const wallMaterial = new THREE.MeshPhongMaterial({
map: wallTexture,
color: 0xe7e7e7,
transparent: true,
});
//
const wallMesh = new THREE.Mesh(wall, wallMaterial);
//
// wallMesh.position.set((-size.baseWidth / 2 + boxposition.x + 1), size.baseHeght / 2 + boxposition.y, -size.baseLength / 2 + boxposition.z);
wallMesh.position.set(boxposition.x, 5 + boxposition.y, boxposition.z);
//
group.add(wallMesh)
return wallMesh
const wallTexture = new THREE.TextureLoader().load(requires.ac);
const wall = new THREE.BoxGeometry(15, 5, 10);
const wallMaterial = new THREE.MeshPhongMaterial({
map: wallTexture,
color: 0xe7e7e7,
transparent: true,
});
//
const wallMesh = new THREE.Mesh(wall, wallMaterial);
//
// wallMesh.position.set((-size.baseWidth / 2 + boxposition.x + 1), size.baseHeght / 2 + boxposition.y, -size.baseLength / 2 + boxposition.z);
wallMesh.position.set(boxposition.x, 5 + boxposition.y, boxposition.z);
//
group.add(wallMesh)
return wallMesh
}

View File

@ -429,7 +429,11 @@ const init = () => {
/*创建第一条线******************/
let garyLine = 0x595959;
let whiteColor = 0xffffff;
createLine(whiteColor, [{ x: -346.00, y: 23.6, z: 59.40 }, { x: -160.50, y: 2, z: 142.08 }], 2)
createLine(whiteColor, [
{ x: -346.00, y: 23.6, z: 39.78 },
{ x: -159.75, y: 2, z: 39.78 },
{ x: -159.75, y: 2, z: 139.78 },
], 2)
//
createLine(whiteColor, [
{ x: -345.65, y: 2, z: 36.40 },