|
|
@ -91,7 +91,7 @@
|
|
|
|
gl_PointSize = clamp(fract(percent*number + l - u_time*number*speed)-l ,0.0,1.) * size * (1./length);
|
|
|
|
gl_PointSize = clamp(fract(percent*number + l - u_time*number*speed)-l ,0.0,1.) * size * (1./length);
|
|
|
|
opacity = gl_PointSize/size;
|
|
|
|
opacity = gl_PointSize/size;
|
|
|
|
gl_Position = projectionMatrix * mvPosition;
|
|
|
|
gl_Position = projectionMatrix * mvPosition;
|
|
|
|
}`
|
|
|
|
}`;
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import * as THREE from "three";
|
|
|
|
import * as THREE from "three";
|
|
|
@ -100,7 +100,9 @@ import { LineMaterial } from "three/examples/jsm/lines/LineMaterial.js";
|
|
|
|
import { LineGeometry } from "three/examples/jsm/lines/LineGeometry.js";
|
|
|
|
import { LineGeometry } from "three/examples/jsm/lines/LineGeometry.js";
|
|
|
|
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
|
|
|
|
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
|
|
|
|
import { TWEEN } from "three/examples/jsm/libs/tween.module.min.js";
|
|
|
|
import { TWEEN } from "three/examples/jsm/libs/tween.module.min.js";
|
|
|
|
import { inlandAttack, outlandAttack } from '@/api/common'
|
|
|
|
import { inlandAttack, outlandAttack } from "@/api/common";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { mapAttack } from "@/api/wlSafe";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
filters: {
|
|
|
|
filters: {
|
|
|
|
commaFilter(target) {
|
|
|
|
commaFilter(target) {
|
|
|
@ -221,7 +223,7 @@ export default {
|
|
|
|
attackItem: [
|
|
|
|
attackItem: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "荷兰",
|
|
|
|
country: "荷兰",
|
|
|
|
attackNum: 1123456,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: 3.0555661883637675,
|
|
|
|
x: 3.0555661883637675,
|
|
|
|
y: 3.947974319364163,
|
|
|
|
y: 3.947974319364163,
|
|
|
@ -236,7 +238,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "美国",
|
|
|
|
country: "美国",
|
|
|
|
attackNum: 194817,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -0.7429826939416676,
|
|
|
|
x: -0.7429826939416676,
|
|
|
|
y: 3.173642316073895,
|
|
|
|
y: 3.173642316073895,
|
|
|
@ -251,7 +253,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "韩国",
|
|
|
|
country: "韩国",
|
|
|
|
attackNum: 64202,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -2.476630836604717,
|
|
|
|
x: -2.476630836604717,
|
|
|
|
y: 2.974956787678714,
|
|
|
|
y: 2.974956787678714,
|
|
|
@ -266,7 +268,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "日本",
|
|
|
|
country: "日本",
|
|
|
|
attackNum: 54272,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -3.025242162418693,
|
|
|
|
x: -3.025242162418693,
|
|
|
|
y: 3.06965280605713,
|
|
|
|
y: 3.06965280605713,
|
|
|
@ -281,7 +283,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "新加坡",
|
|
|
|
country: "新加坡",
|
|
|
|
attackNum: 36181,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -1.1977125498395522,
|
|
|
|
x: -1.1977125498395522,
|
|
|
|
y: 0.1187630232077593,
|
|
|
|
y: 0.1187630232077593,
|
|
|
@ -296,7 +298,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "澳大利亚",
|
|
|
|
country: "澳大利亚",
|
|
|
|
attackNum: 4227,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -3.14762251291355,
|
|
|
|
x: -3.14762251291355,
|
|
|
|
y: -2.055138287415189,
|
|
|
|
y: -2.055138287415189,
|
|
|
@ -311,7 +313,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "比利时",
|
|
|
|
country: "比利时",
|
|
|
|
attackNum: 3248,
|
|
|
|
attackNum: 0,
|
|
|
|
url: require("@/assets/privateOrder/general/比利时.png"),
|
|
|
|
url: require("@/assets/privateOrder/general/比利时.png"),
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: 3.150208620337378,
|
|
|
|
x: 3.150208620337378,
|
|
|
@ -326,7 +328,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "欧盟",
|
|
|
|
country: "欧盟",
|
|
|
|
attackNum: 2824,
|
|
|
|
attackNum: 0,
|
|
|
|
url: require("@/assets/privateOrder/general/欧盟.png"),
|
|
|
|
url: require("@/assets/privateOrder/general/欧盟.png"),
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: 3.0716462228398043,
|
|
|
|
x: 3.0716462228398043,
|
|
|
@ -341,7 +343,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "印度",
|
|
|
|
country: "印度",
|
|
|
|
attackNum: 2547,
|
|
|
|
attackNum: 0,
|
|
|
|
url: require("@/assets/privateOrder/general/印度.png"),
|
|
|
|
url: require("@/assets/privateOrder/general/印度.png"),
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: 0.8973138397272145,
|
|
|
|
x: 0.8973138397272145,
|
|
|
@ -356,7 +358,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "爱尔兰",
|
|
|
|
country: "爱尔兰",
|
|
|
|
attackNum: 1753,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: 2.971912016290204,
|
|
|
|
x: 2.971912016290204,
|
|
|
|
y: 3.9983787025311033,
|
|
|
|
y: 3.9983787025311033,
|
|
|
@ -373,7 +375,7 @@ export default {
|
|
|
|
attackItemTwo: [
|
|
|
|
attackItemTwo: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "浙江省",
|
|
|
|
country: "浙江省",
|
|
|
|
attackNum: 15226229,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -2.172660741647654,
|
|
|
|
x: -2.172660741647654,
|
|
|
|
y: 2.519873478041844,
|
|
|
|
y: 2.519873478041844,
|
|
|
@ -388,7 +390,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "江苏省",
|
|
|
|
country: "江苏省",
|
|
|
|
attackNum: 10725829,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -2.041420338320037,
|
|
|
|
x: -2.041420338320037,
|
|
|
|
y: 2.6542648717292443,
|
|
|
|
y: 2.6542648717292443,
|
|
|
@ -403,7 +405,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "上海市",
|
|
|
|
country: "上海市",
|
|
|
|
attackNum: 1495968,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -2.2319153148460087,
|
|
|
|
x: -2.2319153148460087,
|
|
|
|
y: 2.5918025598512733,
|
|
|
|
y: 2.5918025598512733,
|
|
|
@ -418,7 +420,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "广东省",
|
|
|
|
country: "广东省",
|
|
|
|
attackNum: 1078552,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -1.8163404736411468,
|
|
|
|
x: -1.8163404736411468,
|
|
|
|
y: 1.9638138809954824,
|
|
|
|
y: 1.9638138809954824,
|
|
|
@ -433,7 +435,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "北京市",
|
|
|
|
country: "北京市",
|
|
|
|
attackNum: 927036,
|
|
|
|
attackNum: 0,
|
|
|
|
to: {
|
|
|
|
to: {
|
|
|
|
x: 1.5,
|
|
|
|
x: 1.5,
|
|
|
|
y: 1.3,
|
|
|
|
y: 1.3,
|
|
|
@ -448,7 +450,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "山东省",
|
|
|
|
country: "山东省",
|
|
|
|
attackNum: 370540,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -1.8242436054004105,
|
|
|
|
x: -1.8242436054004105,
|
|
|
|
y: 2.9852801487720697,
|
|
|
|
y: 2.9852801487720697,
|
|
|
@ -463,7 +465,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "青海省",
|
|
|
|
country: "青海省",
|
|
|
|
attackNum: 71048,
|
|
|
|
attackNum: 0,
|
|
|
|
to: {
|
|
|
|
to: {
|
|
|
|
x: 0,
|
|
|
|
x: 0,
|
|
|
|
y: 0.9,
|
|
|
|
y: 0.9,
|
|
|
@ -478,7 +480,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "香港",
|
|
|
|
country: "香港",
|
|
|
|
attackNum: 57921,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -1.891796825048188,
|
|
|
|
x: -1.891796825048188,
|
|
|
|
y: 1.906025635738977,
|
|
|
|
y: 1.906025635738977,
|
|
|
@ -493,7 +495,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "河北省",
|
|
|
|
country: "河北省",
|
|
|
|
attackNum: 56947,
|
|
|
|
attackNum: 0,
|
|
|
|
pos: {
|
|
|
|
pos: {
|
|
|
|
x: -1.6349002874033607,
|
|
|
|
x: -1.6349002874033607,
|
|
|
|
y: 3.0827610905393548,
|
|
|
|
y: 3.0827610905393548,
|
|
|
@ -508,7 +510,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
country: "江西省",
|
|
|
|
country: "江西省",
|
|
|
|
attackNum: 44890,
|
|
|
|
attackNum: 0,
|
|
|
|
to: {
|
|
|
|
to: {
|
|
|
|
x: 1.5,
|
|
|
|
x: 1.5,
|
|
|
|
y: -0.1,
|
|
|
|
y: -0.1,
|
|
|
@ -532,10 +534,9 @@ export default {
|
|
|
|
// this.startAnimate();
|
|
|
|
// this.startAnimate();
|
|
|
|
// this.startAnimateTwo();
|
|
|
|
// this.startAnimateTwo();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {},
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
this.onload();
|
|
|
|
this.mapList();
|
|
|
|
// inlandAttack().then(res => {
|
|
|
|
// inlandAttack().then(res => {
|
|
|
|
// const attackObject = res['T_INLAND_ATTACK[]']
|
|
|
|
// const attackObject = res['T_INLAND_ATTACK[]']
|
|
|
|
// for (let j = 0; j < attackObject.length; j++) {
|
|
|
|
// for (let j = 0; j < attackObject.length; j++) {
|
|
|
@ -560,6 +561,27 @@ export default {
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
//地图受攻击
|
|
|
|
|
|
|
|
mapList() {
|
|
|
|
|
|
|
|
mapAttack({ pageSize: 20, pageNum: 1 }).then((res) => {
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
res.rows.forEach((value) => {
|
|
|
|
|
|
|
|
this.attackItem.forEach((value1,index1)=>{
|
|
|
|
|
|
|
|
if(value1.country == value.name){
|
|
|
|
|
|
|
|
this.attackItem[index1].attackNum = value.attackCount
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.attackItemTwo.forEach((value2,index2)=>{
|
|
|
|
|
|
|
|
if(value2.country == value.name){
|
|
|
|
|
|
|
|
this.attackItemTwo[index2].attackNum = value.attackCount
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.onload();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
stopAnimate() {
|
|
|
|
stopAnimate() {
|
|
|
|
window.clearInterval(this.timer);
|
|
|
|
window.clearInterval(this.timer);
|
|
|
|
this.animateFlag = false;
|
|
|
|
this.animateFlag = false;
|
|
|
@ -1225,10 +1247,10 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
// const loader = new THREE.FileLoader();
|
|
|
|
// const loader = new THREE.FileLoader();
|
|
|
|
// loader.load("@/assets/Json/china.json", () => {
|
|
|
|
// loader.load("@/assets/Json/china.json", () => {
|
|
|
|
this.initMap(china);
|
|
|
|
this.initMap(china);
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// loader.load("@/assets/Json/china-outline.json", () => {
|
|
|
|
// loader.load("@/assets/Json/china-outline.json", () => {
|
|
|
|
this.outLineMap(chinaOutLine);
|
|
|
|
this.outLineMap(chinaOutLine);
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -1430,7 +1452,7 @@ export default {
|
|
|
|
width: 365px;
|
|
|
|
width: 365px;
|
|
|
|
height: 89px;
|
|
|
|
height: 89px;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
background: url('~@/assets/privateOrder/general/left.png') no-repeat;
|
|
|
|
background: url("~@/assets/privateOrder/general/left.png") no-repeat;
|
|
|
|
background-size: 100%;
|
|
|
|
background-size: 100%;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
img {
|
|
|
|
img {
|
|
|
@ -1479,7 +1501,7 @@ export default {
|
|
|
|
display: inline-table;
|
|
|
|
display: inline-table;
|
|
|
|
margin-top: 54px;
|
|
|
|
margin-top: 54px;
|
|
|
|
margin-left: 9px;
|
|
|
|
margin-left: 9px;
|
|
|
|
background: url('~@/assets/privateOrder/general/地球.png') no-repeat;
|
|
|
|
background: url("~@/assets/privateOrder/general/地球.png") no-repeat;
|
|
|
|
// background-size: 100%;
|
|
|
|
// background-size: 100%;
|
|
|
|
// background-position: center;
|
|
|
|
// background-position: center;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
@ -1533,7 +1555,7 @@ export default {
|
|
|
|
height: 89px;
|
|
|
|
height: 89px;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
margin-left: 130px;
|
|
|
|
margin-left: 130px;
|
|
|
|
background-image: url('~@/assets/privateOrder/general/right.png');
|
|
|
|
background-image: url("~@/assets/privateOrder/general/right.png");
|
|
|
|
background-size: 100% 100%;
|
|
|
|
background-size: 100% 100%;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
img {
|
|
|
|
img {
|
|
|
@ -1582,7 +1604,7 @@ export default {
|
|
|
|
height: 291px;
|
|
|
|
height: 291px;
|
|
|
|
margin-top: 75px;
|
|
|
|
margin-top: 75px;
|
|
|
|
margin-left: 182px;
|
|
|
|
margin-left: 182px;
|
|
|
|
background: url('~@/assets/privateOrder/general/中国.png') no-repeat;
|
|
|
|
background: url("~@/assets/privateOrder/general/中国.png") no-repeat;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
img {
|
|
|
|
img {
|
|
|
|
width: auto;
|
|
|
|
width: auto;
|
|
|
|