交换机换面
This commit is contained in:
parent
f93821e318
commit
a97344ca66
@ -556,7 +556,7 @@ const init = () => {
|
|||||||
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 - 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) {
|
||||||
//router.push({ path: workerShopRoute[workerShop] })
|
//router.push({ path: workerShopRoute[workerShop] })
|
||||||
@ -737,8 +737,10 @@ function createSwitch(position: positionType, scale: number = 0.2) {
|
|||||||
|
|
||||||
const s = scale;
|
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-12.75, position.y, position.z+66.22);
|
||||||
// mesh.rotation.z = THREE.MathUtils.degToRad(180)
|
mesh.rotation.z = THREE.MathUtils.degToRad(180)
|
||||||
|
// mesh.rotation.y = THREE.MathUtils.degToRad(90)
|
||||||
|
// mesh.rotation.x = THREE.MathUtils.degToRad(45)
|
||||||
mesh.castShadow = true;
|
mesh.castShadow = true;
|
||||||
mesh.receiveShadow = true;
|
mesh.receiveShadow = true;
|
||||||
scene.add(mesh);
|
scene.add(mesh);
|
||||||
|
Loading…
Reference in New Issue
Block a user