diff --git a/src/views/oneMap/BIM/WangJiaPIng.vue b/src/views/oneMap/BIM/WangJiaPIng.vue index faeb480..2cc4b8b 100644 --- a/src/views/oneMap/BIM/WangJiaPIng.vue +++ b/src/views/oneMap/BIM/WangJiaPIng.vue @@ -231,9 +231,9 @@ const initControls = () => { Controls.value = new OrbitControls(Camera.value, LabelRenderer.value.domElement); //上下翻转的最大角度 - // state.Controls.maxPolarAngle = 1.5; + Controls.value.maxPolarAngle = 1.5; // //上下翻转的最小角度 - // state.Controls.minPolarAngle = 0.2; + Controls.value.minPolarAngle = 0.2; //是否允许缩放 Controls.value.enableZoom = false; // 使动画循环使用时阻尼或自转 意思是否有惯性 @@ -265,7 +265,7 @@ // // 设置场景的背景颜色,即天空颜色 // Scene.background = new THREE.Color(0x999999); // 设置背景,可以更换为你想要的颜色 // // 设置天空的雾气颜色和雾气近距离 - // Scene.fog = new THREE.Fog(0xffffff, 10, 150); // 距离10开始,到200结束 + Scene.fog = new THREE.Fog(0xffffff, 50, 200); // 距离10开始,到200结束 // // 创建平行光源 // const directionalLight = new THREE.DirectionalLight(0xffffff, 0.1); // directionalLight.position.set(-100, 100, 100); @@ -286,8 +286,7 @@ const envMap = pmremGenerator.fromEquirectangular(texture).texture; envMap.isPmremTexture = true; Scene.environment = envMap; - // Scene.background = envMap; - // envMap.offset.set(0.8, 0.89); // 设置环境映射的偏移量 + Scene.background = envMap; pmremGenerator.dispose(); }); new THREE.TextureLoader().load("/Gltf/bg.png", function (texture) { diff --git a/src/views/oneMap/BIM/WangJiaPIng.vue b/src/views/oneMap/BIM/WangJiaPIng.vue index faeb480..2cc4b8b 100644 --- a/src/views/oneMap/BIM/WangJiaPIng.vue +++ b/src/views/oneMap/BIM/WangJiaPIng.vue @@ -231,9 +231,9 @@ const initControls = () => { Controls.value = new OrbitControls(Camera.value, LabelRenderer.value.domElement); //上下翻转的最大角度 - // state.Controls.maxPolarAngle = 1.5; + Controls.value.maxPolarAngle = 1.5; // //上下翻转的最小角度 - // state.Controls.minPolarAngle = 0.2; + Controls.value.minPolarAngle = 0.2; //是否允许缩放 Controls.value.enableZoom = false; // 使动画循环使用时阻尼或自转 意思是否有惯性 @@ -265,7 +265,7 @@ // // 设置场景的背景颜色,即天空颜色 // Scene.background = new THREE.Color(0x999999); // 设置背景,可以更换为你想要的颜色 // // 设置天空的雾气颜色和雾气近距离 - // Scene.fog = new THREE.Fog(0xffffff, 10, 150); // 距离10开始,到200结束 + Scene.fog = new THREE.Fog(0xffffff, 50, 200); // 距离10开始,到200结束 // // 创建平行光源 // const directionalLight = new THREE.DirectionalLight(0xffffff, 0.1); // directionalLight.position.set(-100, 100, 100); @@ -286,8 +286,7 @@ const envMap = pmremGenerator.fromEquirectangular(texture).texture; envMap.isPmremTexture = true; Scene.environment = envMap; - // Scene.background = envMap; - // envMap.offset.set(0.8, 0.89); // 设置环境映射的偏移量 + Scene.background = envMap; pmremGenerator.dispose(); }); new THREE.TextureLoader().load("/Gltf/bg.png", function (texture) { diff --git a/vite.config.js b/vite.config.js index ea2e86d..afb2c95 100644 --- a/vite.config.js +++ b/vite.config.js @@ -7,8 +7,8 @@ const Timestamp = new Date().getTime(); //随机时间戳 // const targetUrl = 'http://192.168.48.145:13000'; //张鸿志 -const targetUrl = 'http://192.168.16.105:13000'; //张亚辉 -// const targetUrl = 'https://server2.wh-nf.cn:8088/prod-api'; //线上 +// const targetUrl = 'http://192.168.16.105:13000'; //张亚辉 +const targetUrl = 'https://server2.wh-nf.cn:8088/prod-api'; //线上 // https://vitejs.dev/config/ export default defineConfig(({ mode, command }) => {