1 |
- System.register([],(function(t){"use strict";return{execute:function(){t("s","//hybrid.test.reborn-tech.com/2.25.2/surface_img.5cb3b92d.jpg");const e=(t,e,o,a=1)=>{let s,n,r,i;const l=[],c=[],h=t=>Math.pow(t/255,1),p=t=>4===t.length?t.substr(1).split("").map((function(t){return 17*parseInt(t,16)})):[t.substr(1,2),t.substr(3,2),t.substr(5,2)].map((function(t){return parseInt(t,16)})),u=p(t).map(h),f=p(e).map(h);for(s=0;s<o;s++){for(r=s/(o-1),i=1-r,n=0;n<3;n++)c[n]=1===(g=Math.round(255*Math.pow(u[n]*i+f[n]*r,1)).toString(16)).length?"0"+g:g;l.push("#"+c.join(""))}var g;return l},o=(t,o,a,s)=>{const n={};for(const e in t)n[t[e][2]]=0;const r=Object.keys(n);r.sort(((t,e)=>+t-+e));const i=Math.ceil(r.length/2),l=[...e(o,a,i),...e(a,s,i)],c={};for(const e in r)c[r[e]]=l[e];return c},a=(t,e)=>{const o=[];for(const a in t)o.push({value:t[a],itemStyle:{color:e[t[a][2]]}});return o},s={aMin:5,aMax:80,wMin:.5,wMax:20,healthColor:["#0000FA","#02555A","#75BA01"],unhealthColor:["#70AD47","#FFC000","#ED7D31"]},n=(t,e=2)=>+t.toFixed(e),r=(t,e,o,a,s)=>t*Math.exp(-Math.pow(s-a,2)/(2*Math.pow(e,2)))+o,i=(t,e,o,a)=>{e=e<=25?e:25;const s=(e*=a)/8;return n(o*Math.exp(-Math.pow(t,2)/(2*Math.pow(s,2))))},l=new class{constructor(t=s){this.config=Object.assign(Object.assign({},s),t)}aRange(t){const{aMin:e,aMax:o}=this.config;return console.log(t,11),t<e?t<1.94?.1:e:t>o?o:t}wRange(t){const{wMin:e,wMax:o}=this.config;return t<e?e:t>o?o:t}getZ(t,e,o,a,s){const[i,l]=o,[c,h,p]=a,[u,f,g]=s;let w=0;if(e>=0&&e<i){const o=r(h-c,i/3,c,i,e),a=r(f-u,i/3,u,i,e);w=o*Math.exp(-4*Math.pow(t,2)*Math.log(o/.1)/Math.pow(a,2))}else if(e>=i&&e<=i+l){const o=r(h-p,(l-i)/3,p,i,e),a=r(f-g,(l-i)/3,g,i,e);w=o*Math.exp(-4*Math.pow(t,2)*Math.log(o/.1)/Math.pow(a,2))}return n(w)}getHealthData(t=0,e=!0){const s=[20,40],r=[14.1,15.2,12.9],i=[7.2,8,6.8],{healthColor:l}=this.config;t=0===t?0:t-r[1]/2;const c=[],h=[];for(let o=-100;o<=100;o+=2)for(let e=0;e<41;e++){const a=t+this.getZ(o/10,e,s,r,i),l=[e,n(o/10+30),n(a)];c.push(l),Math.abs(o)%10==0&&h.push(l)}let p=[];if(e){const t=o(c,...l);p=a(c,t)}return{plotData:c,plot3dDataColor:p,scatterData:h}}getFeaturePlotData(t,e,s,r=!0){let i=0;const{unhealthColor:l}=this.config,[c,h,p]=e,[u,f,g]=s;e=[this.aRange(c),this.aRange(h),this.aRange(p)],console.log(e),s=[this.wRange(u),this.wRange(f),this.wRange(g)];const w=[];for(let o=-10;o<=10;o+=.2)for(let a=0;a<41;a++){const r=this.getZ(o,a,t,e,s);w.push([a,n(o+10),r]),i=r>i?r:i}let M=[];if(r){const t=o(w,...l);M=a(w,t)}return{plotData:w,plotColorData:M,yLen:40,zMax:i}}getLinePlotData(t,e,s,r=!0){const l=[],c=this.aRange(e)/25;let h=0;const{unhealthColor:p}=this.config;for(let o=0;o<24;o++){const e=[];for(const a in t){const n=t[a];h=n>h?n:h,e.push(i(o-12,s,n*c,2))}l.push(e)}const u=[];for(let o=0;o<l.length;o++){const t=l[o];for(let e=0;e<t.length;e++)u.push([e,o,n(t[e])])}let f=[];if(r){const t=o(u,...p);f=a(u,t)}return{plotData:u,plotColorData:f,xLen:24,zMax:h*c}}},c=(t,e,o,a,s,r,i={alpha:0,beta:0,distance:100},c,h,p=!1,u,f)=>{const g=p?100:50,w=((t,e)=>t.includes("浮")?.15*e:t.includes("沉")?.75*e:.5*e)(s,a),M={tooltip:{show:!1},backgroundColor:"#fff",grid3D:{show:!1,axisLine:{lineStyle:{color:"#DADFE7",width:.5}},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{lineStyle:{color:"#DADFE7",width:.5}},axisPointer:{show:!1},postEffect:{screenSpaceAmbientOcclusion:!0},boxWidth:100,boxHeight:40,boxDepth:g,viewControl:{autoRotate:c,projection:"perspective",alpha:i.alpha,beta:i.beta,minAlpha:0,distance:i.distance,center:[0,0,0],zoomSensitivity:0,rotateSensitivity:[1,1]},left:0,top:0},xAxis3D:{type:"value",min:0,max:o-1,name:"",splitArea:{show:!1}},yAxis3D:{type:"value",name:"",splitArea:{show:!1}},zAxis3D:{type:"value",min:0,max:40,name:"",splitArea:{show:!0,areaStyle:{color:["#FFFFFF","#ECECEC"]}}},series:[]};if(M.series.push({type:"surface",shading:"color",wireframe:{show:!1},data:t}),r){const t=((t,e,o)=>{const a=[];for(let s=0;s<=t;s+=t)for(let t=0;t<=e;t+=.2){const e=o+Math.sin(.3*t-3);a.push([n(t),s,n(e)])}return a})(e,o,w);M.series.push({type:"surface",shading:"color",colorMaterial:{detailTexture:r},wireframe:{show:!1},itemStyle:{color:"#FFFFFF",opacity:.35},data:t})}if(p){const t=l.getHealthData(w,u),e=t.plot3dDataColor,o=t.scatterData;M.series.push({type:"surface",shading:"color",wireframe:{show:!1},data:e}),M.series.push({type:"scatter3D",data:o,symbolSize:4,itemStyle:{color:"#5C8ECA"},emphasis:{label:{show:!1}}})}if(h){const t=[];for(let e=-5;e<=0;e+=5)for(let o=0;o<=38;o+=38)t.push([o,e,0]);M.series.push({type:"surface",shading:"color",colorMaterial:{detailTexture:h},wireframe:{show:!1},itemStyle:{color:"#FFFFFF"},data:t})}return M};t("a",((t,e,o,a,s,n,r=!1,i=!1,h)=>{const{plotColorData:p,yLen:u,zMax:f}=l.getFeaturePlotData(t,e,o,!0);return c(p,38,u,f,a,s,{alpha:15,beta:50,distance:150},i,n,r,h)})),t("g",((t,e,o,a,s,n,r)=>{const{plotColorData:i,xLen:h,zMax:p}=l.getLinePlotData(t,o,a,n);return c(i,h,t.length,p,e,s,{alpha:30,beta:0,distance:100},n,r)}))}}}));
|