This commit is contained in:
ann 2023-03-16 17:37:25 +08:00
parent a2e3170a66
commit d52bfd0178
2 changed files with 19 additions and 11 deletions

1
public/statusUn.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg id="_层_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 19.84 29.77"><defs><style>.cls-1{fill:url(#_命名的渐变_55);filter:url(#outer-glow-1);}.cls-2{fill:url(#_命名的渐变_230);}.cls-3{fill:url(#_命名的渐变_16);filter:url(#outer-glow-2);}.cls-4{fill:url(#_命名的渐变_213);}</style><radialGradient id="_命名的渐变_230" cx="9.92" cy="160.21" fx="9.92" fy="160.21" r="9.92" gradientTransform="translate(0 -82.88) scale(1 .66)" gradientUnits="userSpaceOnUse"><stop offset=".48" stop-color="#55fffc"/><stop offset="1" stop-color="#55fff3" stop-opacity="0"/></radialGradient><linearGradient id="_命名的渐变_55" x1="9.84" y1="26.72" x2="9.84" y2="17.34" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#001cbf"/><stop offset="1" stop-color="#5b007f"/></linearGradient><filter id="outer-glow-1" filterUnits="userSpaceOnUse"><feOffset dx="0" dy="0"/><feGaussianBlur result="blur" stdDeviation="3"/><feFlood flood-color="#fff" flood-opacity=".75"/><feComposite in2="blur" operator="in"/><feComposite in="SourceGraphic"/></filter><linearGradient id="_命名的渐变_16" x1="9.84" y1="24.75" x2="9.84" y2="18.31" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="blue"/><stop offset="1" stop-color="#2aaef1"/></linearGradient><filter id="outer-glow-2" filterUnits="userSpaceOnUse"><feOffset dx="0" dy="0"/><feGaussianBlur result="blur-2" stdDeviation="3"/><feFlood flood-color="#fff" flood-opacity=".75"/><feComposite in2="blur-2" operator="in"/><feComposite in="SourceGraphic"/></filter><linearGradient id="_命名的渐变_213" x1="9.84" y1="24.11" x2="9.84" y2="0" gradientTransform="matrix(1, 0, 0, 1, 0, 0)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2afffc"/><stop offset=".53" stop-color="#2aaeff" stop-opacity=".7"/><stop offset="1" stop-color="#6e15ff" stop-opacity=".1"/></linearGradient></defs><g id="_层_3"><g><ellipse class="cls-2" cx="9.92" cy="23.21" rx="9.92" ry="6.57"/><g><ellipse class="cls-1" cx="9.84" cy="22.03" rx="7.27" ry="4.69"/><ellipse class="cls-3" cx="9.84" cy="21.53" rx="5.43" ry="3.22"/><path class="cls-4" d="M14.91,20.1s-.65-1.6-.75-2.14c-.65-3.59-2.1-12.9-2.66-16.51-.13-.84-.85-1.46-1.7-1.46h0c-.85,0-1.58,.62-1.7,1.47-.54,3.6-1.92,12.84-2.54,16.4-.13,.73-.87,2.92-.87,2.92,0,1.84,2.32,3.33,5.17,3.33s5.17-1.49,5.17-3.33c0-.23-.04-.46-.11-.68Z"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -139,8 +139,11 @@ export default {
this.scene.getObjectByName('chinaPointLine').visible = !this.cp
this.scene.getObjectByName('point').visible = !this.cp
this.scene.getObjectByName('pointText').visible = !this.cp
this.scene.getObjectByName('zs').visible = this.cp
// this.scene.getObjectByName('zsText').visible = this.cp
},
toWorld() {
if (this.globe === true) return false
this.globe = true
var s = 140
this.camera.zoom = 1
@ -174,6 +177,7 @@ export default {
this.cp = true
},
toChina() {
if (this.globe === false) return false
this.globe = false
this.orbitControls.autoRotate = false
// this.camera.zoom = 2.3
@ -220,6 +224,8 @@ export default {
this.scene.getObjectByName('chinaPointLine').visible = false
this.scene.getObjectByName('point').visible = false
this.scene.getObjectByName('pointText').visible = false
this.scene.getObjectByName('zs').visible = false
this.scene.getObjectByName('zsText').visible = false
},
setCpPoint() {
// const zsp = this.
@ -228,29 +234,30 @@ export default {
const textMark = new Three.Group()
textMark.name = 'zsText'
this.zs.forEach(ele => {
var markPos = this.getPosition(ele.coordinates[0] + 90, ele.coordinates.value[1], 100)
var markPos = this.getPosition(ele.coordinate[0] + 90, ele.coordinate[1], 100)
// mark.position.set(markPos.x, markPos.y, markPos.z)
var textureLoader = new Three.TextureLoader()
var material = new Three.MeshBasicMaterial({
map: textureLoader.load(process.env.VUE_APP_PUBLIC_SOURCE_API + '/point.png'),
map: textureLoader.load(process.env.VUE_APP_PUBLIC_SOURCE_API + '/statusUn.svg'),
transparent: true, // 使png
blending: Three.AdditiveBlending,
// blending: Three.AdditiveBlending,
// side: THREE.DoubleSide, //
depthWrite: false //
})
var mesh = new Three.Mesh(new Three.PlaneGeometry(8, 8, 3, 3), material)
var mesh = new Three.Mesh(new Three.PlaneGeometry(2, 2, 1, 1), material)
// var size = 10 * 0.04// Mesh
// mesh.scale.set(size, size, size)// mesh
// mesh
mesh.position.set(markPos.x, markPos.y, markPos.z)
// // mesh线()
// var coordVec3 = new Three.Vector3(markPos.x, markPos.y, markPos.z).normalize()
// // meshXOY线沿znew THREE.Vector3(0, 0, 1)
// var meshNormal = new Three.Vector3(0, 0, 1)
// // .quaternionmesh
// // .setFromUnitVectors();
// mesh.quaternion.setFromUnitVectors(meshNormal, coordVec3)
// mesh线()
var coordVec3 = new Three.Vector3(markPos.x, markPos.y, markPos.z).normalize()
// meshXOY线沿znew THREE.Vector3(0, 0, 1)
var meshNormal = new Three.Vector3(0, 0, 1)
// .quaternionmesh
// .setFromUnitVectors();
mesh.quaternion.setFromUnitVectors(meshNormal, coordVec3)
mesh.rotateZ(-Math.PI / 1.5)
mark.add(mesh)
// eg: 18