forked from JointCloud/JCC-RIP
fox
This commit is contained in:
parent
a2e3170a66
commit
d52bfd0178
|
@ -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 |
|
@ -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()
|
||||
// // mesh默认在XOY平面上,法线方向沿着z轴new THREE.Vector3(0, 0, 1)
|
||||
// var meshNormal = new Three.Vector3(0, 0, 1)
|
||||
// // 四元数属性.quaternion表示mesh的角度状态
|
||||
// // .setFromUnitVectors();计算两个向量之间构成的四元数值
|
||||
// mesh.quaternion.setFromUnitVectors(meshNormal, coordVec3)
|
||||
// mesh在球面上的法线方向(球心和球面坐标构成的方向向量)
|
||||
var coordVec3 = new Three.Vector3(markPos.x, markPos.y, markPos.z).normalize()
|
||||
// mesh默认在XOY平面上,法线方向沿着z轴new THREE.Vector3(0, 0, 1)
|
||||
var meshNormal = new Three.Vector3(0, 0, 1)
|
||||
// 四元数属性.quaternion表示mesh的角度状态
|
||||
// .setFromUnitVectors();计算两个向量之间构成的四元数值
|
||||
mesh.quaternion.setFromUnitVectors(meshNormal, coordVec3)
|
||||
mesh.rotateZ(-Math.PI / 1.5)
|
||||
mark.add(mesh)
|
||||
|
||||
// 添加文字 eg: 北京:18个
|
||||
|
|
Loading…
Reference in New Issue