添加网络分布
This commit is contained in:
parent
43650230bf
commit
57f8575716
@ -380,6 +380,8 @@ const init = () => {
|
|||||||
createSwitch({x:-208.35,y:0 ,z:107.47})
|
createSwitch({x:-208.35,y:0 ,z:107.47})
|
||||||
//机加车间
|
//机加车间
|
||||||
createSwitch({x:-40.22,y:0 ,z:19.90})
|
createSwitch({x:-40.22,y:0 ,z:19.90})
|
||||||
|
//服装军团
|
||||||
|
createSwitch({x:-81.96,y:0 ,z:-283.33})
|
||||||
//电控分厂
|
//电控分厂
|
||||||
createSwitch({x:-232.96,y:0 ,z:-64.48})
|
createSwitch({x:-232.96,y:0 ,z:-64.48})
|
||||||
//大配套中心
|
//大配套中心
|
||||||
@ -388,6 +390,31 @@ const init = () => {
|
|||||||
createSwitch({x:5.29,y:0 ,z:19.00})
|
createSwitch({x:5.29,y:0 ,z:19.00})
|
||||||
//家纺 医防
|
//家纺 医防
|
||||||
createSwitch({x:88.55,y:0 ,z:-214.89})
|
createSwitch({x:88.55,y:0 ,z:-214.89})
|
||||||
|
//二道岗
|
||||||
|
createSwitch({x:306.5,y:0,z:5.43})
|
||||||
|
/*交换机结束********************************* */
|
||||||
|
/*创建wifi */
|
||||||
|
//机加
|
||||||
|
createWifi({x:-46.96,y:2 ,z:156.57})
|
||||||
|
//大件
|
||||||
|
createWifi({x:52.60,y:2 ,z:96.44})
|
||||||
|
createWifi({x:52.60,y:2 ,z:157.07})
|
||||||
|
//精饰
|
||||||
|
createWifi({x:133.14,y:2 ,z:107.43})
|
||||||
|
createWifi({x:133.14,y:2 ,z:156.25})
|
||||||
|
//焊接
|
||||||
|
createWifi({x:305.73,y:2 ,z:110.45})
|
||||||
|
createWifi({x:305.73,y:2 ,z:238.67})
|
||||||
|
//服装
|
||||||
|
createWifi({x:-89.13,y:4 ,z:-245.33})
|
||||||
|
createWifi({x:-132.07,y:2 ,z:-245.33})
|
||||||
|
createWifi({x:-222.31,y:2 ,z:-245.33})
|
||||||
|
//家纺 医防
|
||||||
|
createWifi({x:140.83,y:2 ,z:-197.34})
|
||||||
|
createWifi({x:259.37,y:2 ,z:-197.34})
|
||||||
|
createWifi({x:140.83,y:2 ,z:-111.84})
|
||||||
|
createWifi({x:259.50,y:2 ,z:-111.81})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*创建红线******************/
|
/*创建红线******************/
|
||||||
@ -523,8 +550,8 @@ const init = () => {
|
|||||||
const intersects = raycaster.intersectObjects(scene.children);
|
const intersects = raycaster.intersectObjects(scene.children);
|
||||||
if (intersects.length > 0) {
|
if (intersects.length > 0) {
|
||||||
var selected = intersects[0]; //取第一个物体
|
var selected = intersects[0]; //取第一个物体
|
||||||
// console.log("坐标", "{x:" + selected.point.x.toFixed(2) + ",y:" + (selected.point.y.toFixed(2) - 1) + ",z:" + selected.point.z.toFixed(2)+ "}");
|
console.log("坐标", "{x:" + selected.point.x.toFixed(2) + ",y:" + (selected.point.y.toFixed(2) - 1) + ",z:" + selected.point.z.toFixed(2)+ "}");
|
||||||
console.log("非正常坐标", "{x:" + (+selected.point.x+6).toFixed(2) + ",y:0 ,z:" + (selected.point.z-33).toFixed(2)+ "}");
|
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
|
let workerShop = intersects[0]?.object?.name
|
||||||
if (workerShopRoute.hasOwnProperty(workerShop) && !edit) {
|
if (workerShopRoute.hasOwnProperty(workerShop) && !edit) {
|
||||||
//router.push({ path: workerShopRoute[workerShop] })
|
//router.push({ path: workerShopRoute[workerShop] })
|
||||||
@ -654,14 +681,37 @@ function createLine(color: number, pointsList: any) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//创建wifi
|
||||||
|
function createWifi(position: positionType) {
|
||||||
|
const loader = new GLTFLoader();
|
||||||
|
|
||||||
|
loader.load('/models/glb/tothefuture_wifi.glb', function (gltf) {
|
||||||
|
const mesh = gltf.scene.children[0];
|
||||||
|
console.log(mesh);
|
||||||
|
|
||||||
|
const s = 0.3;
|
||||||
|
mesh.scale.set(s, s, s);
|
||||||
|
mesh.position.set(position.x, position.y, position.z);
|
||||||
|
// mesh.rotation.x = THREE.MathUtils.degToRad(270)
|
||||||
|
mesh.castShadow = true;
|
||||||
|
mesh.receiveShadow = true;
|
||||||
|
scene.add(mesh);
|
||||||
|
|
||||||
|
}, undefined, function (error) {
|
||||||
|
|
||||||
|
console.error(error);
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//创建交换机
|
//创建交换机
|
||||||
function createSwitch(position: positionType) {
|
function createSwitch(position: positionType,scale:number=0.2) {
|
||||||
const loader = new GLTFLoader();
|
const loader = new GLTFLoader();
|
||||||
|
|
||||||
loader.load('/models/gltf/scene.gltf', function (gltf) {
|
loader.load('/models/gltf/scene.gltf', function (gltf) {
|
||||||
const mesh = gltf.scene.children[0];
|
const mesh = gltf.scene.children[0];
|
||||||
|
|
||||||
const s = 0.2;
|
const s = scale;
|
||||||
mesh.scale.set(s, s, 0.5);
|
mesh.scale.set(s, s, 0.5);
|
||||||
mesh.position.set(position.x, position.y, position.z);
|
mesh.position.set(position.x, position.y, position.z);
|
||||||
// mesh.rotation.z = THREE.MathUtils.degToRad(180)
|
// mesh.rotation.z = THREE.MathUtils.degToRad(180)
|
||||||
|
Loading…
Reference in New Issue
Block a user