earthsdk3 3.7.0-beta.15 → 3.7.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/earthsdk3.iife.js +3 -3
- package/dist/earthsdk3.js +6 -6
- package/dist/earthsdk3.umd.cjs +3 -3
- package/package.json +2 -2
package/dist/earthsdk3.iife.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var EarthSDK3=function(v){"use strict";var sR=Object.defineProperty;var oR=(v,Xs,Eu)=>Xs in v?sR(v,Xs,{enumerable:!0,configurable:!0,writable:!0,value:Eu}):v[Xs]=Eu;var f=(v,Xs,Eu)=>oR(v,typeof Xs!="symbol"?Xs+"":Xs,Eu);var ss;function Xs(){var n;const r=((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)??"unknown";let t="Unknown";/Windows/.test(r)?t="Windows":/Macintosh/.test(r)?t="MacOS":/Linux/.test(r)?t="Linux":/Android/.test(r)?t="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?e="x64":/x86|i686|Win32/.test(r)?e="x86":/arm64|aarch64/.test(r)?e="arm64":/arm/.test(r)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const Eu=Date.now();function u_(r){var a;const{os:t,arch:e}=Xs(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-Eu)/1e3/60|0,date:new Date().toLocaleString(),href:((a=window==null?void 0:window.location)==null?void 0:a.href)??"unknown",os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(u=>u.text()).then(u=>console.log(u)).catch(u=>console.log("error",u))}v.copyright=void 0;try{const r="earthsdk3",t="3.7.0-beta.
|
|
1
|
+
var EarthSDK3=function(v){"use strict";var sR=Object.defineProperty;var oR=(v,Xs,Eu)=>Xs in v?sR(v,Xs,{enumerable:!0,configurable:!0,writable:!0,value:Eu}):v[Xs]=Eu;var f=(v,Xs,Eu)=>oR(v,typeof Xs!="symbol"?Xs+"":Xs,Eu);var ss;function Xs(){var n;const r=((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)??"unknown";let t="Unknown";/Windows/.test(r)?t="Windows":/Macintosh/.test(r)?t="MacOS":/Linux/.test(r)?t="Linux":/Android/.test(r)?t="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?e="x64":/x86|i686|Win32/.test(r)?e="x86":/arm64|aarch64/.test(r)?e="arm64":/arm/.test(r)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const Eu=Date.now();function u_(r){var a;const{os:t,arch:e}=Xs(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-Eu)/1e3/60|0,date:new Date().toLocaleString(),href:((a=window==null?void 0:window.location)==null?void 0:a.href)??"unknown",os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(u=>u.text()).then(u=>console.log(u)).catch(u=>console.log("error",u))}v.copyright=void 0;try{const r="earthsdk3",t="3.7.0-beta.16",e="2025-12-19T02:00:38.000Z",n="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="e29deecbad468a096c911c7d606839856be97a79",a=((Date.now()-1766109638e3)/36e5).toFixed(1),u=`%c🌏 ${r}%c ${t}.${s.slice(0,8)}.${e} (距今${a}个小时)
|
|
2
2
|
%c${i?i+`
|
|
3
3
|
`:""}当前网站正在使用${r},此软件版权归${n}所有
|
|
4
|
-
`;v.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
4
|
+
`;v.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","e29deecbad468a096c911c7d606839856be97a79")},get info(){return u},get date(){return"2025-12-19T02:00:38.000Z"},get author(){return"suplyang"},get version(){return"3.7.0-beta.16"},get name(){return"earthsdk3"},get commitId(){return"e29deecbad468a096c911c7d606839856be97a79"},print(){console.info(this.info,`
|
|
5
5
|
font-size: 18px;
|
|
6
6
|
font-weight: 1000;
|
|
7
7
|
line-height: 1;
|
|
@@ -367,7 +367,7 @@ ${pE}
|
|
|
367
367
|
hiddenDistance: number
|
|
368
368
|
}
|
|
369
369
|
\`\`\`
|
|
370
|
-
`},pu=class pu extends ge{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new xt([],"通用"),new Et([this,"url"],"路径"),new Et([this,"poiTypes"],pu.defaults.poiTypes,gE.sampleValue),new L([this,"heightOffset"])]}}};f(pu,"createDefaultProps",()=>({...ge.createDefaultProps(),url:"",poiTypes:Ie(gE.defaultValue),heightOffset:40})),f(pu,"type",pu.register("ESPoiTileset",pu,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let Sv=pu;const rh=class rh extends yt{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new xt([],"通用","通用"),new ot([this,"show"],"是否显示"),new Wt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new pn([this,"cssPosition"],"位置")]}}};f(rh,"createDefaultProps",()=>({...yt.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),f(rh,"type",rh.register("ESScale",rh,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Cv=rh;const Us=class Us extends Ee{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new L([this,"height"],"高度",Us.defaults.height,!0),new L([this,"extrudedHeight"],"拉伸高度",Us.defaults.extrudedHeight,!0),new ot([this,"perPositionHeight"],"应用每个位置高度",Us.defaults.perPositionHeight,!0)]}}};f(Us,"createDefaultProps",()=>({...Ee.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),f(Us,"type",Us.register("ESGeoExtrudedPolygon",Us,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),f(Us,"supportEditingModes",[...Ee.supportEditingModes,vt.HeightModify]);let Ja=Us;const gu=class gu extends Ee{constructor(e){super(e);f(this,"_classification",this.dv(new Tf));f(this,"_geoExtrudedPolygon",this.dv(new Ja));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:n,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(X([n,"collision"],[this,"collision"])),this.d(X([i,"collision"],[this,"collision"])),this.d(_t([i,"flyInParam"],[this,"flyInParam"])),this.d(_t([i,"flyToParam"],[this,"flyToParam"])),this.d(_t([i,"points"],[this,"points"])),this.d(_t([i,"extrudedHeight"],[this,"height"])),this.d(_t([n,"fillColor"],[this,"overheightColor"])),this.d(_t([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const l=a.map(h=>[h[0],h[1],o]);n.points=l,n.height=u-o,u-o<=0?n.show=!1:n.show=this.show&&this.filled};s(),this.d(Js([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;n.show=o&&a,i.show=o&&a};s(),this.d(Js([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"maxHeight"],"最高高度",200),new Kt([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Kt([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};f(gu,"createDefaultProps",()=>({...Ee.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),f(gu,"type",gu.register("ESHeightLimitAnalysis",gu,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),f(gu,"supportEditingModes",[...Ee.supportEditingModes,vt.HeightModify]);let bv=gu;const ds=class ds extends ge{constructor(e){super(e);f(this,"_widgetEvent",this.dv(new N));f(this,"_data",this.dv($(void 0)));{const n=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:Kp(this.url)?this.data=JSON.parse(this.url):fetch(yt.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};n(),this.d(this.urlChanged.don(n))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"url"],"地址",ds.defaults.url),new L([this,"pixelRange"],"集合范围",ds.defaults.pixelRange),new L([this,"minimumClusterSize"],"最小数量",ds.defaults.minimumClusterSize),new Wt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...e.more,new Et([this,"style"],"style",ds.defaults.style),new ot([this,"perspective"],"透视效果",ds.defaults.perspective)]}}};f(ds,"createDefaultProps",()=>({...ge.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:Ie({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"NONE",perspective:!1})),f(ds,"type",ds.register("ESEntityCluster",ds,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let Pv=ds;class Oc extends H{constructor(){super();f(this,"_player",this.disposeVar(new Ri));const e=this._player;{const n=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};n(),this.d(this.startTimeChanged.don(n)),this.d(this.stopTimeChanged.don(n))}this.d(_t([e,"playing"],[this,"playing"])),this.d(_t([e,"loop"],[this,"loop"])),this.d(_t([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const n=this.currentTime-this.startTime;e.currentTime=vd(n,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(r=>{r.createDefaultProps=()=>({...yt.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Oc||(Oc={})),Zs(Oc.prototype,Oc.createDefaultProps);const ih=class ih extends yt{constructor(e){super(e);f(this,"_absolutePlayer",this.dv(new Oc));const n=this.absolutePlayer;this.d(_t([n,"currentTime"],[this,"currentTime"])),this.d(_t([n,"startTime"],[this,"startTime"])),this.d(_t([n,"stopTime"],[this,"stopTime"])),this.d(_t([n,"playing"],[this,"playing"])),this.d(_t([n,"loop"],[this,"loop"])),this.d(_t([n,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Cd([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new Pa([this,"currentTime"],"currentTime"),new Pa([this,"startTime"]),new Pa([this,"stopTime"]),new ot([this,"playing"]),new ot([this,"loop"]),new L([this,"speed"])]}}};f(ih,"createDefaultProps",()=>({...yt.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),f(ih,"type",ih.register("ESPlayer",ih,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let Pl=ih;function mE(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<n;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],o=e[i][1],a=ki(s),u=ki(o),l=v.Vector.distance(a,u);if(l===0){e[i][2]=e[i-1][2];continue}const h=bc(s,o),c=o[2]-s[2],d=Math.asin(c/l)*180/Math.PI,p=Number.isFinite(h)?h:0,g=Number.isFinite(d)?d:0;e[i][2]=[p,g,0]}return(e[0][2]===void 0||t)&&(e[0][2]=n>1?e[1][2]:void 0),e}function vE(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=n-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],o=e[i+1][1],a=ki(s),u=ki(o),l=v.Vector.distance(a,u);if(l===0){e[i][2]=e[i+1][2];continue}const h=bc(s,o),c=o[2]-s[2],d=Math.asin(c/l)*180/Math.PI,p=Number.isFinite(h)?h:0,g=Number.isFinite(d)?d:0;e[i][2]=[p,g,0]}return(e[n-1][2]===void 0||t)&&(e[n-1][2]=n>1?e[n-2][2]:[0,0,0]),e}function y4(r,t=!1){const e=mE(r,t),n=vE(r,t);if(e.length!==n.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const o=e[s][2],a=n[s][2];o===void 0&&a===void 0?e[s][2]=void 0:o===void 0?e[s][2]=a:a===void 0?e[s][2]=o:e[s][2]=Qp(o,a,.5)}return e}function w4(r,t,e){let i;if(!r.timePosRots)return;const s=[],o=r.timePosRots.length;if(!(o<=2)){s.push(r.timePosRots[0]);for(let a=1;a<o-1;++a){const u=r.timePosRots[a-1][0],l=r.timePosRots[a][0],h=r.timePosRots[a+1][0],c=r.accumDistances[a-1],d=r.accumDistances[a],p=r.accumDistances[a+1],g=d-c;if(g!==0){const w=g-(i??(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5);let b=(w<0?0:w)/g;Number.isNaN(b)&&(b=0);const m=(1-b)*u+b*l,E=r.getCurrent(m);E&&s.push([m,E.position,E.rotation])}e&&s.push(r.timePosRots[a]);const _=p-d;if(_!==0){let w=(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5;const b=(t.length==1?t[0]:t[a]||t[t.length-1])*.5||0;w+b>_?(w=_*(w/(w+b)),i=_-w):i=void 0;let m=(w<0?0:w)/_;Number.isNaN(m)&&(m=0);const E=(1-m)*l+m*h,y=r.getCurrent(E);y&&s.push([E,y.position,y.rotation])}}s.push(r.timePosRots[o-1]),r.timePosRots=s}}function _E(r,t){if(t<0)return[void 0,0];if(t>r.length-1)return[void 0,r.length-1];const e=[...r].slice(0,t+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const n=t-e;return[r[n][2],n]}function yE(r,t){if(t<0)return[void 0,0];if(t>=r.length)return[void 0,r.length-1];const e=r.slice(t).findIndex(([,,i])=>i!==void 0),n=e===-1?r.length-1:t+e;return[r[n][2],n]}function E4(r,t,e="Lerp"){let n,i,s,o;if(r.length!==0){if(t<=r[0][0])n=r[0][1],i=r[0][2],s=0,o=0;else if(t>=r[r.length-1][0]){const[u,l,h]=r[r.length-1];n=l,i=h,s=r.length-2,o=1}else{const u=r.findIndex(([l])=>t<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,h]=r[s],[c,d]=r[u],p=(t-l)/(c-l),g=vm(h),_=vm(d),w=v.Vector.lerp(g,_,p);n=wg(w),o=p}{let[l,h]=_E(r,s),[c,d]=yE(r,u);if(e==="Lerp")if(l&&c){if(h<0||d>=r.length)throw new Error("Invalid rotation index");const p=(t-r[h][0])/(r[d][0]-r[h][0]);i=Qp(l,c,p)}else l?i=l:c?i=c:i=void 0;else e==="Prev"?l&&(i=l):e==="Next"&&c&&(i=c)}}return{position:n,rotation:i,index:s,ratio:o}}}function S4(r){try{const t=JSON.parse(r);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",n=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&n?t:void 0}throw new Error("解析有问题")}catch{const e=r.split(/\n|\r\n/),n=[],i=e.length;for(let s=0;s<i;++s){const o=e[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?n.push([a[0],[a[1],a[2],a[3]],void 0]):n.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return n}}function C4(r,t,e){const{timePosRots:n}=r;if(!n)throw new Error("!timePosRots");if(n.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,n[0][0]),e=Math.min(e,n[n.length-1][0]);const i=r.getCurrent(t),s=r.getCurrent(e);if(!i||!s)return;const o=[];i.ratio<1&&o.push([t,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(n[a]);return s.ratio>0&&o.push([e,s.position,s.rotation]),o}const b4=`
|
|
370
|
+
`},pu=class pu extends ge{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new xt([],"通用"),new Et([this,"url"],"路径"),new Et([this,"poiTypes"],pu.defaults.poiTypes,gE.sampleValue),new L([this,"heightOffset"])]}}};f(pu,"createDefaultProps",()=>({...ge.createDefaultProps(),url:"",poiTypes:Ie(gE.defaultValue),heightOffset:40})),f(pu,"type",pu.register("ESPoiTileset",pu,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let Sv=pu;const rh=class rh extends yt{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new xt([],"通用","通用"),new ot([this,"show"],"是否显示"),new Wt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new pn([this,"cssPosition"],"位置")]}}};f(rh,"createDefaultProps",()=>({...yt.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),f(rh,"type",rh.register("ESScale",rh,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Cv=rh;const Us=class Us extends Ee{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new L([this,"height"],"高度",Us.defaults.height,!0),new L([this,"extrudedHeight"],"拉伸高度",Us.defaults.extrudedHeight,!0),new ot([this,"perPositionHeight"],"应用每个位置高度",Us.defaults.perPositionHeight,!0)]}}};f(Us,"createDefaultProps",()=>({...Ee.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),f(Us,"type",Us.register("ESGeoExtrudedPolygon",Us,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),f(Us,"supportEditingModes",[...Ee.supportEditingModes,vt.HeightModify]);let Ja=Us;const gu=class gu extends Ee{constructor(e){super(e);f(this,"_classification",this.dv(new Tf));f(this,"_geoExtrudedPolygon",this.dv(new Ja));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:n,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(X([n,"collision"],[this,"collision"])),this.d(X([i,"collision"],[this,"collision"])),this.d(_t([i,"flyInParam"],[this,"flyInParam"])),this.d(_t([i,"flyToParam"],[this,"flyToParam"])),this.d(_t([i,"points"],[this,"points"])),this.d(_t([i,"extrudedHeight"],[this,"height"])),this.d(_t([n,"fillColor"],[this,"overheightColor"])),this.d(_t([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const l=a.map(h=>[h[0],h[1],o]);n.points=l,n.height=u-o,u-o<=0?n.show=!1:n.show=this.show&&this.filled};s(),this.d(Js([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;n.show=o&&a,i.show=o&&a};s(),this.d(Js([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new L([this,"height"],"高度",10),new L([this,"maxHeight"],"最高高度",200),new Kt([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Kt([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};f(gu,"createDefaultProps",()=>({...Ee.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),f(gu,"type",gu.register("ESHeightLimitAnalysis",gu,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),f(gu,"supportEditingModes",[...Ee.supportEditingModes,vt.HeightModify]);let bv=gu;const ds=class ds extends ge{constructor(e){super(e);f(this,"_widgetEvent",this.dv(new N));f(this,"_data",this.dv($(void 0)));{const n=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:Kp(this.url)?this.data=JSON.parse(this.url):fetch(yt.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};n(),this.d(this.urlChanged.don(n))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Et([this,"url"],"地址",ds.defaults.url),new L([this,"pixelRange"],"集合范围",ds.defaults.pixelRange),new L([this,"minimumClusterSize"],"最小数量",ds.defaults.minimumClusterSize),new Wt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","NONE")],more:[...e.more,new Et([this,"style"],"style",ds.defaults.style),new ot([this,"perspective"],"透视效果",ds.defaults.perspective)]}}};f(ds,"createDefaultProps",()=>({...ge.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:Ie({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"NONE",perspective:!1})),f(ds,"type",ds.register("ESEntityCluster",ds,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let Pv=ds;class Oc extends H{constructor(){super();f(this,"_player",this.disposeVar(new Ri));const e=this._player;{const n=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};n(),this.d(this.startTimeChanged.don(n)),this.d(this.stopTimeChanged.don(n))}this.d(_t([e,"playing"],[this,"playing"])),this.d(_t([e,"loop"],[this,"loop"])),this.d(_t([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const n=this.currentTime-this.startTime;e.currentTime=vd(n,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(r=>{r.createDefaultProps=()=>({...yt.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Oc||(Oc={})),Zs(Oc.prototype,Oc.createDefaultProps);const ih=class ih extends yt{constructor(e){super(e);f(this,"_absolutePlayer",this.dv(new Oc));const n=this.absolutePlayer;this.d(_t([n,"currentTime"],[this,"currentTime"])),this.d(_t([n,"startTime"],[this,"startTime"])),this.d(_t([n,"stopTime"],[this,"stopTime"])),this.d(_t([n,"playing"],[this,"playing"])),this.d(_t([n,"loop"],[this,"loop"])),this.d(_t([n,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Cd([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new Pa([this,"currentTime"],"currentTime"),new Pa([this,"startTime"]),new Pa([this,"stopTime"]),new ot([this,"playing"]),new ot([this,"loop"]),new L([this,"speed"])]}}};f(ih,"createDefaultProps",()=>({...yt.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),f(ih,"type",ih.register("ESPlayer",ih,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let Pl=ih;function mE(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<n;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],o=e[i][1],a=ki(s),u=ki(o),l=v.Vector.distance(a,u);if(l===0){e[i][2]=e[i-1][2];continue}const h=bc(s,o),c=o[2]-s[2],d=Math.asin(c/l)*180/Math.PI,p=Number.isFinite(h)?h:0,g=Number.isFinite(d)?d:0;e[i][2]=[p,g,0]}return(e[0][2]===void 0||t)&&(e[0][2]=n>1?e[1][2]:void 0),e}function vE(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=n-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],o=e[i+1][1],a=ki(s),u=ki(o),l=v.Vector.distance(a,u);if(l===0){e[i][2]=e[i+1][2];continue}const h=bc(s,o),c=o[2]-s[2],d=Math.asin(c/l)*180/Math.PI,p=Number.isFinite(h)?h:0,g=Number.isFinite(d)?d:0;e[i][2]=[p,g,0]}return(e[n-1][2]===void 0||t)&&(e[n-1][2]=n>1?e[n-2][2]:[0,0,0]),e}function y4(r,t=!1){const e=mE(r,t),n=vE(r,t);if(e.length!==n.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const o=e[s][2],a=n[s][2];o===void 0&&a===void 0?e[s][2]=void 0:o===void 0?e[s][2]=a:a===void 0?e[s][2]=o:e[s][2]=Qp(o,a,.5)}return e}function w4(r,t,e){let i;if(!r.timePosRots)return;const s=[],o=r.timePosRots.length;if(!(o<=2)){s.push(r.timePosRots[0]);for(let a=1;a<o-1;++a){const u=r.timePosRots[a-1][0],l=r.timePosRots[a][0],h=r.timePosRots[a+1][0],c=r.accumDistances[a-1],d=r.accumDistances[a],p=r.accumDistances[a+1],g=d-c;if(g!==0){const w=g-(i??(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5);let b=(w<0?0:w)/g;Number.isNaN(b)&&(b=0);const m=(1-b)*u+b*l,E=r.getCurrent(m);E&&s.push([m,E.position,E.rotation])}e&&s.push(r.timePosRots[a]);const _=p-d;if(_!==0){let w=(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5;const b=(t.length==1?t[0]:t[a]||t[t.length-1])*.5||0;w+b>_?(w=_*(w/(w+b)),i=_-w):i=void 0;let m=(w<0?0:w)/_;Number.isNaN(m)&&(m=0);const E=(1-m)*l+m*h,y=r.getCurrent(E);y&&s.push([E,y.position,y.rotation])}}s.push(r.timePosRots[o-1]),r.timePosRots=s}}function _E(r,t){if(t<0)return[void 0,0];if(t>r.length-1)return[void 0,r.length-1];const e=[...r].slice(0,t+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const n=t-e;return[r[n][2],n]}function yE(r,t){if(t<0)return[void 0,0];if(t>=r.length)return[void 0,r.length-1];const e=r.slice(t).findIndex(([,,i])=>i!==void 0),n=e===-1?r.length-1:t+e;return[r[n][2],n]}function E4(r,t,e="Lerp"){let n,i,s,o;if(r.length!==0){if(t<=r[0][0])n=r[0][1],i=r[0][2],s=0,o=0;else if(t>=r[r.length-1][0]){const[u,l,h]=r[r.length-1];n=l,i=h,s=r.length-2,o=1}else{const u=r.findIndex(([l])=>t<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,h]=r[s],[c,d]=r[u],p=(t-l)/(c-l),g=vm(h),_=vm(d),w=v.Vector.lerp(g,_,p);n=wg(w),o=p}{let[l,h]=_E(r,s),[c,d]=yE(r,u);if(e==="Lerp")if(l&&c){if(h<0||d>=r.length)throw new Error("Invalid rotation index");const p=(t-r[h][0])/(r[d][0]-r[h][0]);i=Qp(l,c,p)}else l?i=l:c?i=c:i=void 0;else e==="Prev"?l&&(i=l):e==="Next"&&c&&(i=c)}}return{position:n,rotation:i,index:s,ratio:o}}}function S4(r){try{const t=JSON.parse(r);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",n=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&n?t:void 0}throw new Error("解析有问题")}catch{const e=r.split(/\n|\r\n/),n=[],i=e.length;for(let s=0;s<i;++s){const o=e[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?n.push([a[0],[a[1],a[2],a[3]],void 0]):n.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return n}}function C4(r,t,e){const{timePosRots:n}=r;if(!n)throw new Error("!timePosRots");if(n.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,n[0][0]),e=Math.min(e,n[n.length-1][0]);const i=r.getCurrent(t),s=r.getCurrent(e);if(!i||!s)return;const o=[];i.ratio<1&&o.push([t,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(n[a]);return s.ratio>0&&o.push([e,s.position,s.rotation]),o}const b4=`
|
|
371
371
|
timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
|
|
372
372
|
\`\`\`
|
|
373
373
|
[
|
package/dist/earthsdk3.js
CHANGED
|
@@ -44,7 +44,7 @@ function fd(r) {
|
|
|
44
44
|
}
|
|
45
45
|
let nu;
|
|
46
46
|
try {
|
|
47
|
-
const r = "earthsdk3", e = "3.7.0-beta.
|
|
47
|
+
const r = "earthsdk3", e = "3.7.0-beta.16", t = "2025-12-19T02:00:38.000Z", n = "北京西部世界科技有限公司", i = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", s = "e29deecbad468a096c911c7d606839856be97a79", a = ((Date.now() - 1766109638e3) / 36e5).toFixed(1), u = `%c🌏 ${r}%c ${e}.${s.slice(0, 8)}.${t} (距今${a}个小时)
|
|
48
48
|
%c${i ? i + `
|
|
49
49
|
` : ""}当前网站正在使用${r},此软件版权归${n}所有
|
|
50
50
|
`;
|
|
@@ -58,7 +58,7 @@ try {
|
|
|
58
58
|
},
|
|
59
59
|
// @ts-ignore
|
|
60
60
|
get gituri() {
|
|
61
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
61
|
+
return GITURI_ && GITURI_.replace("${commitId}", "e29deecbad468a096c911c7d606839856be97a79");
|
|
62
62
|
},
|
|
63
63
|
// @ts-ignore
|
|
64
64
|
get info() {
|
|
@@ -66,7 +66,7 @@ try {
|
|
|
66
66
|
},
|
|
67
67
|
// @ts-ignore
|
|
68
68
|
get date() {
|
|
69
|
-
return "2025-12-
|
|
69
|
+
return "2025-12-19T02:00:38.000Z";
|
|
70
70
|
},
|
|
71
71
|
// @ts-ignore
|
|
72
72
|
get author() {
|
|
@@ -74,7 +74,7 @@ try {
|
|
|
74
74
|
},
|
|
75
75
|
// @ts-ignore
|
|
76
76
|
get version() {
|
|
77
|
-
return "3.7.0-beta.
|
|
77
|
+
return "3.7.0-beta.16";
|
|
78
78
|
},
|
|
79
79
|
// @ts-ignore
|
|
80
80
|
get name() {
|
|
@@ -82,7 +82,7 @@ try {
|
|
|
82
82
|
},
|
|
83
83
|
// @ts-ignore
|
|
84
84
|
get commitId() {
|
|
85
|
-
return "
|
|
85
|
+
return "e29deecbad468a096c911c7d606839856be97a79";
|
|
86
86
|
},
|
|
87
87
|
/**
|
|
88
88
|
* 打印版权信息到控制台
|
|
@@ -37161,7 +37161,7 @@ const Br = class Br extends Wt {
|
|
|
37161
37161
|
new rt([this, "url"], "地址", Br.defaults.url),
|
|
37162
37162
|
new M([this, "pixelRange"], "集合范围", Br.defaults.pixelRange),
|
|
37163
37163
|
new M([this, "minimumClusterSize"], "最小数量", Br.defaults.minimumClusterSize),
|
|
37164
|
-
new xt([this, "heightReference"], [["
|
|
37164
|
+
new xt([this, "heightReference"], [["NONE", "NONE"], ["CLAMP_TO_GROUND", "CLAMP_TO_GROUND"], ["CLAMP_TO_TERRAIN", "CLAMP_TO_TERRAIN"]], "高度模式", "NONE")
|
|
37165
37165
|
],
|
|
37166
37166
|
more: [
|
|
37167
37167
|
...t.more,
|
package/dist/earthsdk3.umd.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(g,qn){typeof exports=="object"&&typeof module<"u"?qn(exports,require("js-binary-schema-parser"),require("topojson-client"),require("proj4"),require("@turf/turf"),require("zod"),require("zod-to-json-schema")):typeof define=="function"&&define.amd?define(["exports","js-binary-schema-parser","topojson-client","proj4","@turf/turf","zod","zod-to-json-schema"],qn):(g=typeof globalThis<"u"?globalThis:g||self,qn(g.EarthSDK3={},g.jsBinarySchemaParser,g.topojson,g.proj4,g.turf,g.z,g.zodToJsonSchema))})(this,function(g,qn,qo,gp,Jy,vt,$y){"use strict";var Hb=Object.defineProperty;var qb=(g,qn,qo)=>qn in g?Hb(g,qn,{enumerable:!0,configurable:!0,writable:!0,value:qo}):g[qn]=qo;var d=(g,qn,qo)=>qb(g,typeof qn!="symbol"?qn+"":qn,qo);var si;function mp(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Ky=mp(qo),Qe=mp(Jy);function Zy(){var n;const r=((n=globalThis==null?void 0:globalThis.navigator)==null?void 0:n.userAgent)??"unknown";let e="Unknown";/Windows/.test(r)?e="Windows":/Macintosh/.test(r)?e="MacOS":/Linux/.test(r)?e="Linux":/Android/.test(r)?e="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(e="iOS");let t="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?t="x64":/x86|i686|Win32/.test(r)?t="x86":/arm64|aarch64/.test(r)?t="arm64":/arm/.test(r)&&(t="arm"),{os:e.toLocaleLowerCase(),arch:t.toLocaleLowerCase()}}const Qy=Date.now();function vp(r){var a;const{os:e,arch:t}=Zy(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-Qy)/1e3/60|0,date:new Date().toLocaleString(),href:((a=globalThis==null?void 0:globalThis.location)==null?void 0:a.href)??"unknown",os:e,arch:t},s={method:"GET",headers:new Headers,redirect:"follow"},o=globalThis.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(u=>u.text()).then(u=>console.log(u)).catch(u=>console.log("error",u))}g.copyright=void 0;try{const r="earthsdk3",e="3.7.0-beta.
|
|
1
|
+
(function(g,qn){typeof exports=="object"&&typeof module<"u"?qn(exports,require("js-binary-schema-parser"),require("topojson-client"),require("proj4"),require("@turf/turf"),require("zod"),require("zod-to-json-schema")):typeof define=="function"&&define.amd?define(["exports","js-binary-schema-parser","topojson-client","proj4","@turf/turf","zod","zod-to-json-schema"],qn):(g=typeof globalThis<"u"?globalThis:g||self,qn(g.EarthSDK3={},g.jsBinarySchemaParser,g.topojson,g.proj4,g.turf,g.z,g.zodToJsonSchema))})(this,function(g,qn,qo,gp,Jy,vt,$y){"use strict";var Hb=Object.defineProperty;var qb=(g,qn,qo)=>qn in g?Hb(g,qn,{enumerable:!0,configurable:!0,writable:!0,value:qo}):g[qn]=qo;var d=(g,qn,qo)=>qb(g,typeof qn!="symbol"?qn+"":qn,qo);var si;function mp(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Ky=mp(qo),Qe=mp(Jy);function Zy(){var n;const r=((n=globalThis==null?void 0:globalThis.navigator)==null?void 0:n.userAgent)??"unknown";let e="Unknown";/Windows/.test(r)?e="Windows":/Macintosh/.test(r)?e="MacOS":/Linux/.test(r)?e="Linux":/Android/.test(r)?e="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(e="iOS");let t="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?t="x64":/x86|i686|Win32/.test(r)?t="x86":/arm64|aarch64/.test(r)?t="arm64":/arm/.test(r)&&(t="arm"),{os:e.toLocaleLowerCase(),arch:t.toLocaleLowerCase()}}const Qy=Date.now();function vp(r){var a;const{os:e,arch:t}=Zy(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-Qy)/1e3/60|0,date:new Date().toLocaleString(),href:((a=globalThis==null?void 0:globalThis.location)==null?void 0:a.href)??"unknown",os:e,arch:t},s={method:"GET",headers:new Headers,redirect:"follow"},o=globalThis.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(u=>u.text()).then(u=>console.log(u)).catch(u=>console.log("error",u))}g.copyright=void 0;try{const r="earthsdk3",e="3.7.0-beta.16",t="2025-12-19T02:00:38.000Z",n="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="e29deecbad468a096c911c7d606839856be97a79",a=((Date.now()-1766109638e3)/36e5).toFixed(1),u=`%c🌏 ${r}%c ${e}.${s.slice(0,8)}.${t} (距今${a}个小时)
|
|
2
2
|
%c${i?i+`
|
|
3
3
|
`:""}当前网站正在使用${r},此软件版权归${n}所有
|
|
4
|
-
`;g.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
4
|
+
`;g.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","e29deecbad468a096c911c7d606839856be97a79")},get info(){return u},get date(){return"2025-12-19T02:00:38.000Z"},get author(){return"suplyang"},get version(){return"3.7.0-beta.16"},get name(){return"earthsdk3"},get commitId(){return"e29deecbad468a096c911c7d606839856be97a79"},print(){console.info(this.info,`
|
|
5
5
|
font-size: 18px;
|
|
6
6
|
font-weight: 1000;
|
|
7
7
|
line-height: 1;
|
|
@@ -364,7 +364,7 @@ ${Ey}
|
|
|
364
364
|
hiddenDistance: number
|
|
365
365
|
}
|
|
366
366
|
\`\`\`
|
|
367
|
-
`},Bo=class Bo extends Ht{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new ut([],"通用"),new it([this,"url"],"路径"),new it([this,"poiTypes"],Bo.defaults.poiTypes,Cy.sampleValue),new M([this,"heightOffset"])]}}};d(Bo,"createDefaultProps",()=>({...Ht.createDefaultProps(),url:"",poiTypes:Qt(Cy.defaultValue),heightOffset:40})),d(Bo,"type",Bo.register("ESPoiTileset",Bo,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let Xf=Bo;const fu=class fu extends rt{getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new ut([],"通用","通用"),new X([this,"show"],"是否显示"),new Pt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new Ae([this,"cssPosition"],"位置")]}}};d(fu,"createDefaultProps",()=>({...rt.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),d(fu,"type",fu.register("ESScale",fu,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Yf=fu;const ki=class ki extends Xt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new M([this,"height"],"高度",ki.defaults.height,!0),new M([this,"extrudedHeight"],"拉伸高度",ki.defaults.extrudedHeight,!0),new X([this,"perPositionHeight"],"应用每个位置高度",ki.defaults.perPositionHeight,!0)]}}};d(ki,"createDefaultProps",()=>({...Xt.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),d(ki,"type",ki.register("ESGeoExtrudedPolygon",ki,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),d(ki,"supportEditingModes",[...Xt.supportEditingModes,et.HeightModify]);let Io=ki;const zo=class zo extends Xt{constructor(t){super(t);d(this,"_classification",this.dv(new jc));d(this,"_geoExtrudedPolygon",this.dv(new Io));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:n,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(B([n,"collision"],[this,"collision"])),this.d(B([i,"collision"],[this,"collision"])),this.d(nt([i,"flyInParam"],[this,"flyInParam"])),this.d(nt([i,"flyToParam"],[this,"flyToParam"])),this.d(nt([i,"points"],[this,"points"])),this.d(nt([i,"extrudedHeight"],[this,"height"])),this.d(nt([n,"fillColor"],[this,"overheightColor"])),this.d(nt([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const l=a.map(c=>[c[0],c[1],o]);n.points=l,n.height=u-o,u-o<=0?n.show=!1:n.show=this.show&&this.filled};s(),this.d(Ui([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;n.show=o&&a,i.show=o&&a};s(),this.d(Ui([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new M([this,"height"],"高度",10),new M([this,"maxHeight"],"最高高度",200),new Mt([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Mt([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};d(zo,"createDefaultProps",()=>({...Xt.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),d(zo,"type",zo.register("ESHeightLimitAnalysis",zo,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),d(zo,"supportEditingModes",[...Xt.supportEditingModes,et.HeightModify]);let Jf=zo;const di=class di extends Ht{constructor(t){super(t);d(this,"_widgetEvent",this.dv(new O));d(this,"_data",this.dv(j(void 0)));{const n=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:Wh(this.url)?this.data=JSON.parse(this.url):fetch(rt.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};n(),this.d(this.urlChanged.don(n))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(t){this._data.value=t}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new it([this,"url"],"地址",di.defaults.url),new M([this,"pixelRange"],"集合范围",di.defaults.pixelRange),new M([this,"minimumClusterSize"],"最小数量",di.defaults.minimumClusterSize),new Pt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...t.more,new it([this,"style"],"style",di.defaults.style),new X([this,"perspective"],"透视效果",di.defaults.perspective)]}}};d(di,"createDefaultProps",()=>({...Ht.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:Qt({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"NONE",perspective:!1})),d(di,"type",di.register("ESEntityCluster",di,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let $f=di;class _l extends V{constructor(){super();d(this,"_player",this.disposeVar(new kr));const t=this._player;{const n=()=>{const i=(this.stopTime??0)-(this.startTime??0);t.duration=i>0?i:0};n(),this.d(this.startTimeChanged.don(n)),this.d(this.stopTimeChanged.don(n))}this.d(nt([t,"playing"],[this,"playing"])),this.d(nt([t,"loop"],[this,"loop"])),this.d(nt([t,"speed"],[this,"speed"])),this.d(t.currentTimeChanged.don(()=>{this.startTime!==void 0&&t.currentTime!==void 0&&(this.currentTime=t.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const n=this.currentTime-this.startTime;t.currentTime=jl(n,0,t.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(t){this._player.ratio=t}}(r=>{r.createDefaultProps=()=>({...rt.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(_l||(_l={})),Gi(_l.prototype,_l.createDefaultProps);const pu=class pu extends rt{constructor(t){super(t);d(this,"_absolutePlayer",this.dv(new _l));const n=this.absolutePlayer;this.d(nt([n,"currentTime"],[this,"currentTime"])),this.d(nt([n,"startTime"],[this,"startTime"])),this.d(nt([n,"stopTime"],[this,"stopTime"])),this.d(nt([n,"playing"],[this,"playing"])),this.d(nt([n,"loop"],[this,"loop"])),this.d(nt([n,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(t){this._absolutePlayer.ratio=t}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new Hl([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new io([this,"currentTime"],"currentTime"),new io([this,"startTime"]),new io([this,"stopTime"]),new X([this,"playing"]),new X([this,"loop"]),new M([this,"speed"])]}}};d(pu,"createDefaultProps",()=>({...rt.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),d(pu,"type",pu.register("ESPlayer",pu,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let za=pu;function Sy(r,e=!1){const t=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=t.length;if(n===0)return t;if(n===1)return(!t[0][2]===void 0||e)&&(t[0][2]=void 0),t;for(let i=1;i<n;++i){if(t[i][2]!==void 0&&!e)continue;const s=t[i-1][1],o=t[i][1],a=Vr(s),u=Vr(o),l=g.Vector.distance(a,u);if(l===0){t[i][2]=t[i-1][2];continue}const c=Bu(s,o),h=o[2]-s[2],f=Math.asin(h/l)*180/Math.PI,p=Number.isFinite(c)?c:0,v=Number.isFinite(f)?f:0;t[i][2]=[p,v,0]}return(t[0][2]===void 0||e)&&(t[0][2]=n>1?t[1][2]:void 0),t}function by(r,e=!1){const t=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=t.length;if(n===0)return t;if(n===1)return(!t[0][2]===void 0||e)&&(t[0][2]=void 0),t;for(let i=n-2;i>=0;--i){if(t[i][2]!==void 0&&!e)continue;const s=t[i][1],o=t[i+1][1],a=Vr(s),u=Vr(o),l=g.Vector.distance(a,u);if(l===0){t[i][2]=t[i+1][2];continue}const c=Bu(s,o),h=o[2]-s[2],f=Math.asin(h/l)*180/Math.PI,p=Number.isFinite(c)?c:0,v=Number.isFinite(f)?f:0;t[i][2]=[p,v,0]}return(t[n-1][2]===void 0||e)&&(t[n-1][2]=n>1?t[n-2][2]:[0,0,0]),t}function GS(r,e=!1){const t=Sy(r,e),n=by(r,e);if(t.length!==n.length)throw new Error("p.length !== n.length");const i=t.length;for(let s=0;s<i;s++){const o=t[s][2],a=n[s][2];o===void 0&&a===void 0?t[s][2]=void 0:o===void 0?t[s][2]=a:a===void 0?t[s][2]=o:t[s][2]=Hh(o,a,.5)}return t}function WS(r,e,t){let i;if(!r.timePosRots)return;const s=[],o=r.timePosRots.length;if(!(o<=2)){s.push(r.timePosRots[0]);for(let a=1;a<o-1;++a){const u=r.timePosRots[a-1][0],l=r.timePosRots[a][0],c=r.timePosRots[a+1][0],h=r.accumDistances[a-1],f=r.accumDistances[a],p=r.accumDistances[a+1],v=f-h;if(v!==0){const S=v-(i??(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5);let P=(S<0?0:S)/v;Number.isNaN(P)&&(P=0);const y=(1-P)*u+P*l,_=r.getCurrent(y);_&&s.push([y,_.position,_.rotation])}t&&s.push(r.timePosRots[a]);const C=p-f;if(C!==0){let S=(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5;const P=(e.length==1?e[0]:e[a]||e[e.length-1])*.5||0;S+P>C?(S=C*(S/(S+P)),i=C-S):i=void 0;let y=(S<0?0:S)/C;Number.isNaN(y)&&(y=0);const _=(1-y)*l+y*c,m=r.getCurrent(_);m&&s.push([_,m.position,m.rotation])}}s.push(r.timePosRots[o-1]),r.timePosRots=s}}function Py(r,e){if(e<0)return[void 0,0];if(e>r.length-1)return[void 0,r.length-1];const t=[...r].slice(0,e+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(t===-1)return[void 0,0];const n=e-t;return[r[n][2],n]}function Iy(r,e){if(e<0)return[void 0,0];if(e>=r.length)return[void 0,r.length-1];const t=r.slice(e).findIndex(([,,i])=>i!==void 0),n=t===-1?r.length-1:e+t;return[r[n][2],n]}function HS(r,e,t="Lerp"){let n,i,s,o;if(r.length!==0){if(e<=r[0][0])n=r[0][1],i=r[0][2],s=0,o=0;else if(e>=r[r.length-1][0]){const[u,l,c]=r[r.length-1];n=l,i=c,s=r.length-2,o=1}else{const u=r.findIndex(([l])=>e<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,c]=r[s],[h,f]=r[u],p=(e-l)/(h-l),v=zd(c),C=zd(f),S=g.Vector.lerp(v,C,p);n=Xh(S),o=p}{let[l,c]=Py(r,s),[h,f]=Iy(r,u);if(t==="Lerp")if(l&&h){if(c<0||f>=r.length)throw new Error("Invalid rotation index");const p=(e-r[c][0])/(r[f][0]-r[c][0]);i=Hh(l,h,p)}else l?i=l:h?i=h:i=void 0;else t==="Prev"?l&&(i=l):t==="Next"&&h&&(i=h)}}return{position:n,rotation:i,index:s,ratio:o}}}function qS(r){try{const e=JSON.parse(r);if(Array.isArray(e)&&e.length>0){const t=typeof e[0][0]=="number",n=Array.isArray(e[0][1])&&e[0][1].length===3;return t&&n?e:void 0}throw new Error("解析有问题")}catch{const t=r.split(/\n|\r\n/),n=[],i=t.length;for(let s=0;s<i;++s){const o=t[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?n.push([a[0],[a[1],a[2],a[3]],void 0]):n.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return n}}function XS(r,e,t){const{timePosRots:n}=r;if(!n)throw new Error("!timePosRots");if(n.length===0)throw new Error("timePosRots.length === 0");e=Math.max(e,n[0][0]),t=Math.min(t,n[n.length-1][0]);const i=r.getCurrent(e),s=r.getCurrent(t);if(!i||!s)return;const o=[];i.ratio<1&&o.push([e,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(n[a]);return s.ratio>0&&o.push([t,s.position,s.rotation]),o}const YS=`
|
|
367
|
+
`},Bo=class Bo extends Ht{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new ut([],"通用"),new it([this,"url"],"路径"),new it([this,"poiTypes"],Bo.defaults.poiTypes,Cy.sampleValue),new M([this,"heightOffset"])]}}};d(Bo,"createDefaultProps",()=>({...Ht.createDefaultProps(),url:"",poiTypes:Qt(Cy.defaultValue),heightOffset:40})),d(Bo,"type",Bo.register("ESPoiTileset",Bo,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let Xf=Bo;const fu=class fu extends rt{getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new ut([],"通用","通用"),new X([this,"show"],"是否显示"),new Pt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new Ae([this,"cssPosition"],"位置")]}}};d(fu,"createDefaultProps",()=>({...rt.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),d(fu,"type",fu.register("ESScale",fu,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let Yf=fu;const ki=class ki extends Xt{constructor(e){super(e)}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new M([this,"height"],"高度",ki.defaults.height,!0),new M([this,"extrudedHeight"],"拉伸高度",ki.defaults.extrudedHeight,!0),new X([this,"perPositionHeight"],"应用每个位置高度",ki.defaults.perPositionHeight,!0)]}}};d(ki,"createDefaultProps",()=>({...Xt.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),d(ki,"type",ki.register("ESGeoExtrudedPolygon",ki,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),d(ki,"supportEditingModes",[...Xt.supportEditingModes,et.HeightModify]);let Io=ki;const zo=class zo extends Xt{constructor(t){super(t);d(this,"_classification",this.dv(new jc));d(this,"_geoExtrudedPolygon",this.dv(new Io));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:n,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(B([n,"collision"],[this,"collision"])),this.d(B([i,"collision"],[this,"collision"])),this.d(nt([i,"flyInParam"],[this,"flyInParam"])),this.d(nt([i,"flyToParam"],[this,"flyToParam"])),this.d(nt([i,"points"],[this,"points"])),this.d(nt([i,"extrudedHeight"],[this,"height"])),this.d(nt([n,"fillColor"],[this,"overheightColor"])),this.d(nt([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const l=a.map(c=>[c[0],c[1],o]);n.points=l,n.height=u-o,u-o<=0?n.show=!1:n.show=this.show&&this.filled};s(),this.d(Ui([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;n.show=o&&a,i.show=o&&a};s(),this.d(Ui([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new M([this,"height"],"高度",10),new M([this,"maxHeight"],"最高高度",200),new Mt([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Mt([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};d(zo,"createDefaultProps",()=>({...Xt.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),d(zo,"type",zo.register("ESHeightLimitAnalysis",zo,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),d(zo,"supportEditingModes",[...Xt.supportEditingModes,et.HeightModify]);let Jf=zo;const di=class di extends Ht{constructor(t){super(t);d(this,"_widgetEvent",this.dv(new O));d(this,"_data",this.dv(j(void 0)));{const n=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:Wh(this.url)?this.data=JSON.parse(this.url):fetch(rt.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};n(),this.d(this.urlChanged.don(n))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(t){this._data.value=t}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new it([this,"url"],"地址",di.defaults.url),new M([this,"pixelRange"],"集合范围",di.defaults.pixelRange),new M([this,"minimumClusterSize"],"最小数量",di.defaults.minimumClusterSize),new Pt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","NONE")],more:[...t.more,new it([this,"style"],"style",di.defaults.style),new X([this,"perspective"],"透视效果",di.defaults.perspective)]}}};d(di,"createDefaultProps",()=>({...Ht.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:Qt({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"NONE",perspective:!1})),d(di,"type",di.register("ESEntityCluster",di,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let $f=di;class _l extends V{constructor(){super();d(this,"_player",this.disposeVar(new kr));const t=this._player;{const n=()=>{const i=(this.stopTime??0)-(this.startTime??0);t.duration=i>0?i:0};n(),this.d(this.startTimeChanged.don(n)),this.d(this.stopTimeChanged.don(n))}this.d(nt([t,"playing"],[this,"playing"])),this.d(nt([t,"loop"],[this,"loop"])),this.d(nt([t,"speed"],[this,"speed"])),this.d(t.currentTimeChanged.don(()=>{this.startTime!==void 0&&t.currentTime!==void 0&&(this.currentTime=t.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const n=this.currentTime-this.startTime;t.currentTime=jl(n,0,t.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(t){this._player.ratio=t}}(r=>{r.createDefaultProps=()=>({...rt.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(_l||(_l={})),Gi(_l.prototype,_l.createDefaultProps);const pu=class pu extends rt{constructor(t){super(t);d(this,"_absolutePlayer",this.dv(new _l));const n=this.absolutePlayer;this.d(nt([n,"currentTime"],[this,"currentTime"])),this.d(nt([n,"startTime"],[this,"startTime"])),this.d(nt([n,"stopTime"],[this,"stopTime"])),this.d(nt([n,"playing"],[this,"playing"])),this.d(nt([n,"loop"],[this,"loop"])),this.d(nt([n,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(t){this._absolutePlayer.ratio=t}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new Hl([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new io([this,"currentTime"],"currentTime"),new io([this,"startTime"]),new io([this,"stopTime"]),new X([this,"playing"]),new X([this,"loop"]),new M([this,"speed"])]}}};d(pu,"createDefaultProps",()=>({...rt.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),d(pu,"type",pu.register("ESPlayer",pu,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let za=pu;function Sy(r,e=!1){const t=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=t.length;if(n===0)return t;if(n===1)return(!t[0][2]===void 0||e)&&(t[0][2]=void 0),t;for(let i=1;i<n;++i){if(t[i][2]!==void 0&&!e)continue;const s=t[i-1][1],o=t[i][1],a=Vr(s),u=Vr(o),l=g.Vector.distance(a,u);if(l===0){t[i][2]=t[i-1][2];continue}const c=Bu(s,o),h=o[2]-s[2],f=Math.asin(h/l)*180/Math.PI,p=Number.isFinite(c)?c:0,v=Number.isFinite(f)?f:0;t[i][2]=[p,v,0]}return(t[0][2]===void 0||e)&&(t[0][2]=n>1?t[1][2]:void 0),t}function by(r,e=!1){const t=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=t.length;if(n===0)return t;if(n===1)return(!t[0][2]===void 0||e)&&(t[0][2]=void 0),t;for(let i=n-2;i>=0;--i){if(t[i][2]!==void 0&&!e)continue;const s=t[i][1],o=t[i+1][1],a=Vr(s),u=Vr(o),l=g.Vector.distance(a,u);if(l===0){t[i][2]=t[i+1][2];continue}const c=Bu(s,o),h=o[2]-s[2],f=Math.asin(h/l)*180/Math.PI,p=Number.isFinite(c)?c:0,v=Number.isFinite(f)?f:0;t[i][2]=[p,v,0]}return(t[n-1][2]===void 0||e)&&(t[n-1][2]=n>1?t[n-2][2]:[0,0,0]),t}function GS(r,e=!1){const t=Sy(r,e),n=by(r,e);if(t.length!==n.length)throw new Error("p.length !== n.length");const i=t.length;for(let s=0;s<i;s++){const o=t[s][2],a=n[s][2];o===void 0&&a===void 0?t[s][2]=void 0:o===void 0?t[s][2]=a:a===void 0?t[s][2]=o:t[s][2]=Hh(o,a,.5)}return t}function WS(r,e,t){let i;if(!r.timePosRots)return;const s=[],o=r.timePosRots.length;if(!(o<=2)){s.push(r.timePosRots[0]);for(let a=1;a<o-1;++a){const u=r.timePosRots[a-1][0],l=r.timePosRots[a][0],c=r.timePosRots[a+1][0],h=r.accumDistances[a-1],f=r.accumDistances[a],p=r.accumDistances[a+1],v=f-h;if(v!==0){const S=v-(i??(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5);let P=(S<0?0:S)/v;Number.isNaN(P)&&(P=0);const y=(1-P)*u+P*l,_=r.getCurrent(y);_&&s.push([y,_.position,_.rotation])}t&&s.push(r.timePosRots[a]);const C=p-f;if(C!==0){let S=(e.length==1?e[0]:e[a-1]||e[e.length-1])*.5;const P=(e.length==1?e[0]:e[a]||e[e.length-1])*.5||0;S+P>C?(S=C*(S/(S+P)),i=C-S):i=void 0;let y=(S<0?0:S)/C;Number.isNaN(y)&&(y=0);const _=(1-y)*l+y*c,m=r.getCurrent(_);m&&s.push([_,m.position,m.rotation])}}s.push(r.timePosRots[o-1]),r.timePosRots=s}}function Py(r,e){if(e<0)return[void 0,0];if(e>r.length-1)return[void 0,r.length-1];const t=[...r].slice(0,e+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(t===-1)return[void 0,0];const n=e-t;return[r[n][2],n]}function Iy(r,e){if(e<0)return[void 0,0];if(e>=r.length)return[void 0,r.length-1];const t=r.slice(e).findIndex(([,,i])=>i!==void 0),n=t===-1?r.length-1:e+t;return[r[n][2],n]}function HS(r,e,t="Lerp"){let n,i,s,o;if(r.length!==0){if(e<=r[0][0])n=r[0][1],i=r[0][2],s=0,o=0;else if(e>=r[r.length-1][0]){const[u,l,c]=r[r.length-1];n=l,i=c,s=r.length-2,o=1}else{const u=r.findIndex(([l])=>e<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,c]=r[s],[h,f]=r[u],p=(e-l)/(h-l),v=zd(c),C=zd(f),S=g.Vector.lerp(v,C,p);n=Xh(S),o=p}{let[l,c]=Py(r,s),[h,f]=Iy(r,u);if(t==="Lerp")if(l&&h){if(c<0||f>=r.length)throw new Error("Invalid rotation index");const p=(e-r[c][0])/(r[f][0]-r[c][0]);i=Hh(l,h,p)}else l?i=l:h?i=h:i=void 0;else t==="Prev"?l&&(i=l):t==="Next"&&h&&(i=h)}}return{position:n,rotation:i,index:s,ratio:o}}}function qS(r){try{const e=JSON.parse(r);if(Array.isArray(e)&&e.length>0){const t=typeof e[0][0]=="number",n=Array.isArray(e[0][1])&&e[0][1].length===3;return t&&n?e:void 0}throw new Error("解析有问题")}catch{const t=r.split(/\n|\r\n/),n=[],i=t.length;for(let s=0;s<i;++s){const o=t[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?n.push([a[0],[a[1],a[2],a[3]],void 0]):n.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return n}}function XS(r,e,t){const{timePosRots:n}=r;if(!n)throw new Error("!timePosRots");if(n.length===0)throw new Error("timePosRots.length === 0");e=Math.max(e,n[0][0]),t=Math.min(t,n[n.length-1][0]);const i=r.getCurrent(e),s=r.getCurrent(t);if(!i||!s)return;const o=[];i.ratio<1&&o.push([e,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(n[a]);return s.ratio>0&&o.push([t,s.position,s.rotation]),o}const YS=`
|
|
368
368
|
timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
|
|
369
369
|
\`\`\`
|
|
370
370
|
[
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "earthsdk3",
|
|
3
|
-
"version": "3.7.0-beta.
|
|
3
|
+
"version": "3.7.0-beta.16",
|
|
4
4
|
"description": "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/earthsdk3.umd.cjs",
|
|
@@ -53,4 +53,4 @@
|
|
|
53
53
|
"types": "./dist/types/index.d.ts",
|
|
54
54
|
"import": "./dist/earthsdk3.js"
|
|
55
55
|
}
|
|
56
|
-
}
|
|
56
|
+
}
|