save
This commit is contained in:
parent
65dc4db91a
commit
64f76afd05
@ -269,6 +269,12 @@ const init = () => {
|
|||||||
//机械设计及行政办公区
|
//机械设计及行政办公区
|
||||||
const mesh_hr = createFloor(t('messages.machineDesign'), 45, 120, { x: -431, y: 0, z: 102 })
|
const mesh_hr = createFloor(t('messages.machineDesign'), 45, 120, { x: -431, y: 0, z: 102 })
|
||||||
createLableObj(mesh_hr, t('messages.machineDesign'), { x: 0, y: 60, z: 0 })
|
createLableObj(mesh_hr, t('messages.machineDesign'), { x: 0, y: 60, z: 0 })
|
||||||
|
|
||||||
|
const mesh_serve = createFloor('', 45, 48, { x: -364.5, y: 0, z: 58 })
|
||||||
|
createLableObj(mesh_serve, '服务器机房', { x: 0, y: 60, z: 0 })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//电控车间
|
//电控车间
|
||||||
const mesh_dkcj = createFloor(t('messages.ControllerRoom'), 76.5, 237, { x: -266, y: 0, z: -138.5 })
|
const mesh_dkcj = createFloor(t('messages.ControllerRoom'), 76.5, 237, { x: -266, y: 0, z: -138.5 })
|
||||||
createLableObj(mesh_dkcj, t('messages.ControllerRoom'), { x: 0, y: 60, z: 0 })
|
createLableObj(mesh_dkcj, t('messages.ControllerRoom'), { x: 0, y: 60, z: 0 })
|
||||||
@ -556,7 +562,7 @@ 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) + "}",selected.object.name);
|
||||||
// console.log("非正常坐标", "{x:" + (+selected.point.x - 0.83).toFixed(2) + ",y:2 ,z:" + (selected.point.z + 3.52).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) {
|
||||||
@ -797,7 +803,6 @@ function createGlb() {
|
|||||||
mesh.position.set(-346, 0, 51);
|
mesh.position.set(-346, 0, 51);
|
||||||
mesh.castShadow = true;
|
mesh.castShadow = true;
|
||||||
mesh.receiveShadow = true;
|
mesh.receiveShadow = true;
|
||||||
createLableObj(mesh, '服务器', { x: 0, y: 60, z: 0 })
|
|
||||||
scene.add(mesh);
|
scene.add(mesh);
|
||||||
}, undefined, function (error) {
|
}, undefined, function (error) {
|
||||||
|
|
||||||
@ -828,7 +833,7 @@ function createHouse(houseName: string, size = { baseWidth: 40, baseHeght: 4, ba
|
|||||||
const mesh = createFloor('焊接车间', baseWidth, baseLength, position)
|
const mesh = createFloor('焊接车间', baseWidth, baseLength, position)
|
||||||
createLableObj(mesh, t('messages.HanJieRoom'), { x: 0, y: 60, z: 0 })
|
createLableObj(mesh, t('messages.HanJieRoom'), { x: 0, y: 60, z: 0 })
|
||||||
} else {
|
} else {
|
||||||
const mesh = createFloor('houseName', baseWidth, baseLength, position)
|
const mesh = createFloor(houseName, baseWidth, baseLength, position)
|
||||||
createLableObj(mesh, houseName, { x: 0, y: 60, z: 0 })
|
createLableObj(mesh, houseName, { x: 0, y: 60, z: 0 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user