|
@@ -1,8 +1,8 @@
|
|
|
- <!--
|
|
|
+ <!--
|
|
|
*@description: 地图入口
|
|
|
*@author: yh Fu
|
|
|
*@date: 2024-05-13 10:11:52
|
|
|
- *@version: V1.0.5
|
|
|
+ *@version: V1.0.5
|
|
|
-->
|
|
|
|
|
|
<template>
|
|
@@ -159,7 +159,7 @@ export default {
|
|
|
|
|
|
mapObject3D.add(modelObject3D);
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 绘制连线(随机生成两个点位)
|
|
|
*/
|
|
@@ -210,9 +210,9 @@ export default {
|
|
|
// const textureLoader = new THREE.TextureLoader()
|
|
|
// const texture = textureLoader.load('@/assets/images/qkq_mapcon.png')
|
|
|
// texture.mapping = THREE.EquirectangularReflectionMapping
|
|
|
- // const ringMaterial = new THREE.MeshBasicMaterial({
|
|
|
+ // const ringMaterial = new THREE.MeshBasicMaterial({
|
|
|
// map:texture,
|
|
|
- // color: '#3E422E',
|
|
|
+ // color: '#3E422E',
|
|
|
// side: THREE.DoubleSide ,
|
|
|
// transparent:true,
|
|
|
// opacity:0.8,
|
|
@@ -234,10 +234,10 @@ export default {
|
|
|
// 设置光圈的位置
|
|
|
// innerRingMesh.position.set(0,-10,0); // 调整位置到适当的地图坐标
|
|
|
// // 翻转光圈
|
|
|
- // innerRingMesh.rotation.x = Math.PI / 1.7;
|
|
|
- // innerRingMesh.rotation.y = Math.PI / 1.05;
|
|
|
+ // innerRingMesh.rotation.x = Math.PI / 1.7;
|
|
|
+ // innerRingMesh.rotation.y = Math.PI / 1.05;
|
|
|
// scene.add(innerRingMesh);
|
|
|
-
|
|
|
+
|
|
|
// 创建一个蓝色边界的光圈
|
|
|
// const outerRingGeometry = new THREE.RingGeometry(31, 30.6, 39);
|
|
|
// const outerRingMaterial = new THREE.MeshBasicMaterial({ color: '#A5A973', side: THREE.DoubleSide });
|
|
@@ -246,15 +246,15 @@ export default {
|
|
|
// // 设置光圈的位置
|
|
|
// outerRingMesh.position.set(0,-10,0); // 调整位置到适当的地图坐标
|
|
|
// // 翻转光圈
|
|
|
- // outerRingMesh.rotation.x = Math.PI / 1.7;
|
|
|
- // outerRingMesh.rotation.y = Math.PI / 1.05;
|
|
|
+ // outerRingMesh.rotation.x = Math.PI / 1.7;
|
|
|
+ // outerRingMesh.rotation.y = Math.PI / 1.05;
|
|
|
// scene.add(outerRingMesh);
|
|
|
|
|
|
// // 设置光圈的位置
|
|
|
// ringMesh.position.set(0,-10,0); // 调整位置到适当的地图坐标
|
|
|
// // 翻转光圈
|
|
|
- // ringMesh.rotation.x = Math.PI / 1.7;
|
|
|
- // ringMesh.rotation.y = Math.PI / 1.05;
|
|
|
+ // ringMesh.rotation.x = Math.PI / 1.7;
|
|
|
+ // ringMesh.rotation.y = Math.PI / 1.05;
|
|
|
// console.log('光圈参数',ringMesh)
|
|
|
// scene.add(ringMesh);
|
|
|
|
|
@@ -304,18 +304,18 @@ export default {
|
|
|
);
|
|
|
const tooltipEl = document.getElementById('toolTipRef')
|
|
|
if (lastPick) {
|
|
|
-
|
|
|
+
|
|
|
const properties = lastPick.object.parent.customProperties;
|
|
|
if (lastPick.object.material[0]) {
|
|
|
lastPick.object.material[0].color.set(mapConfig.mapHoverColor);
|
|
|
lastPick.object.material[0].opacity = 1; // 设置完全不透明
|
|
|
}
|
|
|
- if (tooltipEl && tooltipEl.style) {
|
|
|
- toolTipRef.style.left = e.clientX + 20 + "px";
|
|
|
- toolTipRef.style.top = e.clientY + 20 + "px";
|
|
|
- toolTipRef.style.visibility = "visible";
|
|
|
- }
|
|
|
- this.toolTipData.text = properties.name
|
|
|
+ // if (tooltipEl && tooltipEl.style) {
|
|
|
+ // toolTipRef.style.left = e.clientX + 20 + "px";
|
|
|
+ // toolTipRef.style.top = e.clientY + 20 + "px";
|
|
|
+ // toolTipRef.style.visibility = "visible";
|
|
|
+ // }
|
|
|
+ // this.toolTipData.text = properties.name
|
|
|
} else {
|
|
|
tooltipEl.style.visibility = "hidden";
|
|
|
}
|
|
@@ -392,7 +392,7 @@ export default {
|
|
|
if(!eventFlag){
|
|
|
window.addEventListener("resize", onResizeEvent, false);
|
|
|
window.addEventListener("mousemove", onMouseMoveEvent, false);
|
|
|
- window.addEventListener("dblclick", onDblclickEvent, false);
|
|
|
+ window.addEventListener("dblclick", onDblclickEvent, false);
|
|
|
eventFlag = true
|
|
|
}
|
|
|
|
|
@@ -420,4 +420,4 @@ export default {
|
|
|
overflow: hidden;
|
|
|
position: relative;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|