earthsdk3-cesium 3.6.0-beta.114 → 3.6.0-beta.116
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-cesium.iife.js +3 -3
- package/dist/earthsdk3-cesium.js +14 -14
- package/dist/earthsdk3-cesium.umd.cjs +3 -3
- package/dist/types/CzmObjects/general/CzmESMVTLayer/VectorTilesManager/VectorTilesCache.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/CzmObjects/base/InnerClass/XbsjGroundPolylinePrimitive/GroundPolylinePrimitive.d.ts +0 -148
- package/dist/types/CzmObjects/general/CzmESSignalTransmission/XbsjPolyline/XbsjPolylineGeometry.d.ts +0 -3
- package/dist/types/CzmObjects/general/CzmESSignalTransmission/XbsjPolyline/xbsjCreateODLinesPrimitive.d.ts +0 -29
- package/dist/types/CzmObjects/general/CzmESVideoFusion/XbsjCameraVideo/XbsjCameraVideo.d.ts +0 -18
- package/dist/types/CzmObjects/general/CzmESViewShed/XbsjViewshed/XbsjViewshed.d.ts +0 -16
- package/dist/types/ESCesiumViewer/BackGroundImage/BackGroundImage.d.ts +0 -5
- package/dist/types/ESCesiumViewer/LocalSkyBox/SkyAtmosphere.d.ts +0 -14
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatPipelineStage.d.ts +0 -12
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatTexturePipelineStage.d.ts +0 -11
- package/dist/types/ESCesiumViewer/initCesiumViewer/fixGoogleEarth/cesiumFixGoogleEarth.d.ts +0 -1
- package/dist/types/__declares/cesium.d.ts +0 -427
- package/dist/types/utils/czmUtils/todo/generateCartesianArc/czm/generateCartesianArc.d.ts +0 -8
- package/dist/types/utils/generalUtils/geoPolylineToBezierSpline/bezierSpline/index.d.ts +0 -37
- package/dist/types/utils/generalUtils/geoPolylineToBezierSpline/bezierSpline/lib/spline.d.ts +0 -62
|
@@ -1743,7 +1743,7 @@ ${$y}
|
|
|
1743
1743
|
vec4 imageColor = texture(u_image, fract(v_st * u_stScale - addst));
|
|
1744
1744
|
out_FragColor = imageColor * u_color;
|
|
1745
1745
|
}
|
|
1746
|
-
`};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(this.heightChanged,this.positionsChanged));this.dispose(l.disposableOn(r))}this.dispose(this.flyToEvent.disposableOn(r=>{this.czmCustomPrimitive.flyTo(r)}));{const r=()=>{const c=s.value?s.value:1,u=this.height??un.defaults.height,{textureSizeInMeters:d=un.defaults.textureSizeInMeters}=this,{textureUri:p=un.defaults.textureUri}=this;o.uniformMap={u_image:{type:"image",uri:p},u_stScale:[c/d[0],u/d[1]],u_speed:this.textureMoveSpeed??un.defaults.textureMoveSpeed,u_color:this.textureColor??un.defaults.textureColor}};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(this.textureColorChanged,this.textureMoveSpeedChanged,this.textureSizeInMetersChanged,this.heightChanged,this.textureSizeInMetersChanged,this.textureUriChanged,s.changed));this.dispose(l.disposableOn(r))}}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get czmCustomPrimitive(){return this._czmCustomPrimitive}get geoBoundingSphere(){return this._geoBoundingSphere.value}get geoBoundingSphereChanged(){return this._geoBoundingSphere.changed}};m(un,"defaults",{show:!0,allowPicking:!1,positions:[],height:1e3,textureSizeInMeters:[500,500],textureUri:"${earthsdk3-assets-script-dir}/assets/img/location.png",textureMoveSpeed:[0,.3],textureColor:[1,1,1,1]});let Io=un;(t=>{t.createDefaultProps=()=>({show:void 0,allowPicking:void 0,positions:a.reactPositions(void 0),height:void 0,textureSizeInMeters:a.reactArrayWithUndefined(void 0),textureUri:void 0,textureMoveSpeed:a.reactArrayWithUndefined(void 0),textureColor:a.reactArrayWithUndefined(void 0)})})(Io||(Io={})),a.extendClassProps(Io.prototype,Io.createDefaultProps);const Cl=class Cl extends yt{constructor(e,n){super(e,n);m(this,"_czmPolygonFence");m(this,"_czmPolygon");if(this._czmPolygonFence=this.disposeVar(new Io(n,e.id)),this._czmPolygon=this.dv(new a.ESGeoPolygon),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmPolygonFence,r=this._czmPolygon;n.add(r),this.dispose(()=>n.delete(r)),r.filled=!1,this.d(a.track([r,"points"],[e,"points"])),this.d(a.track([r,"stroked"],[e,"stroked"])),this.d(a.track([r,"strokeColor"],[e,"strokeColor"])),this.d(a.track([r,"strokeWidth"],[e,"strokeWidth"])),this.d(a.track([r,"strokeGround"],[e,"strokeGround"]));{const l={danger:{color:[.99,.98,.57,1],image:"01.png"},checkerboard:{color:[.88,.98,.99,1],image:"02.png"},warning:{color:[1,.93,.58,1],image:"03.png"},cord:{color:[.91,.87,.56,1],image:"04.png"},scanline:{color:[.43,.78,.8,1],image:"05.png"},honeycomb:{color:[.28,.84,.86,1],image:"06.png"},gradientColor:{color:[1,1,1,1],image:"07.png"}},c=(f,g)=>{switch(f){case"danger":return{textureMoveSpeed:[.05,0],textureSizeInMeters:[2,2]};case"checkerboard":return{textureMoveSpeed:[0,0],textureSizeInMeters:[2,2]};case"warning":return{textureMoveSpeed:[-.05,0],textureSizeInMeters:[2,2]};case"cord":return{textureMoveSpeed:[-.05,0],textureSizeInMeters:[2,2]};case"scanline":return{textureMoveSpeed:[0,0],textureSizeInMeters:[g,g]};case"honeycomb":return{textureMoveSpeed:[0,0],textureSizeInMeters:[g,g]};case"gradientColor":return{textureMoveSpeed:[0,0],textureSizeInMeters:[g,g]};default:return{textureMoveSpeed:[0,0],textureSizeInMeters:[g*.5,2]}}},u="${earthsdk3-assets-script-dir}/assets/img/fence/",d=()=>{const f=e.materialMode,g=l[f];if(!g)return;s.textureUri=u+g.image,s.textureColor=f!=="gradientColor"?g.color:e.fillColor;const{textureMoveSpeed:v,textureSizeInMeters:y}=c(f,e.height);s.textureMoveSpeed=v,s.textureSizeInMeters=y};d();const p=this.disposeVar(a.createNextAnimateFrameEvent(e.materialModeChanged,e.heightChanged,e.fillColorChanged));this.dispose(p.disposableOn(d))}{this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),this.dispose(a.bind([s,"positions"],[e,"points"])),this.dispose(a.track([s,"height"],[e,"height"]));{const l=()=>{s.show=e.show&&e.filled};l();const c=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.filledChanged));this.dispose(c.don(l))}}}get czmPolygonFence(){return this._czmPolygonFence}get czmPolygon(){return this._czmPolygon}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmPolygonFence:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(Rt(s,o,n,e,r.czmCustomPrimitive),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmPolygonFence:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):(Rt(s,o,n,e,r.czmCustomPrimitive),!0):!1}};m(Cl,"type",Cl.register("ESCesiumViewer",a.ESPolygonFence.type,Cl));let Np=Cl;const _l=class _l extends yt{constructor(e,n){super(e,n);m(this,"_czmESRectangle");if(this._czmESRectangle=this.disposeVar(new Si(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmESRectangle;this.dispose(a.bind([s,"show"],[e,"show"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),this.dispose(a.track([s,"ground"],[e,"fillGround"])),this.dispose(a.track([s,"strokeGround"],[e,"strokeGround"])),this.dispose(a.track([s,"outlineTranslucent"],[e,"outlineTranslucent"])),this.dispose(a.bind([s,"height"],[e,"height"])),this.dispose(a.bind([s,"extrudedHeight"],[e,"extrudedHeight"])),this.dispose(a.bind([s,"rectangle"],[e,"rectangle"])),this.dispose(a.bind([s,"stRotation"],[e,"stRotation"])),this.dispose(a.bind([s,"rotation"],[e,"rotation"])),this.dispose(a.track([s,"outline"],[e,"stroked"])),this.dispose(a.track([s,"outlineColor"],[e,"strokeColor"]));{const r=()=>{const l=e.points;if(l&&l.length>=2){const{minPos:c,maxPos:u}=a.getMinMaxCorner(l);s.rectangle=[c[0],c[1],u[0],u[1]],s.height=l[1][2],s.extrudedHeight=l[0][2]}else s.rectangle=void 0,s.height=0,s.extrudedHeight=0};r(),this.dispose(e.pointsChanged.disposableOn(()=>r()))}{const r=()=>{e.filled?s.material={type:"Color",color:e.fillColor}:s.material={type:"Color",color:[1,1,1,0]}};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(l.disposableOn(r))}}get czmESRectangle(){return this._czmESRectangle}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmESRectangle:r}=this;if(!s.actived)return!1;if(o.flyToParam||o.flyInParam)return super.flyTo(e,n);if(r.rectangle){const l=[[r.rectangle[0],r.rectangle[1],r.height],[r.rectangle[2],r.rectangle[3],r.height],[r.rectangle[0],r.rectangle[1],r.extrudedHeight],[r.rectangle[2],r.rectangle[3],r.extrudedHeight]];return oe(s,o,n,l,e),!0}return!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmESRectangle:r}=this;if(!s.actived)return!1;if(o.flyInParam)return super.flyIn(e,n);if(r.rectangle){const l=[[r.rectangle[0],r.rectangle[1],r.height],[r.rectangle[2],r.rectangle[3],r.height],[r.rectangle[0],r.rectangle[1],r.extrudedHeight],[r.rectangle[2],r.rectangle[3],r.extrudedHeight]];return oe(s,o,n,l,e),!0}return!1}};m(_l,"type",_l.register("ESCesiumViewer",a.ESRectangle.type,_l));let Bp=_l;const Zn=class Zn extends a.Destroyable{constructor(e,n){super();m(this,"_flyToEvent",this.disposeVar(new a.Event));const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}const s=a.ESSceneObject.context.createEnvStrReact([this,"imageUrl"],Zn.defaults.imageUrl),r=this.disposeVar(a.react(void 0)),l=()=>{const C=h.Material.fromType(h.Material.ImageType);C.uniforms.image=s.value,C.uniforms.repeat=Pe(this.repeat??Zn.defaults.repeat),r.value=C};l();const c=this.disposeVar(a.createNextAnimateFrameEvent(s.changed,this.repeatChanged));this.dispose(c.disposableOn(l));const u=(C,S)=>{const x=new h.PolylineMaterialAppearance({material:S,renderState:{depthTest:{enabled:!1}}});x.renderState.depthMask=!1;const A=[];if(C.length<2)return;A.push(new h.GeometryInstance({geometry:new h.GroundPolylineGeometry({positions:C,width:this.width??Zn.defaults.width,vertexFormat:h.PolylineMaterialAppearance.VERTEX_FORMAT,arcType:h.ArcType[this.arcType??Zn.defaults.arcType]}),id:this}));const R=new Ti({geometryInstances:A,appearance:x,asynchronous:!1,allowPicking:this.allowPicking??Zn.defaults.allowPicking,compressVertices:!1});return R.ESSceneObjectID=n,R};let d;const p=new h.BoundingSphere,f=()=>{d&&(o.scene.primitives.remove(d),d=void 0)};this.dispose(f);const g=()=>{if(f(),!this.positions)return;const C=pt(this.positions);if(C.length<2||!r.value){p.radius=-1;return}h.BoundingSphere.fromPoints(C,p),d=u(C,r.value),d&&o.scene.primitives.add(d)},v=()=>{d&&(d.show=this.show??!0)};this.dispose(this.flyToEvent.disposableOn(C=>{if(e.actived&&p.radius>0){const S=se(p.center);S&&ne(o,S,p.radius*4,void 0,C)}})),g(),v();const y=this.disposeVar(a.createNextAnimateFrameEvent(this.positionsChanged,this.widthChanged,r.changed,this.arcTypeChanged,this.allowPickingChanged));this.dispose(y.disposableOn(()=>{g(),v()}));const w=this.disposeVar(a.createNextAnimateFrameEvent(this.showChanged));this.dispose(w.disposableOn(()=>{v()}));const{extensions:P}=e;if(!P){console.warn("!extensions");return}}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}};m(Zn,"defaults",{show:!0,positions:[],width:50,arcType:"GEODESIC",imageUrl:"${earthsdk3-assets-script-dir}/assets/img/roads/4.jpg",repeat:[100,1],allowPicking:!1});let Do=Zn;(t=>{t.createDefaultProps=()=>({show:void 0,positions:a.reactPositions(void 0),width:void 0,arcType:void 0,imageUrl:void 0,repeat:void 0,allowPicking:void 0})})(Do||(Do={})),a.extendClassProps(Do.prototype,Do.createDefaultProps);const Pl=class Pl extends yt{constructor(e,n){super(e,n);m(this,"_czmESRoad");if(this._czmESRoad=this.disposeVar(new Do(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmESRoad;{const r=()=>{s.show=e.show&&e.stroked};r();const l=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged));this.dispose(l.don(r))}this.dispose(a.bind([s,"positions"],[e,"points"])),this.dispose(a.track([s,"width"],[e,"width"])),this.dispose(a.track([s,"arcType"],[e,"arcType"])),this.dispose(a.track([s,"imageUrl"],[e,"imageUrl"])),this.dispose(a.track([s,"repeat"],[e,"repeat"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"]))}get czmESRoad(){return this._czmESRoad}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmESRoad:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmESRoad:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}};m(Pl,"type",Pl.register("ESCesiumViewer",Ch.type,Pl));let Vp=Pl;const bl=class bl extends a.EngineObject{constructor(e,n){super(e,n);m(this,"_customDiv");if(this._customDiv=this.disposeVar(new a.ESCustomDiv(e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._customDiv;n.add(s),this.dispose(()=>n.delete(s)),s.instanceClass=class extends a.Destroyable{constructor(l,c,u){super(),this._subContainer=l;const d=document.createElement("div");this._subContainer.appendChild(d),this.dispose(()=>this._subContainer.removeChild(d));{const y=()=>{d.style.display=e.show??a.ESScale.defaults.show?"block":"none"};y(),e.dispose(e.showChanged.disposableOn(y))}d.style.position="fixed",d.style.width="125px",d.style.height="30px",d.style.border="1px solid rgba(49,50,56,.8)",d.style.padding="0 5px",d.style.backgroundColor="rgba(37,38,42,.8)",d.style.borderRadius="15px",d.style.pointerEvents="auto",d.style.transition=" right 0.4s linear";{const y=()=>{d.style.bottom=`${e.cssPosition?e.cssPosition[0]:a.ESScale.defaults.cssPosition[0]}px`,e.screenPosition==="left"?(d.style.right="auto",d.style.left=`${e.cssPosition?e.cssPosition[1]:a.ESScale.defaults.cssPosition[1]}px`):(d.style.left="auto",d.style.right=`${e.cssPosition?e.cssPosition[1]:a.ESScale.defaults.cssPosition[1]}px`)},w=this.disposeVar(a.createNextAnimateFrameEvent(e.cssPositionChanged,e.screenPositionChanged));y(),this.dispose(w.disposableOn(()=>y()))}const p=document.createElement("div");d.appendChild(p),this.dispose(()=>d.removeChild(p)),p.style.width="125px",p.style.display="inline-block",p.style.textAlign="center",p.style.fontSize="14px",p.style.fontWeight="lighter",p.style.lineHeight="30px",p.style.color="#fff",p.innerHTML="1000km";const f=document.createElement("div");d.appendChild(f),this.dispose(()=>d.removeChild(f)),f.style.borderRight="1px solid #fff",f.style.borderLeft="1px solid #fff",f.style.borderBottom="1px solid #fff",f.style.position="absolute",f.style.height="10px",f.style.top="15px",f.style.width="75px",f.style.left=`${60/2}px`;const g=()=>{const y=n.viewerLegend.legend.computedLengthInMeters;if(e.show===!1||y&&y>1e6)d.style.display="none";else{d.style.display="block";const w=n.viewerLegend.legend.computedLengthInStr;w&&(p.innerHTML=w);const P=n.viewerLegend.legend.computedLengthInPixels;if(P){f.style.width=`${P}px`;const C=(135-P)/2;f.style.left=`${C}px`}}};g();const v=setInterval(()=>{g()},200);this.dispose(()=>clearInterval(v))}}}get customDiv(){return this._customDiv}};m(bl,"type",bl.register("ESCesiumViewer",a.ESScale.type,bl));let Up=bl;const Sl=class Sl extends me{constructor(e,n){super(e,n);m(this,"_czmCustomPrimitive");if(this._czmCustomPrimitive=this.disposeVar(new ze(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmCustomPrimitive;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),this.dispose(Je([s,"rotation"],[e,"rotation"])),this.dispose(a.track([s,"position"],[e,"position"])),this.dispose(a.track([s,"scale"],[e,"scale"])),this.dispose(a.track([s,"viewDistanceRange"],[e,"viewDistanceRange"])),this.dispose(a.track([s,"viewDistanceDebug"],[e,"viewDistanceDebug"])),this.dispose(a.track([s,"maximumScale"],[e,"maximumScale"])),this.dispose(a.track([s,"minimumScale"],[e,"minimumScale"])),this.dispose(a.track([s,"pixelSize"],[e,"pixelSize"])),this.dispose(a.track([s,"showSceneScale"],[e,"showSceneScale"])),this.dispose(a.track([s,"modelMatrix"],[e,"modelMatrix"])),this.dispose(a.track([s,"cull"],[e,"cull"])),this.dispose(a.track([s,"boundingVolume"],[e,"boundingVolume"])),this.dispose(a.track([s,"pass"],[e,"pass"])),this.dispose(a.track([s,"primitiveType"],[e,"primitiveType"])),this.dispose(a.track([s,"renderState"],[e,"renderState"])),this.dispose(a.track([s,"vertexShaderSource"],[e,"vertexShaderSource"])),this.dispose(a.track([s,"fragmentShaderSource"],[e,"fragmentShaderSource"])),this.dispose(a.track([s,"uniformMap"],[e,"uniformMap"])),this.dispose(a.track([s,"attributes"],[e,"attributes"])),this.dispose(a.track([s,"indexTypedArray"],[e,"indexTypedArray"])),this.dispose(a.track([s,"attributesJson"],[e,"attributesJson"])),this.dispose(a.track([s,"indexTypedArrayJson"],[e,"indexTypedArrayJson"])),this.dispose(a.track([s,"count"],[e,"count"])),this.dispose(a.track([s,"offset"],[e,"offset"])),this.dispose(a.track([s,"instanceCount"],[e,"instanceCount"])),this.dispose(a.track([s,"localPosition"],[e,"localPosition"])),this.dispose(a.track([s,"localScale"],[e,"localScale"])),this.dispose(a.track([s,"localModelMatrix"],[e,"localModelMatrix"])),this.dispose(a.track([s,"debugShowBoundingVolume"],[e,"debugShowBoundingVolume"])),this.dispose(a.track([s,"debugOverlappingFrustums"],[e,"debugOverlappingFrustums"])),this.dispose(a.track([s,"occlude"],[e,"occlude"])),this.dispose(a.track([s,"castShadows"],[e,"castShadows"])),this.dispose(a.track([s,"receiveShadows"],[e,"receiveShadows"])),this.dispose(a.track([s,"executeInClosestFrustum"],[e,"executeInClosestFrustum"])),this.dispose(a.track([s,"pickOnly"],[e,"pickOnly"])),this.dispose(a.track([s,"depthForTranslucentClassification"],[e,"depthForTranslucentClassification"]));{const r=()=>{if(e.localRotation){const l=[...e.localRotation];l[0]-=90,s.localRotation=l}else s.localRotation=[-90,0,0]};r(),this.dispose(e.localRotationChanged.disposableOn(r))}}get czmCustomPrimitive(){return this._czmCustomPrimitive}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmCustomPrimitive:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(Rt(s,o,n,e,r,!0),!0):!1}};m(Sl,"type",Sl.register("ESCesiumViewer",yh.type,Sl));let Wp=Sl;const El=class El extends dh{constructor(e,n){super(e,n);m(this,"czmGeoPolyline");m(this,"czmWater");if(!n.viewer){console.warn("viewer is undefined!");return}if(!et(n.viewer))return;this.czmGeoPolyline=this.dv(new Se(n,e.id)),this.czmWater=this.dv(new fo(n,e.id));const{czmGeoPolyline:r,czmWater:l}=this;this.d(a.track([l,"allowPicking"],[e,"allowPicking"])),this.d(a.track([l,"ground"],[e,"fillGround"])),this.d(a.track([r,"allowPicking"],[e,"allowPicking"])),this.d(a.track([r,"color"],[e,"strokeColor"])),this.d(a.track([r,"width"],[e,"strokeWidth"])),this.d(a.track([r,"ground"],[e,"strokeGround"]));{const c=this.dv(a.createNextAnimateFrameEvent(e.waterColorChanged,e.frequencyChanged,e.waveVelocityChanged,e.amplitudeChanged,e.specularIntensityChanged,e.waterTypeChanged,e.flowDirectionChanged,e.flowSpeedChanged)),u=()=>{if(e.waterType==="custom")this.updateWater({waterColor:e.waterColor??a.ESDynamicWater.defaults.waterColor,frequency:(e.frequency??a.ESDynamicWater.defaults.frequency)/10,waveVelocity:(e.waveVelocity??a.ESDynamicWater.defaults.waveVelocity)/100,amplitude:(e.amplitude??a.ESDynamicWater.defaults.amplitude)*100,specularIntensity:e.specularIntensity??a.ESDynamicWater.defaults.specularIntensity,flowDirection:e.flowDirection??a.ESDynamicWater.defaults.flowDirection,flowSpeed:e.flowSpeed??a.ESDynamicWater.defaults.flowSpeed});else{const d=Object.assign({},Ec[e.waterType]);d.frequency&&(d.frequency/=10),d.waveVelocity&&(d.waveVelocity/=100),d.amplitude&&(d.amplitude*=100),this.updateWater(d)}};u(),this.d(c.don(u))}{const c=()=>{r.show=e.show&&e.stroked},u=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged));this.d(u.don(c)),c()}{const c=()=>{l.show=!!(e.show&&e.filled)},u=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.filledChanged));this.d(u.don(c)),c()}{const c=()=>{if(!e.points||e.points&&e.points.length<=2){r.positions=[],l.points=[];return}if(e.scale&&e.scale.some(f=>f===0)){console.warn("缩放属性(scale)不能设置值为0");return}const d=e.points.map(f=>[f[0],f[1],0]),[p]=yn({originPosition:e.position,originRotation:e.rotation,originScale:e.scale,initialRotationMode:"XForwardZUp"},d);r.positions=[...p,p[0]],l.points=[...p]};c();const u=this.dv(a.createNextAnimateFrameEvent(e.pointsChanged,e.positionChanged,e.rotationChanged,e.scaleChanged));this.d(u.don(c))}}visibleDistance(e,n){var o;if((o=n.viewer)!=null&&o.camera&&e.show){const s=a.getDistancesFromPositions([e.position,Ht(n.viewer.camera)],"NONE")[0];let r=!1;e.minVisibleDistance<e.maxVisibleDistance?r=e.minVisibleDistance<s&&s<e.maxVisibleDistance:e.maxVisibleDistance==0&&(r=s>e.minVisibleDistance),this.czmGeoPolyline&&(this.czmGeoPolyline.show=e.show&&e.stroked&&r),this.czmWater&&(this.czmWater.show=e.show&&e.filled&&r)}}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmWater:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):r!=null&&r.points?(oe(s,o,n,r.points,e,!0),!0):!1:!1}updateWater(e){const{czmWater:n}=this;n&&(e.waterColor&&n.waterColor!=e.waterColor&&(n.waterColor=e.waterColor),e.specularIntensity!=null&&n.specularIntensity!=e.specularIntensity&&(n.specularIntensity=e.specularIntensity),e.frequency!=null&&n.frequency!=e.frequency&&(n.frequency=e.frequency),e.waveVelocity!=null&&n.animationSpeed!=e.waveVelocity&&(n.animationSpeed=e.waveVelocity),e.amplitude!=null&&n.amplitude!=e.amplitude&&(n.amplitude=e.amplitude),e.flowSpeed!=null&&n.flowSpeed!=e.flowSpeed&&(n.flowSpeed=e.flowSpeed),n.baseWaterImage=e.waterImage,n.stRotation=e.flowDirection)}};m(El,"type",El.register("ESCesiumViewer",a.ESDynamicWater.type,El));let Gp=El;const Me=class Me extends jt{constructor(e,n){super(e,n);m(this,"_dataSource",this.disposeVar(a.react(void 0)));m(this,"_pointFeatures",this.disposeVar(a.reactJsonWithUndefined(void 0)));m(this,"featureArrName","features");const o=n.viewer;if(!o){console.warn("viewer is undefined!");return}const s=et(o);if(!s)return;const{screenManager:r}=s,l={scale:1*Me.scaleFactor,font:"16px sans-serif",verticalOrigin:h.VerticalOrigin.BOTTOM,horizontalOrigin:h.HorizontalOrigin.CENTER,scaleByDistance:Me.scaleByDistance,eyeOffset:new h.Cartesian3(0,0,-10),show:!0},c={scale:1*Me.scaleFactor,verticalOrigin:h.VerticalOrigin.BOTTOM,horizontalOrigin:h.HorizontalOrigin.CENTER,scaleByDistance:Me.scaleByDistance,image:Me.clusterImageUrl};(async()=>{if(Me.clusterImageAttribute===void 0){const u=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPoi2D/clusterJson.json");await fetch(u).then(d=>d.json()).then(d=>{Me.clusterImageAttribute=d}).catch(d=>{console.error(d)})}{const u=()=>{if(!e.data){this.pointFeatures=void 0;return}this.featureArrName=e.data.type=="FeatureCollection"?"features":"geometries";const d={type:e.data.type,[this.featureArrName]:[]};if(e.data.type==="FeatureCollection")for(let p=0;p<e.data.features.length;p++){const f=e.data.features[p];if(f.geometry.type=="Point")d[this.featureArrName].push(f);else if(f.geometry.type=="MultiPoint")for(let g=0;g<f.geometry.coordinates.length;g++)d[this.featureArrName].push({type:"Feature",geometry:{type:"Point",coordinates:f.geometry.coordinates[g]},properties:f.properties??{}});else console.log("POI聚合只能加载Point和MultiPoint类型的数据,未加载数据类型为:",f.geometry.type)}else if(e.data.type=="GeometryCollection")for(let p=0;p<e.data.geometries.length;p++){const f=e.data.geometries[p];if(f.type=="Point")d[this.featureArrName].push(f);else if(f.type=="MultiPoint")for(let g=0;g<f.coordinates.length;g++)d[this.featureArrName].push({type:"Feature",geometry:{type:"Point",coordinates:f.coordinates[g]},properties:f.properties??{}});else console.log("POI聚合只能加载Point和MultiPoint类型的数据,未加载数据类型为:",f.type)}this.pointFeatures=d};u(),this.ad(e.dataChanged.don(u))}{const u=()=>{this.dataSource&&o.dataSources.remove(this.dataSource),this.dataSource=void 0};this.ad(()=>u());const d=()=>{u(),this.pointFeatures&&h.GeoJsonDataSource.load(this.pointFeatures).then(p=>{o.dataSources.add(p).then(()=>{this.dataSource=p})})};d(),this.ad(this.pointFeaturesChanged.don(d))}this.ad(new a.ObjResettingWithEvent(this.dataSourceChanged,()=>{var v;if(!this.dataSource)return;const u=new a.Destroyable,d=this.dataSource;d.clustering.enabled=d.clustering.clusterBillboards=d.clustering.clusterLabels=d.clustering.clusterPoints=!0;for(let y=0;y<d.entities.values.length;y++){const w=d.entities.values[y];w.billboard&&(w.billboard.color=new h.ConstantProperty(h.Color.TRANSPARENT))}{const y=()=>{const P=d.clustering.pixelRange;d.clustering.pixelRange=0,d.clustering.pixelRange=P};y();let w=(v=this.czmViewer.viewer)==null?void 0:v.camera.moveEnd.addEventListener(()=>{y()});u.d(()=>{var P;w&&((P=this.czmViewer.viewer)==null||P.camera.moveEnd.removeEventListener(w))})}u.d(a.track([d.clustering,"pixelRange"],[e,"pixelRange"])),u.d(a.track([d.clustering,"minimumClusterSize"],[e,"minimumClusterSize"])),d.clustering.clusterEvent.addEventListener((y,w)=>{w.label&&(w.label.show=!1),w.billboard&&(w.billboard.show=!1),w.point&&(w.point.show=!1)});const p=u.ad(a.react(!1));let f=[];const g=o.scene.postUpdate.addEventListener(()=>{if(d.clustering._clusterLabelCollection)if(d.clustering._clusterLabelCollection._labels.length!=f.length||!d.clustering._clusterLabelCollection._labels.every(y=>f.includes(y.id.length))){f=[];for(let y=0;y<d.clustering._clusterLabelCollection._labels.length;y++){const w=d.clustering._clusterLabelCollection._labels[y];f.push(w.id.length)}p.value=!0}else p.value=!1});u.ad(()=>g());{let y={id:"",layer:"",screenObjectIds:[]},w={id:"",layer:"",screenObjectIds:[]};const P=()=>{y&&(r.remove(y.layer,y.id,{label:y.screenObjectIds}),y={id:"",layer:"",screenObjectIds:[]}),w&&(r.remove(w.layer,w.id,{billboard:w.screenObjectIds}),w={id:"",layer:"",screenObjectIds:[]})};u.ad(()=>{P()});const C=()=>{var G,O,N,_,E,D;if(P(),!e.show||!Me.clusterImageAttribute)return;const x=e.style??a.ESEntityCluster.defaults.style,A=Me.clusterImageAttribute[((G=x.nonCluster)==null?void 0:G.mode)??"SquareH01"],R=[-A.anchorPixelOffset[0]+A.textPixelOffset[0],-A.anchorPixelOffset[1]-A.textPixelOffset[1]],L={...l,pixelOffset:new h.Cartesian2(R[0]*Me.scaleFactor,R[1]*Me.scaleFactor),heightReference:h.HeightReference[(e.heightReference??a.ESEntityCluster.defaults.heightReference).toUpperCase()]},B={...c,width:A.imageSize[0],height:A.imageSize[1],heightReference:h.HeightReference[(e.heightReference??a.ESEntityCluster.defaults.heightReference).toUpperCase()],pixelOffset:new h.Cartesian2(-A.anchorPixelOffset[0]*Me.scaleFactor,-A.anchorPixelOffset[1]*Me.scaleFactor),imageSubRegion:new h.BoundingRectangle(...A.imagePixelOffset,...A.imageSize)},V=new Map;if(d.clustering._clusterLabelCollection)for(let z=0;z<d.clustering._clusterLabelCollection._labels.length;z++){const U=d.clustering._clusterLabelCollection._labels[z];if(!Me.clusterImageAttribute)continue;const Y=U.text,q=se(U.position),X={index:U.id.map(Ae=>d.entities.values.length-1-d.clustering._collectionIndicesByEntity[Ae.id].billboardIndex).sort((Ae,Te)=>Ae-Te),name:Y,position:q},Q=this.getClusterStyle(x.cluster??a.ESEntityCluster.defaults.style.cluster,U.id.length).mode,j=Me.clusterImageAttribute[Q],ae=[-j.anchorPixelOffset[0]+j.textPixelOffset[0],-j.anchorPixelOffset[1]-j.textPixelOffset[1]],ue={...l,pixelOffset:new h.Cartesian2(ae[0]*Me.scaleFactor,ae[1]*Me.scaleFactor),heightReference:h.HeightReference[(e.heightReference??a.ESEntityCluster.defaults.heightReference).toUpperCase()]},fe={...c,width:j.imageSize[0],height:j.imageSize[1],heightReference:h.HeightReference[(e.heightReference??a.ESEntityCluster.defaults.heightReference).toUpperCase()],pixelOffset:new h.Cartesian2(-j.anchorPixelOffset[0]*Me.scaleFactor,-j.anchorPixelOffset[1]*Me.scaleFactor),imageSubRegion:new h.BoundingRectangle(...j.imagePixelOffset,...j.imageSize)},_e=r.addImage(e.id,e.typeName,fe,X),Oe=r.addLabel(e.id,e.typeName,ue,X);w.id=_e.id,w.layer=_e.layer,w.screenObjectIds.push(_e.screenObjectId),y.id=Oe.id,y.layer=Oe.layer,y.screenObjectIds.push(Oe.screenObjectId);for(let Ae=0;Ae<U.id.length;Ae++)V.set(U.id[Ae].id,1)}for(let z=0;z<d.entities.values.length;z++){const U=d.entities.values[z];if(V.has(U.id)||!this.pointFeatures||!n.isPointVisible(se((O=U.position)==null?void 0:O.getValue())))continue;const Y=((N=this.pointFeatures[this.featureArrName][z])==null?void 0:N.coordinates)??((_=this.pointFeatures[this.featureArrName][z])==null?void 0:_.geometry.coordinates),q=((E=this.pointFeatures[this.featureArrName][z])==null?void 0:E.name)??((D=this.pointFeatures[this.featureArrName][z].properties)==null?void 0:D.name)??(z+1).toString(),X={index:z,name:q,position:Y},Q=r.addImage(e.id,e.typeName,B,X),j=r.addLabel(e.id,e.typeName,L,X);w.id=Q.id,w.layer=Q.layer,w.screenObjectIds.push(Q.screenObjectId),y.id=j.id,y.layer=j.layer,y.screenObjectIds.push(j.screenObjectId)}};C();const S=u.ad(a.createNextAnimateFrameEvent(e.showChanged,e.styleChanged,e.heightReferenceChanged,p.changed));u.ad(S.don(C))}return u}))})()}get dataSource(){return this._dataSource.value}set dataSource(e){this._dataSource.value=e}get dataSourceChanged(){return this._dataSource.changed}get pointFeatures(){return this._pointFeatures.value}set pointFeatures(e){this._pointFeatures.value=e}get pointFeaturesChanged(){return this._pointFeatures.changed}getClusterStyle(e,n){return e.find(o=>{if(o.value!==void 0)return o.value===n;const s=o.minValue!==void 0?o.minValue<=n:!0,r=o.maxValue!==void 0?o.maxValue>=n:!0;return s&&r})}};m(Me,"type",Me.register("ESCesiumViewer",a.ESEntityCluster.type,Me)),m(Me,"scaleFactor",.6),m(Me,"scaleByDistance",new h.NearFarScalar(100,1,1e3,1)),m(Me,"clusterImages"),m(Me,"clusterImageAttribute"),m(Me,"clusterImageUrl",a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPoi2D/clusterSpirit.png"));let Hp=Me;const xl=class xl extends jt{constructor(i,e){if(super(i,e),!e.viewer){console.warn("viewer is undefined!");return}}flyTo(i,e){const{sceneObject:n,czmViewer:o}=this;return o.actived?n.flyToParam||n.flyInParam?super.flyTo(i,e):(n.esImageryLayer.flyTo(i&&i),n.flyOverEvent.emit(e,"over",o),!0):!1}flyIn(i,e){const{sceneObject:n,czmViewer:o}=this;return o.actived?n.flyInParam?super.flyIn(i,e):(n.esImageryLayer.flyTo(i&&i),n.flyOverEvent.emit(e,"over",o),!0):!1}};m(xl,"type",xl.register("ESCesiumViewer",gh.type,xl));let $p=xl;const Al=class Al extends Yt{constructor(e,n){super(e,n);m(this,"geoPolyline");m(this,"czmWater");if(!n.viewer){console.warn("viewer is undefined!");return}if(!et(n.viewer))return;this.geoPolyline=this.dv(new Se(n,e.id)),this.czmWater=this.dv(new fo(n,e.id));const{geoPolyline:r,czmWater:l}=this;this.d(a.track([l,"allowPicking"],[e,"allowPicking"])),this.d(a.track([l,"ground"],[e,"fillGround"])),this.d(a.track([r,"allowPicking"],[e,"allowPicking"])),this.d(a.track([r,"color"],[e,"strokeColor"])),this.d(a.track([r,"width"],[e,"strokeWidth"])),this.d(a.track([r,"ground"],[e,"strokeGround"]));{const c=this.dv(a.createNextAnimateFrameEvent(e.waterColorChanged,e.waterImageChanged,e.frequencyChanged,e.waveVelocityChanged,e.amplitudeChanged,e.specularIntensityChanged,e.waterTypeChanged,e.flowDirectionChanged,e.flowSpeedChanged)),u=()=>{if(e.waterType==="custom")this.updateWater({waterColor:e.waterColor??a.ESGeoWater.defaults.waterColor,frequency:(e.frequency??a.ESGeoWater.defaults.frequency)/10,waveVelocity:(e.waveVelocity??a.ESGeoWater.defaults.waveVelocity)/100,amplitude:(e.amplitude??a.ESGeoWater.defaults.amplitude)*100,specularIntensity:e.specularIntensity??a.ESGeoWater.defaults.specularIntensity,flowDirection:e.flowDirection??a.ESGeoWater.defaults.flowDirection,flowSpeed:e.flowSpeed??a.ESGeoWater.defaults.flowSpeed,waterImage:e.waterImage??a.ESGeoWater.defaults.waterImage});else{const d=Object.assign({},Ec[e.waterType]);d.frequency&&(d.frequency/=10),d.waveVelocity&&(d.waveVelocity/=100),d.amplitude&&(d.amplitude*=100),this.updateWater(d)}};u(),this.d(c.don(u))}{const c=()=>{r.show=!!(e.show&&e.stroked)},u=this.disposeVar(a.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged));this.d(u.don(c)),c()}{const c=()=>{l.show=e.show&&e.filled},u=this.disposeVar(a.createNextAnimateFrameEvent(e.showChanged,e.filledChanged));this.d(u.don(c)),c()}{const c=()=>{e.points&&e.points.length>=3?(r.positions=[...e.points,e.points[0]],l.points=[...e.points]):(r.positions=e.points&&e.points.length>=2?[...e.points,e.points[0]]:[],l.points=[])};c();const u=this.dv(a.createNextAnimateFrameEvent(e.pointsChanged));this.d(u.don(c))}this.ad(e.editingChanged.don(c=>{l.updateBoundingSphere(c)}))}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):o.points?(oe(s,o,n,o.points,e),!0):!1:!1}updateWater(e){const{czmWater:n}=this;e.waterColor&&n.waterColor!=e.waterColor&&(n.waterColor=e.waterColor),e.specularIntensity!=null&&n.specularIntensity!=e.specularIntensity&&(n.specularIntensity=e.specularIntensity),e.frequency!=null&&n.frequency!=e.frequency&&(n.frequency=e.frequency),e.waveVelocity!=null&&n.animationSpeed!=e.waveVelocity&&(n.animationSpeed=e.waveVelocity),e.amplitude!=null&&n.amplitude!=e.amplitude&&(n.amplitude=e.amplitude),e.flowSpeed!=null&&n.flowSpeed!=e.flowSpeed&&(n.flowSpeed=e.flowSpeed),n.baseWaterImage=e.waterImage,n.stRotation=e.flowDirection}};m(Al,"type",Al.register("ESCesiumViewer",a.ESGeoWater.type,Al));let qp=Al;function DT(t){let i,e;if(Reflect.has(t,"type")&&t.type==="symbol"&&Reflect.has(t,"layout")){const n=t.layout;if(Reflect.has(n,"icon-image")){e={},e.image=n["icon-image"];const{horizontalOrigin:o,verticalOrigin:s}=qy(n["icon-anchor"]??"center");if(e.horizontalOrigin=o,e.verticalOrigin=s,Reflect.has(t,"paint")){const r=t.paint;e.color=h.Color.fromCssColorString(r["icon-color"]??"#FF0000").withAlpha(r["icon-opacity"]??1)}e.rotation=h.Math.toRadians(n["icon-rotate"]??0),e.scale=n["icon-size"]??1,e.show=(n.visibility??"visible")==="visible"}if(Reflect.has(n,"text-field")){i={},i.text=n["text-field"];const{horizontalOrigin:o,verticalOrigin:s}=qy(n["text-anchor"]??"center");if(i.horizontalOrigin=o,i.verticalOrigin=s,Reflect.has(t,"paint")){const r=t.paint;i.fillColor=h.Color.fromCssColorString(r["text-color"]??"#FFFFFF").withAlpha(r["text-opacity"]??1)}i.font=`${n["text-size"]??16}px ${n["text-font"]??"sans-serif"}`,i.show=(n.visibility??"visible")==="visible"}}return{labelStyle:i,billboardStyle:e}}function qy(t){let i=h.HorizontalOrigin.CENTER,e=h.VerticalOrigin.CENTER;switch(t){case"center":break;case"left":i=h.HorizontalOrigin.LEFT;break;case"right":i=h.HorizontalOrigin.RIGHT;break;case"top":e=h.VerticalOrigin.TOP;break;case"bottom":e=h.VerticalOrigin.BOTTOM;break;case"top-left":i=h.HorizontalOrigin.LEFT,e=h.VerticalOrigin.TOP;break;case"top-right":i=h.HorizontalOrigin.RIGHT,e=h.VerticalOrigin.TOP;break;case"bottom-left":i=h.HorizontalOrigin.LEFT,e=h.VerticalOrigin.BOTTOM;break;case"bottom-right":i=h.HorizontalOrigin.RIGHT,e=h.VerticalOrigin.BOTTOM;break}return{horizontalOrigin:i,verticalOrigin:e}}class RT extends a.Destroyable{constructor(e,n){super();m(this,"czmViewer");m(this,"czmESMVTLayer");m(this,"screenManager");m(this,"cacheSize",100);m(this,"urlMap",new Map);m(this,"tileScheme","xyz");m(this,"minimumLevel",0);m(this,"maximumLevel",18);m(this,"_cache",new Map);m(this,"lastTiles",new Map);this.czmViewer=e,this.czmESMVTLayer=n;const o=this.czmViewer.viewer;if(!o)return;const s=et(o);if(!s)return;this.screenManager=s.screenManager,this.tileScheme=n.sceneObject.scheme??"xyz",this.maximumLevel=n.sceneObject.maximumLevel,this.minimumLevel=n.sceneObject.minimumLevel,(()=>{do{if(!n.mvtLayerJson)break;if(typeof n.mvtLayerJson.mainJson=="string"){this.urlMap.set("customSource",[n.mvtLayerJson.mainJson]);break}if(typeof n.mvtLayerJson.mainJson=="object"){const l=n.mvtLayerJson.mainJson.sources;for(const c in l){const u=l[c];u.type==="vector"&&Reflect.has(u,"tiles")&&this.urlMap.set(c,u.tiles)}break}}while(!1)})(),this.ad(()=>{var c;const l=this.lastTiles.values().next().value;l&&((c=this.screenManager)==null||c.remove(l.layer,l==null?void 0:l.id,Object.values(l.featureTable).flat())),this.cache&&(this.cache.clear(),this.cache=null)})}get cache(){return this._cache}set cache(e){this._cache=e}addTiles(e){var r;if(this.urlMap.size==0)return;if(this.cache&&this.cache.has(e)&&this.lastTiles.has(e)){this.updateTiles([e],"show");return}const[n,o,s]=e.split("-").map(Number);(r=this.cache)==null||r.set(e,new Map),this.requestImage(o,s,n,e)}updateTiles(e,n="hide"){var o,s;for(let r=0;r<e.length;r++){const l=e[r],c=this.lastTiles.get(l);if(c){const u=Object.keys(c.featureTable);for(let d=0;d<u.length;d++){const p=u[d],f=c.featureTable[p];n=="delete"?(o=this.screenManager)==null||o.remove(c.layer,c.id,f):(s=this.screenManager)==null||s.update(c.layer,c.id,f,{all:{show:n=="show"}})}}n=="delete"&&this.lastTiles.delete(l)}}update(e){const n=Array.from(this.lastTiles.keys()),o=n.filter(l=>!e.includes(l)),s=n.filter(l=>e.includes(l)),r=e.filter(l=>!n.includes(l));this.updateTiles(o),this.updateTiles(s,"show");for(let l=0;l<r.length;l++){const c=r[l];this.addTiles(c)}this.clearCache()}requestImage(e,n,o,s){const r=this.tileScheme=="tms"?Math.pow(2,o)-n-1:n;this.urlMap.size!=0&&this.urlMap.entries().forEach(([l,c])=>{if(c.length!=0&&c[0].includes("{z}")){const u=c[0].replace(/{z}/g,o.toString()).replace(/{x}/g,e.toString()).replace(/{y}/g,r.toString());fetch(u).then(d=>{var p,f;if(d.ok&&((p=this.cache)!=null&&p.has(s))&&((f=this.cache.get(s))==null?void 0:f.size)==0)return d.arrayBuffer()}).then(d=>{var v,y,w;const p=new g_(d),f=new m_.VectorTile(p),g=new Map;for(const P in f.layers){const C=f.layers[P];if(C.length<=0||C.feature(0).type!==1)continue;const S=[];for(let x=0;x<C.length;x++){const A=C.feature(x);S.push(A.toGeoJSON(e,n,o))}g.set(P,S)}(v=this.cache)!=null&&v.has(s)&&((y=this.cache.get(s))==null?void 0:y.size)==0&&((w=this.cache)==null||w.set(s,g),this.addScreenManage(s,g))})}})}clearCache(){if(!this.cache)return;const e=this.cache.size-this.cacheSize;if(!(e<=0))for(let n=0;n<e;n++){const o=this.cache.keys().next().value;o&&(this.updateTiles([o],"delete"),this.cache.delete(o))}}addScreenManage(e,n){this.lastTiles.set(e,{layer:"default",id:this.czmESMVTLayer.sceneObject.id,featureTable:{}});const o=this.lastTiles.get(e);for(const[s,r]of n.entries()){const l=this.czmESMVTLayer.mvtLayerJson.pointJson.find(c=>c["source-layer"]==s)??{};for(const c of r){const{labelStyle:u,billboardStyle:d}=DT(l);let p,f;u&&(p=this.screenManager.addLabel(this.czmESMVTLayer.sceneObject.id,"default",u??{},{position:c.geometry.coordinates,name:c.properties.NAME??c.properties.name,index:c.id})),d&&(f=this.screenManager.addImage(this.czmESMVTLayer.sceneObject.id,"default",d??{},{position:c.geometry.coordinates,name:c.properties.NAME??c.properties.name,index:c.id})),o.featureTable[s]||(o.featureTable[s]=[]),p&&o.featureTable[s].push(p.screenObjectId),f&&o.featureTable[s].push(f.screenObjectId)}}}reset(){if(!this.cache)return;const e=Array.from(this.cache.keys());this.update([]),setTimeout(()=>{this.update(e)})}}class FT extends a.Destroyable{constructor(e,n){super();m(this,"vectorTilesCache");m(this,"czmViewer");m(this,"czmESMVTLayer");this.czmViewer=e,this.czmESMVTLayer=n,this.vectorTilesCache=this.ad(new RT(e,n)),this.updateTiles();const o=this.czmViewer.viewer.scene.globe._surface.tileLoadProgressEvent.addEventListener(s=>{s==0&&this.updateTiles()});this.ad(()=>{o()})}updateTiles(){const e=this.czmViewer.viewer;if(!e)return;const n=new Set;for(let o=0;o<e.scene.globe._surface._tilesToRender.length;o++){const s=e.scene.globe._surface._tilesToRender[o];if(s.data)for(let r=0;r<s.data.imagery.length;r++){const l=s.data.imagery[r],c=l.loadingImagery??l.readyImagery;if(c){const u=`${c.level}-${c.x}-${c.y}`;n.add(u)}}}this.vectorTilesCache.update(Array.from(n))}}const Tl=class Tl extends jt{constructor(e,n){super(e,n);m(this,"_czmImagery");m(this,"_mvtLayerJson",this.disposeVar(a.reactJson({mainJson:"",pointJson:[],otherJson:[]})));m(this,"mvtLayerJsonChanged",this.ad(new a.Event));if(this._czmImagery=this.dv(new Ln(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmImagery;this.d(a.track([s,"show"],[e,"show"])),this.d(a.track([s,"zIndex"],[e,"zIndex"])),this.d(a.track([s,"rectangle"],[e,"rectangle"])),this.d(a.track([s,"alpha"],[e,"opacity"])),this.d(a.track([s,"splitDirection"],[e,"splitDirection"])),this.d(a.track([s,"brightness"],[e,"czmBrightness"])),this.d(a.track([s,"contrast"],[e,"czmContrast"])),this.d(a.track([s,"hue"],[e,"czmHue"])),this.d(a.track([s,"saturation"],[e,"czmSaturation"])),this.d(a.track([s,"gamma"],[e,"czmGamma"]));{const l=this.dv(a.createNextAnimateFrameEvent(e.accessTokenChanged,e.maximumLevelChanged,e.minimumLevelChanged,e.tileSizeChanged,e.allowPickingChanged,e.rectangleChanged,e.schemeChanged,this.mvtLayerJsonChanged)),c=()=>{!this.mvtLayerJson||this.mvtLayerJson.otherJson.length==0||(s.imageryProvider={type:"MVTImageryProvider",url:this.mvtLayerJson.mainJson,accessToken:e.accessToken,maximumLevel:e.maximumLevel,minimumLevel:e.minimumLevel,tileSize:e.tileSize,enablePickFeatures:e.allowPicking,rectangle:e.rectangle,style:this.mvtLayerJson.otherJson,scheme:e.scheme})};c(),this.d(l.don(c))}{const l=d=>{const p=structuredClone(d);Reflect.deleteProperty(p,"layers"),this.mvtLayerJson={mainJson:p,pointJson:d.layers.filter(f=>f.type=="symbol"),otherJson:d.layers.filter(f=>f.type!="symbol")}},c=async()=>{var d;if(typeof e.url=="string")if(e.url.includes("{z}"))this.mvtLayerJson.mainJson=e.url;else{const p=await fetch(e.url);if((d=p.headers.get("Content-Type"))!=null&&d.includes("json")){const f=await p.json();l(f)}}else l(e.url);e.style&&e.style.length!=0&&(this.mvtLayerJson.pointJson=e.style.filter(p=>p.type=="symbol"),this.mvtLayerJson.otherJson=e.style.filter(p=>p.type!="symbol")),this.mvtLayerJsonChanged.emit()};c();const u=this.ad(a.createNextAnimateFrameEvent(e.urlChanged,e.styleChanged));this.ad(u.don(c))}const r=this.ad(a.createNextAnimateFrameEvent(e.schemeChanged,e.maximumLevelChanged,e.minimumLevelChanged,this.mvtLayerJsonChanged));this.ad(new a.ObjResettingWithEvent(r,()=>new FT(n,this)))}get czmImagery(){return this._czmImagery}get mvtLayerJson(){return this._mvtLayerJson.value}set mvtLayerJson(e){this._mvtLayerJson.value=e}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmImagery:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r.flyTo(e&&e),o.flyOverEvent.emit(n,"over",s),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmImagery:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):(r.flyTo(e&&e),o.flyOverEvent.emit(n,"over",s),!0):!1}};m(Tl,"type",Tl.register("ESCesiumViewer",fh.type,Tl));let Xp=Tl;class zT extends a.Destroyable{constructor(i,e){super(),this._czmESPipeFence=i,this._sceneObject=e;const n=this._sceneObject,o=this._czmESPipeFence,s=o.czmCustomPrimitive;if(!n.points||n.points.length<2){this.clear(s);return}const r=n.points.length;let l=[],c=[],u=[],d=[],p=[];for(let P=0;P<r-1;P++){const{outlinePionts:C,customPrimitivePoints:S}=this.divideFourPoints(n.points[P],n.points[P+1]);d.push(...S),p.push(...C),u.push(...this.setIndexs(P))}const[f,g,v]=Dt({originPosition:d[0]},d),y=this.setFaces(f);l.push(...y.flat());const w=this.setTextureCoordinates(n,o);c.push(...w.flat()),o.computeBoundingBox(),this.updateCustomPrimitive(s,g,l,u,c)}divideFourPoints(i,e){const n=a.geoHeading(i,e),o=a.geoDestination(i,this._sceneObject.width/2,90+n),s=a.geoDestination(i,this._sceneObject.width/2,n-90),r=a.geoDestination(e,this._sceneObject.width/2,n-90),l=a.geoDestination(e,this._sceneObject.width/2,90+n),c=[o[0],o[1],o[2]+this._sceneObject.height/2],u=[o[0],o[1],o[2]-this._sceneObject.height/2],d=[s[0],s[1],s[2]+this._sceneObject.height/2],p=[s[0],s[1],s[2]-this._sceneObject.height/2],f=[l[0],l[1],l[2]+this._sceneObject.height/2],g=[l[0],l[1],l[2]-this._sceneObject.height/2],v=[r[0],r[1],r[2]+this._sceneObject.height/2],y=[r[0],r[1],r[2]-this._sceneObject.height/2],w=[[c,d],[c,f],[c,u],[u,g]],P=[[u,p],[d,v],[d,p],[p,y]],C=[[f,g],[f,v],[g,y],[v,y]];return{outlinePionts:[...w,...P,...C],customPrimitivePoints:[u,c,d,p,g,f,v,y]}}setIndexs(i){const e=i*16;return[e+1,e+0,e+3,e+1,e+3,e+2,e+5,e+4,e+7,e+6,e+5,e+7,e+9,e+8,e+11,e+9,e+11,e+10,e+13,e+12,e+15,e+13,e+15,e+14]}setFaces(i){const e=[],n=i.length/8;for(let s=0;s<n;s++){const r=i.slice(8*s,8*(s+1));e.push(r)}return[...e.map(s=>[s[4],s[5],s[1],s[0],s[5],s[6],s[2],s[1],s[6],s[7],s[3],s[2],s[7],s[4],s[0],s[3]]).flat()]}getDistances(i,e){const[n]=Dt({originPosition:i[0]},i),o=n.length,s=n.reduce((c,u,d,p)=>{if(d===0)return c.push(0),c;const f=d-1,g=p[f],v=Math.sqrt((g[0]-u[0])*(g[0]-u[0])+(g[1]-u[1])*(g[1]-u[1]));return c.push(c[f]+v),c},[]),r=s[o-1];return e.distances=r,s.map(c=>c/r)}setTextureCoordinates(i,e){if(!i.points||i.points.length<2)return;const n=this.getDistances(i.points,e),o=[];for(let s=1;s<n.length;s++){let r=[];if(s===n.length-1){const l=[1,0,1,1,n[s-1],1,n[s-1],0];r=[...l,...l,...l,...l]}else{const l=[n[s],0,n[s],1,n[s-1],1,n[s-1],0];r=[...l,...l,...l,...l]}o.push(r)}return o}updateCustomPrimitive(i,e,n,o,s){i.modelMatrix=e,i.indexTypedArray=new Uint16Array(o),i.attributes={position:{typedArray:new Float32Array(n),componentsPerAttribute:3},a_st:{typedArray:new Float32Array(s),componentsPerAttribute:2}}}clear(i){i.indexTypedArray=void 0,i.modelMatrix=void 0,i.attributes=void 0}}const Ml=class Ml extends yt{constructor(e,n){super(e,n);m(this,"_line",this.dv(new Se(this.czmViewer,this.sceneObject.id)));m(this,"_czmTexture",this.ad(new Be(this.czmViewer,this.sceneObject.id)));m(this,"_czmCustomPrimitive",this.dv(new ze(this.czmViewer,this.sceneObject.id)));m(this,"_distances",this.dv(a.react(0)));if(!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmTexture,r=this._line;this.d(a.bind([r,"positions"],[e,"points"])),this.d(a.track([this.line,"allowPicking"],[e,"allowPicking"])),this.d(a.track([this.line,"color"],[e,"strokeColor"])),this.d(a.track([this.line,"width"],[e,"strokeWidth"])),this.d(a.track([this.line,"ground"],[e,"strokeGround"]));{const d=this.dv(a.createNextAnimateFrameEvent(this.sceneObject.pointsChanged,this.sceneObject.strokeWidthChanged,this.sceneObject.strokeColorChanged,this.sceneObject.heightChanged,this.sceneObject.widthChanged,this.sceneObject.fillColorChanged));this.dv(new a.ObjResettingWithEvent(d,()=>new zT(this,this.sceneObject)))}{const d=()=>{r.show=e.show&&e.stroked};d();const p=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged));this.d(p.don(d))}this.bindCustomPrimitive(e);let l="";const c=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/path/singleArrow.png"),u=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/path/multipleArrows.png");{const d=()=>{e.materialMode==="multipleArrows"||e.materialMode==="blue"?l=u:e.materialMode==="color"?l="":l=c,s.uri=l,l==""?(this._czmCustomPrimitive.uniformMap={u_color:e.fillColor},this._czmCustomPrimitive.fragmentShaderSource=` uniform vec4 u_color;
|
|
1746
|
+
`};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(this.heightChanged,this.positionsChanged));this.dispose(l.disposableOn(r))}this.dispose(this.flyToEvent.disposableOn(r=>{this.czmCustomPrimitive.flyTo(r)}));{const r=()=>{const c=s.value?s.value:1,u=this.height??un.defaults.height,{textureSizeInMeters:d=un.defaults.textureSizeInMeters}=this,{textureUri:p=un.defaults.textureUri}=this;o.uniformMap={u_image:{type:"image",uri:p},u_stScale:[c/d[0],u/d[1]],u_speed:this.textureMoveSpeed??un.defaults.textureMoveSpeed,u_color:this.textureColor??un.defaults.textureColor}};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(this.textureColorChanged,this.textureMoveSpeedChanged,this.textureSizeInMetersChanged,this.heightChanged,this.textureSizeInMetersChanged,this.textureUriChanged,s.changed));this.dispose(l.disposableOn(r))}}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get czmCustomPrimitive(){return this._czmCustomPrimitive}get geoBoundingSphere(){return this._geoBoundingSphere.value}get geoBoundingSphereChanged(){return this._geoBoundingSphere.changed}};m(un,"defaults",{show:!0,allowPicking:!1,positions:[],height:1e3,textureSizeInMeters:[500,500],textureUri:"${earthsdk3-assets-script-dir}/assets/img/location.png",textureMoveSpeed:[0,.3],textureColor:[1,1,1,1]});let Io=un;(t=>{t.createDefaultProps=()=>({show:void 0,allowPicking:void 0,positions:a.reactPositions(void 0),height:void 0,textureSizeInMeters:a.reactArrayWithUndefined(void 0),textureUri:void 0,textureMoveSpeed:a.reactArrayWithUndefined(void 0),textureColor:a.reactArrayWithUndefined(void 0)})})(Io||(Io={})),a.extendClassProps(Io.prototype,Io.createDefaultProps);const Cl=class Cl extends yt{constructor(e,n){super(e,n);m(this,"_czmPolygonFence");m(this,"_czmPolygon");if(this._czmPolygonFence=this.disposeVar(new Io(n,e.id)),this._czmPolygon=this.dv(new a.ESGeoPolygon),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmPolygonFence,r=this._czmPolygon;n.add(r),this.dispose(()=>n.delete(r)),r.filled=!1,this.d(a.track([r,"points"],[e,"points"])),this.d(a.track([r,"stroked"],[e,"stroked"])),this.d(a.track([r,"strokeColor"],[e,"strokeColor"])),this.d(a.track([r,"strokeWidth"],[e,"strokeWidth"])),this.d(a.track([r,"strokeGround"],[e,"strokeGround"]));{const l={danger:{color:[.99,.98,.57,1],image:"01.png"},checkerboard:{color:[.88,.98,.99,1],image:"02.png"},warning:{color:[1,.93,.58,1],image:"03.png"},cord:{color:[.91,.87,.56,1],image:"04.png"},scanline:{color:[.43,.78,.8,1],image:"05.png"},honeycomb:{color:[.28,.84,.86,1],image:"06.png"},gradientColor:{color:[1,1,1,1],image:"07.png"}},c=(f,g)=>{switch(f){case"danger":return{textureMoveSpeed:[.05,0],textureSizeInMeters:[2,2]};case"checkerboard":return{textureMoveSpeed:[0,0],textureSizeInMeters:[2,2]};case"warning":return{textureMoveSpeed:[-.05,0],textureSizeInMeters:[2,2]};case"cord":return{textureMoveSpeed:[-.05,0],textureSizeInMeters:[2,2]};case"scanline":return{textureMoveSpeed:[0,0],textureSizeInMeters:[g,g]};case"honeycomb":return{textureMoveSpeed:[0,0],textureSizeInMeters:[g,g]};case"gradientColor":return{textureMoveSpeed:[0,0],textureSizeInMeters:[g,g]};default:return{textureMoveSpeed:[0,0],textureSizeInMeters:[g*.5,2]}}},u="${earthsdk3-assets-script-dir}/assets/img/fence/",d=()=>{const f=e.materialMode,g=l[f];if(!g)return;s.textureUri=u+g.image,s.textureColor=f!=="gradientColor"?g.color:e.fillColor;const{textureMoveSpeed:v,textureSizeInMeters:y}=c(f,e.height);s.textureMoveSpeed=v,s.textureSizeInMeters=y};d();const p=this.disposeVar(a.createNextAnimateFrameEvent(e.materialModeChanged,e.heightChanged,e.fillColorChanged));this.dispose(p.disposableOn(d))}{this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),this.dispose(a.bind([s,"positions"],[e,"points"])),this.dispose(a.track([s,"height"],[e,"height"]));{const l=()=>{s.show=e.show&&e.filled};l();const c=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.filledChanged));this.dispose(c.don(l))}}}get czmPolygonFence(){return this._czmPolygonFence}get czmPolygon(){return this._czmPolygon}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmPolygonFence:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(Rt(s,o,n,e,r.czmCustomPrimitive),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmPolygonFence:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):(Rt(s,o,n,e,r.czmCustomPrimitive),!0):!1}};m(Cl,"type",Cl.register("ESCesiumViewer",a.ESPolygonFence.type,Cl));let Np=Cl;const _l=class _l extends yt{constructor(e,n){super(e,n);m(this,"_czmESRectangle");if(this._czmESRectangle=this.disposeVar(new Si(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmESRectangle;this.dispose(a.bind([s,"show"],[e,"show"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),this.dispose(a.track([s,"ground"],[e,"fillGround"])),this.dispose(a.track([s,"strokeGround"],[e,"strokeGround"])),this.dispose(a.track([s,"outlineTranslucent"],[e,"outlineTranslucent"])),this.dispose(a.bind([s,"height"],[e,"height"])),this.dispose(a.bind([s,"extrudedHeight"],[e,"extrudedHeight"])),this.dispose(a.bind([s,"rectangle"],[e,"rectangle"])),this.dispose(a.bind([s,"stRotation"],[e,"stRotation"])),this.dispose(a.bind([s,"rotation"],[e,"rotation"])),this.dispose(a.track([s,"outline"],[e,"stroked"])),this.dispose(a.track([s,"outlineColor"],[e,"strokeColor"]));{const r=()=>{const l=e.points;if(l&&l.length>=2){const{minPos:c,maxPos:u}=a.getMinMaxCorner(l);s.rectangle=[c[0],c[1],u[0],u[1]],s.height=l[1][2],s.extrudedHeight=l[0][2]}else s.rectangle=void 0,s.height=0,s.extrudedHeight=0};r(),this.dispose(e.pointsChanged.disposableOn(()=>r()))}{const r=()=>{e.filled?s.material={type:"Color",color:e.fillColor}:s.material={type:"Color",color:[1,1,1,0]}};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(l.disposableOn(r))}}get czmESRectangle(){return this._czmESRectangle}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmESRectangle:r}=this;if(!s.actived)return!1;if(o.flyToParam||o.flyInParam)return super.flyTo(e,n);if(r.rectangle){const l=[[r.rectangle[0],r.rectangle[1],r.height],[r.rectangle[2],r.rectangle[3],r.height],[r.rectangle[0],r.rectangle[1],r.extrudedHeight],[r.rectangle[2],r.rectangle[3],r.extrudedHeight]];return oe(s,o,n,l,e),!0}return!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmESRectangle:r}=this;if(!s.actived)return!1;if(o.flyInParam)return super.flyIn(e,n);if(r.rectangle){const l=[[r.rectangle[0],r.rectangle[1],r.height],[r.rectangle[2],r.rectangle[3],r.height],[r.rectangle[0],r.rectangle[1],r.extrudedHeight],[r.rectangle[2],r.rectangle[3],r.extrudedHeight]];return oe(s,o,n,l,e),!0}return!1}};m(_l,"type",_l.register("ESCesiumViewer",a.ESRectangle.type,_l));let Bp=_l;const Zn=class Zn extends a.Destroyable{constructor(e,n){super();m(this,"_flyToEvent",this.disposeVar(new a.Event));const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}const s=a.ESSceneObject.context.createEnvStrReact([this,"imageUrl"],Zn.defaults.imageUrl),r=this.disposeVar(a.react(void 0)),l=()=>{const C=h.Material.fromType(h.Material.ImageType);C.uniforms.image=s.value,C.uniforms.repeat=Pe(this.repeat??Zn.defaults.repeat),r.value=C};l();const c=this.disposeVar(a.createNextAnimateFrameEvent(s.changed,this.repeatChanged));this.dispose(c.disposableOn(l));const u=(C,S)=>{const x=new h.PolylineMaterialAppearance({material:S,renderState:{depthTest:{enabled:!1}}});x.renderState.depthMask=!1;const A=[];if(C.length<2)return;A.push(new h.GeometryInstance({geometry:new h.GroundPolylineGeometry({positions:C,width:this.width??Zn.defaults.width,vertexFormat:h.PolylineMaterialAppearance.VERTEX_FORMAT,arcType:h.ArcType[this.arcType??Zn.defaults.arcType]}),id:this}));const R=new Ti({geometryInstances:A,appearance:x,asynchronous:!1,allowPicking:this.allowPicking??Zn.defaults.allowPicking,compressVertices:!1});return R.ESSceneObjectID=n,R};let d;const p=new h.BoundingSphere,f=()=>{d&&(o.scene.primitives.remove(d),d=void 0)};this.dispose(f);const g=()=>{if(f(),!this.positions)return;const C=pt(this.positions);if(C.length<2||!r.value){p.radius=-1;return}h.BoundingSphere.fromPoints(C,p),d=u(C,r.value),d&&o.scene.primitives.add(d)},v=()=>{d&&(d.show=this.show??!0)};this.dispose(this.flyToEvent.disposableOn(C=>{if(e.actived&&p.radius>0){const S=se(p.center);S&&ne(o,S,p.radius*4,void 0,C)}})),g(),v();const y=this.disposeVar(a.createNextAnimateFrameEvent(this.positionsChanged,this.widthChanged,r.changed,this.arcTypeChanged,this.allowPickingChanged));this.dispose(y.disposableOn(()=>{g(),v()}));const w=this.disposeVar(a.createNextAnimateFrameEvent(this.showChanged));this.dispose(w.disposableOn(()=>{v()}));const{extensions:P}=e;if(!P){console.warn("!extensions");return}}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}};m(Zn,"defaults",{show:!0,positions:[],width:50,arcType:"GEODESIC",imageUrl:"${earthsdk3-assets-script-dir}/assets/img/roads/4.jpg",repeat:[100,1],allowPicking:!1});let Do=Zn;(t=>{t.createDefaultProps=()=>({show:void 0,positions:a.reactPositions(void 0),width:void 0,arcType:void 0,imageUrl:void 0,repeat:void 0,allowPicking:void 0})})(Do||(Do={})),a.extendClassProps(Do.prototype,Do.createDefaultProps);const Pl=class Pl extends yt{constructor(e,n){super(e,n);m(this,"_czmESRoad");if(this._czmESRoad=this.disposeVar(new Do(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmESRoad;{const r=()=>{s.show=e.show&&e.stroked};r();const l=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged));this.dispose(l.don(r))}this.dispose(a.bind([s,"positions"],[e,"points"])),this.dispose(a.track([s,"width"],[e,"width"])),this.dispose(a.track([s,"arcType"],[e,"arcType"])),this.dispose(a.track([s,"imageUrl"],[e,"imageUrl"])),this.dispose(a.track([s,"repeat"],[e,"repeat"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"]))}get czmESRoad(){return this._czmESRoad}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmESRoad:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmESRoad:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}};m(Pl,"type",Pl.register("ESCesiumViewer",Ch.type,Pl));let Vp=Pl;const bl=class bl extends a.EngineObject{constructor(e,n){super(e,n);m(this,"_customDiv");if(this._customDiv=this.disposeVar(new a.ESCustomDiv(e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._customDiv;n.add(s),this.dispose(()=>n.delete(s)),s.instanceClass=class extends a.Destroyable{constructor(l,c,u){super(),this._subContainer=l;const d=document.createElement("div");this._subContainer.appendChild(d),this.dispose(()=>this._subContainer.removeChild(d));{const y=()=>{d.style.display=e.show??a.ESScale.defaults.show?"block":"none"};y(),e.dispose(e.showChanged.disposableOn(y))}d.style.position="fixed",d.style.width="125px",d.style.height="30px",d.style.border="1px solid rgba(49,50,56,.8)",d.style.padding="0 5px",d.style.backgroundColor="rgba(37,38,42,.8)",d.style.borderRadius="15px",d.style.pointerEvents="auto",d.style.transition=" right 0.4s linear";{const y=()=>{d.style.bottom=`${e.cssPosition?e.cssPosition[0]:a.ESScale.defaults.cssPosition[0]}px`,e.screenPosition==="left"?(d.style.right="auto",d.style.left=`${e.cssPosition?e.cssPosition[1]:a.ESScale.defaults.cssPosition[1]}px`):(d.style.left="auto",d.style.right=`${e.cssPosition?e.cssPosition[1]:a.ESScale.defaults.cssPosition[1]}px`)},w=this.disposeVar(a.createNextAnimateFrameEvent(e.cssPositionChanged,e.screenPositionChanged));y(),this.dispose(w.disposableOn(()=>y()))}const p=document.createElement("div");d.appendChild(p),this.dispose(()=>d.removeChild(p)),p.style.width="125px",p.style.display="inline-block",p.style.textAlign="center",p.style.fontSize="14px",p.style.fontWeight="lighter",p.style.lineHeight="30px",p.style.color="#fff",p.innerHTML="1000km";const f=document.createElement("div");d.appendChild(f),this.dispose(()=>d.removeChild(f)),f.style.borderRight="1px solid #fff",f.style.borderLeft="1px solid #fff",f.style.borderBottom="1px solid #fff",f.style.position="absolute",f.style.height="10px",f.style.top="15px",f.style.width="75px",f.style.left=`${60/2}px`;const g=()=>{const y=n.viewerLegend.legend.computedLengthInMeters;if(e.show===!1||y&&y>1e6)d.style.display="none";else{d.style.display="block";const w=n.viewerLegend.legend.computedLengthInStr;w&&(p.innerHTML=w);const P=n.viewerLegend.legend.computedLengthInPixels;if(P){f.style.width=`${P}px`;const C=(135-P)/2;f.style.left=`${C}px`}}};g();const v=setInterval(()=>{g()},200);this.dispose(()=>clearInterval(v))}}}get customDiv(){return this._customDiv}};m(bl,"type",bl.register("ESCesiumViewer",a.ESScale.type,bl));let Up=bl;const Sl=class Sl extends me{constructor(e,n){super(e,n);m(this,"_czmCustomPrimitive");if(this._czmCustomPrimitive=this.disposeVar(new ze(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmCustomPrimitive;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),this.dispose(Je([s,"rotation"],[e,"rotation"])),this.dispose(a.track([s,"position"],[e,"position"])),this.dispose(a.track([s,"scale"],[e,"scale"])),this.dispose(a.track([s,"viewDistanceRange"],[e,"viewDistanceRange"])),this.dispose(a.track([s,"viewDistanceDebug"],[e,"viewDistanceDebug"])),this.dispose(a.track([s,"maximumScale"],[e,"maximumScale"])),this.dispose(a.track([s,"minimumScale"],[e,"minimumScale"])),this.dispose(a.track([s,"pixelSize"],[e,"pixelSize"])),this.dispose(a.track([s,"showSceneScale"],[e,"showSceneScale"])),this.dispose(a.track([s,"modelMatrix"],[e,"modelMatrix"])),this.dispose(a.track([s,"cull"],[e,"cull"])),this.dispose(a.track([s,"boundingVolume"],[e,"boundingVolume"])),this.dispose(a.track([s,"pass"],[e,"pass"])),this.dispose(a.track([s,"primitiveType"],[e,"primitiveType"])),this.dispose(a.track([s,"renderState"],[e,"renderState"])),this.dispose(a.track([s,"vertexShaderSource"],[e,"vertexShaderSource"])),this.dispose(a.track([s,"fragmentShaderSource"],[e,"fragmentShaderSource"])),this.dispose(a.track([s,"uniformMap"],[e,"uniformMap"])),this.dispose(a.track([s,"attributes"],[e,"attributes"])),this.dispose(a.track([s,"indexTypedArray"],[e,"indexTypedArray"])),this.dispose(a.track([s,"attributesJson"],[e,"attributesJson"])),this.dispose(a.track([s,"indexTypedArrayJson"],[e,"indexTypedArrayJson"])),this.dispose(a.track([s,"count"],[e,"count"])),this.dispose(a.track([s,"offset"],[e,"offset"])),this.dispose(a.track([s,"instanceCount"],[e,"instanceCount"])),this.dispose(a.track([s,"localPosition"],[e,"localPosition"])),this.dispose(a.track([s,"localScale"],[e,"localScale"])),this.dispose(a.track([s,"localModelMatrix"],[e,"localModelMatrix"])),this.dispose(a.track([s,"debugShowBoundingVolume"],[e,"debugShowBoundingVolume"])),this.dispose(a.track([s,"debugOverlappingFrustums"],[e,"debugOverlappingFrustums"])),this.dispose(a.track([s,"occlude"],[e,"occlude"])),this.dispose(a.track([s,"castShadows"],[e,"castShadows"])),this.dispose(a.track([s,"receiveShadows"],[e,"receiveShadows"])),this.dispose(a.track([s,"executeInClosestFrustum"],[e,"executeInClosestFrustum"])),this.dispose(a.track([s,"pickOnly"],[e,"pickOnly"])),this.dispose(a.track([s,"depthForTranslucentClassification"],[e,"depthForTranslucentClassification"]));{const r=()=>{if(e.localRotation){const l=[...e.localRotation];l[0]-=90,s.localRotation=l}else s.localRotation=[-90,0,0]};r(),this.dispose(e.localRotationChanged.disposableOn(r))}}get czmCustomPrimitive(){return this._czmCustomPrimitive}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmCustomPrimitive:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(Rt(s,o,n,e,r,!0),!0):!1}};m(Sl,"type",Sl.register("ESCesiumViewer",yh.type,Sl));let Wp=Sl;const El=class El extends dh{constructor(e,n){super(e,n);m(this,"czmGeoPolyline");m(this,"czmWater");if(!n.viewer){console.warn("viewer is undefined!");return}if(!et(n.viewer))return;this.czmGeoPolyline=this.dv(new Se(n,e.id)),this.czmWater=this.dv(new fo(n,e.id));const{czmGeoPolyline:r,czmWater:l}=this;this.d(a.track([l,"allowPicking"],[e,"allowPicking"])),this.d(a.track([l,"ground"],[e,"fillGround"])),this.d(a.track([r,"allowPicking"],[e,"allowPicking"])),this.d(a.track([r,"color"],[e,"strokeColor"])),this.d(a.track([r,"width"],[e,"strokeWidth"])),this.d(a.track([r,"ground"],[e,"strokeGround"]));{const c=this.dv(a.createNextAnimateFrameEvent(e.waterColorChanged,e.frequencyChanged,e.waveVelocityChanged,e.amplitudeChanged,e.specularIntensityChanged,e.waterTypeChanged,e.flowDirectionChanged,e.flowSpeedChanged)),u=()=>{if(e.waterType==="custom")this.updateWater({waterColor:e.waterColor??a.ESDynamicWater.defaults.waterColor,frequency:(e.frequency??a.ESDynamicWater.defaults.frequency)/10,waveVelocity:(e.waveVelocity??a.ESDynamicWater.defaults.waveVelocity)/100,amplitude:(e.amplitude??a.ESDynamicWater.defaults.amplitude)*100,specularIntensity:e.specularIntensity??a.ESDynamicWater.defaults.specularIntensity,flowDirection:e.flowDirection??a.ESDynamicWater.defaults.flowDirection,flowSpeed:e.flowSpeed??a.ESDynamicWater.defaults.flowSpeed});else{const d=Object.assign({},Ec[e.waterType]);d.frequency&&(d.frequency/=10),d.waveVelocity&&(d.waveVelocity/=100),d.amplitude&&(d.amplitude*=100),this.updateWater(d)}};u(),this.d(c.don(u))}{const c=()=>{r.show=e.show&&e.stroked},u=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged));this.d(u.don(c)),c()}{const c=()=>{l.show=!!(e.show&&e.filled)},u=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.filledChanged));this.d(u.don(c)),c()}{const c=()=>{if(!e.points||e.points&&e.points.length<=2){r.positions=[],l.points=[];return}if(e.scale&&e.scale.some(f=>f===0)){console.warn("缩放属性(scale)不能设置值为0");return}const d=e.points.map(f=>[f[0],f[1],0]),[p]=yn({originPosition:e.position,originRotation:e.rotation,originScale:e.scale,initialRotationMode:"XForwardZUp"},d);r.positions=[...p,p[0]],l.points=[...p]};c();const u=this.dv(a.createNextAnimateFrameEvent(e.pointsChanged,e.positionChanged,e.rotationChanged,e.scaleChanged));this.d(u.don(c))}}visibleDistance(e,n){var o;if((o=n.viewer)!=null&&o.camera&&e.show){const s=a.getDistancesFromPositions([e.position,Ht(n.viewer.camera)],"NONE")[0];let r=!1;e.minVisibleDistance<e.maxVisibleDistance?r=e.minVisibleDistance<s&&s<e.maxVisibleDistance:e.maxVisibleDistance==0&&(r=s>e.minVisibleDistance),this.czmGeoPolyline&&(this.czmGeoPolyline.show=e.show&&e.stroked&&r),this.czmWater&&(this.czmWater.show=e.show&&e.filled&&r)}}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmWater:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):r!=null&&r.points?(oe(s,o,n,r.points,e,!0),!0):!1:!1}updateWater(e){const{czmWater:n}=this;n&&(e.waterColor&&n.waterColor!=e.waterColor&&(n.waterColor=e.waterColor),e.specularIntensity!=null&&n.specularIntensity!=e.specularIntensity&&(n.specularIntensity=e.specularIntensity),e.frequency!=null&&n.frequency!=e.frequency&&(n.frequency=e.frequency),e.waveVelocity!=null&&n.animationSpeed!=e.waveVelocity&&(n.animationSpeed=e.waveVelocity),e.amplitude!=null&&n.amplitude!=e.amplitude&&(n.amplitude=e.amplitude),e.flowSpeed!=null&&n.flowSpeed!=e.flowSpeed&&(n.flowSpeed=e.flowSpeed),n.baseWaterImage=e.waterImage,n.stRotation=e.flowDirection)}};m(El,"type",El.register("ESCesiumViewer",a.ESDynamicWater.type,El));let Gp=El;const Me=class Me extends jt{constructor(e,n){super(e,n);m(this,"_dataSource",this.disposeVar(a.react(void 0)));m(this,"_pointFeatures",this.disposeVar(a.reactJsonWithUndefined(void 0)));m(this,"featureArrName","features");const o=n.viewer;if(!o){console.warn("viewer is undefined!");return}const s=et(o);if(!s)return;const{screenManager:r}=s,l={scale:1*Me.scaleFactor,font:"16px sans-serif",verticalOrigin:h.VerticalOrigin.BOTTOM,horizontalOrigin:h.HorizontalOrigin.CENTER,scaleByDistance:Me.scaleByDistance,eyeOffset:new h.Cartesian3(0,0,-10),show:!0},c={scale:1*Me.scaleFactor,verticalOrigin:h.VerticalOrigin.BOTTOM,horizontalOrigin:h.HorizontalOrigin.CENTER,scaleByDistance:Me.scaleByDistance,image:Me.clusterImageUrl};(async()=>{if(Me.clusterImageAttribute===void 0){const u=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPoi2D/clusterJson.json");await fetch(u).then(d=>d.json()).then(d=>{Me.clusterImageAttribute=d}).catch(d=>{console.error(d)})}{const u=()=>{if(!e.data){this.pointFeatures=void 0;return}this.featureArrName=e.data.type=="FeatureCollection"?"features":"geometries";const d={type:e.data.type,[this.featureArrName]:[]};if(e.data.type==="FeatureCollection")for(let p=0;p<e.data.features.length;p++){const f=e.data.features[p];if(f.geometry.type=="Point")d[this.featureArrName].push(f);else if(f.geometry.type=="MultiPoint")for(let g=0;g<f.geometry.coordinates.length;g++)d[this.featureArrName].push({type:"Feature",geometry:{type:"Point",coordinates:f.geometry.coordinates[g]},properties:f.properties??{}});else console.log("POI聚合只能加载Point和MultiPoint类型的数据,未加载数据类型为:",f.geometry.type)}else if(e.data.type=="GeometryCollection")for(let p=0;p<e.data.geometries.length;p++){const f=e.data.geometries[p];if(f.type=="Point")d[this.featureArrName].push(f);else if(f.type=="MultiPoint")for(let g=0;g<f.coordinates.length;g++)d[this.featureArrName].push({type:"Feature",geometry:{type:"Point",coordinates:f.coordinates[g]},properties:f.properties??{}});else console.log("POI聚合只能加载Point和MultiPoint类型的数据,未加载数据类型为:",f.type)}this.pointFeatures=d};u(),this.ad(e.dataChanged.don(u))}{const u=()=>{this.dataSource&&o.dataSources.remove(this.dataSource),this.dataSource=void 0};this.ad(()=>u());const d=()=>{u(),this.pointFeatures&&h.GeoJsonDataSource.load(this.pointFeatures).then(p=>{o.dataSources.add(p).then(()=>{this.dataSource=p})})};d(),this.ad(this.pointFeaturesChanged.don(d))}this.ad(new a.ObjResettingWithEvent(this.dataSourceChanged,()=>{var v;if(!this.dataSource)return;const u=new a.Destroyable,d=this.dataSource;d.clustering.enabled=d.clustering.clusterBillboards=d.clustering.clusterLabels=d.clustering.clusterPoints=!0;for(let y=0;y<d.entities.values.length;y++){const w=d.entities.values[y];w.billboard&&(w.billboard.color=new h.ConstantProperty(h.Color.TRANSPARENT))}{const y=()=>{const P=d.clustering.pixelRange;d.clustering.pixelRange=0,d.clustering.pixelRange=P};y();let w=(v=this.czmViewer.viewer)==null?void 0:v.camera.moveEnd.addEventListener(()=>{y()});u.d(()=>{var P;w&&((P=this.czmViewer.viewer)==null||P.camera.moveEnd.removeEventListener(w))})}u.d(a.track([d.clustering,"pixelRange"],[e,"pixelRange"])),u.d(a.track([d.clustering,"minimumClusterSize"],[e,"minimumClusterSize"])),d.clustering.clusterEvent.addEventListener((y,w)=>{w.label&&(w.label.show=!1),w.billboard&&(w.billboard.show=!1),w.point&&(w.point.show=!1)});const p=u.ad(a.react(!1));let f=[];const g=o.scene.postUpdate.addEventListener(()=>{if(d.clustering._clusterLabelCollection)if(d.clustering._clusterLabelCollection._labels.length!=f.length||!d.clustering._clusterLabelCollection._labels.every(y=>f.includes(y.id.length))){f=[];for(let y=0;y<d.clustering._clusterLabelCollection._labels.length;y++){const w=d.clustering._clusterLabelCollection._labels[y];f.push(w.id.length)}p.value=!0}else p.value=!1});u.ad(()=>g());{let y={id:"",layer:"",screenObjectIds:[]},w={id:"",layer:"",screenObjectIds:[]};const P=()=>{y&&(r.remove(y.layer,y.id,{label:y.screenObjectIds}),y={id:"",layer:"",screenObjectIds:[]}),w&&(r.remove(w.layer,w.id,{billboard:w.screenObjectIds}),w={id:"",layer:"",screenObjectIds:[]})};u.ad(()=>{P()});const C=()=>{var G,O,N,_,E,D;if(P(),!e.show||!Me.clusterImageAttribute)return;const x=e.style??a.ESEntityCluster.defaults.style,A=Me.clusterImageAttribute[((G=x.nonCluster)==null?void 0:G.mode)??"SquareH01"],R=[-A.anchorPixelOffset[0]+A.textPixelOffset[0],-A.anchorPixelOffset[1]-A.textPixelOffset[1]],L={...l,pixelOffset:new h.Cartesian2(R[0]*Me.scaleFactor,R[1]*Me.scaleFactor),heightReference:h.HeightReference[(e.heightReference??a.ESEntityCluster.defaults.heightReference).toUpperCase()]},B={...c,width:A.imageSize[0],height:A.imageSize[1],heightReference:h.HeightReference[(e.heightReference??a.ESEntityCluster.defaults.heightReference).toUpperCase()],pixelOffset:new h.Cartesian2(-A.anchorPixelOffset[0]*Me.scaleFactor,-A.anchorPixelOffset[1]*Me.scaleFactor),imageSubRegion:new h.BoundingRectangle(...A.imagePixelOffset,...A.imageSize)},V=new Map;if(d.clustering._clusterLabelCollection)for(let z=0;z<d.clustering._clusterLabelCollection._labels.length;z++){const U=d.clustering._clusterLabelCollection._labels[z];if(!Me.clusterImageAttribute)continue;const Y=U.text,q=se(U.position),X={index:U.id.map(Ae=>d.entities.values.length-1-d.clustering._collectionIndicesByEntity[Ae.id].billboardIndex).sort((Ae,Te)=>Ae-Te),name:Y,position:q},Q=this.getClusterStyle(x.cluster??a.ESEntityCluster.defaults.style.cluster,U.id.length).mode,j=Me.clusterImageAttribute[Q],ae=[-j.anchorPixelOffset[0]+j.textPixelOffset[0],-j.anchorPixelOffset[1]-j.textPixelOffset[1]],ue={...l,pixelOffset:new h.Cartesian2(ae[0]*Me.scaleFactor,ae[1]*Me.scaleFactor),heightReference:h.HeightReference[(e.heightReference??a.ESEntityCluster.defaults.heightReference).toUpperCase()]},fe={...c,width:j.imageSize[0],height:j.imageSize[1],heightReference:h.HeightReference[(e.heightReference??a.ESEntityCluster.defaults.heightReference).toUpperCase()],pixelOffset:new h.Cartesian2(-j.anchorPixelOffset[0]*Me.scaleFactor,-j.anchorPixelOffset[1]*Me.scaleFactor),imageSubRegion:new h.BoundingRectangle(...j.imagePixelOffset,...j.imageSize)},_e=r.addImage(e.id,e.typeName,fe,X),Oe=r.addLabel(e.id,e.typeName,ue,X);w.id=_e.id,w.layer=_e.layer,w.screenObjectIds.push(_e.screenObjectId),y.id=Oe.id,y.layer=Oe.layer,y.screenObjectIds.push(Oe.screenObjectId);for(let Ae=0;Ae<U.id.length;Ae++)V.set(U.id[Ae].id,1)}for(let z=0;z<d.entities.values.length;z++){const U=d.entities.values[z];if(V.has(U.id)||!this.pointFeatures||!n.isPointVisible(se((O=U.position)==null?void 0:O.getValue())))continue;const Y=((N=this.pointFeatures[this.featureArrName][z])==null?void 0:N.coordinates)??((_=this.pointFeatures[this.featureArrName][z])==null?void 0:_.geometry.coordinates),q=((E=this.pointFeatures[this.featureArrName][z])==null?void 0:E.name)??((D=this.pointFeatures[this.featureArrName][z].properties)==null?void 0:D.name)??(z+1).toString(),X={index:z,name:q,position:Y},Q=r.addImage(e.id,e.typeName,B,X),j=r.addLabel(e.id,e.typeName,L,X);w.id=Q.id,w.layer=Q.layer,w.screenObjectIds.push(Q.screenObjectId),y.id=j.id,y.layer=j.layer,y.screenObjectIds.push(j.screenObjectId)}};C();const S=u.ad(a.createNextAnimateFrameEvent(e.showChanged,e.styleChanged,e.heightReferenceChanged,p.changed));u.ad(S.don(C))}return u}))})()}get dataSource(){return this._dataSource.value}set dataSource(e){this._dataSource.value=e}get dataSourceChanged(){return this._dataSource.changed}get pointFeatures(){return this._pointFeatures.value}set pointFeatures(e){this._pointFeatures.value=e}get pointFeaturesChanged(){return this._pointFeatures.changed}getClusterStyle(e,n){return e.find(o=>{if(o.value!==void 0)return o.value===n;const s=o.minValue!==void 0?o.minValue<=n:!0,r=o.maxValue!==void 0?o.maxValue>=n:!0;return s&&r})}};m(Me,"type",Me.register("ESCesiumViewer",a.ESEntityCluster.type,Me)),m(Me,"scaleFactor",.6),m(Me,"scaleByDistance",new h.NearFarScalar(100,1,1e3,1)),m(Me,"clusterImages"),m(Me,"clusterImageAttribute"),m(Me,"clusterImageUrl",a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPoi2D/clusterSpirit.png"));let Hp=Me;const xl=class xl extends jt{constructor(i,e){if(super(i,e),!e.viewer){console.warn("viewer is undefined!");return}}flyTo(i,e){const{sceneObject:n,czmViewer:o}=this;return o.actived?n.flyToParam||n.flyInParam?super.flyTo(i,e):(n.esImageryLayer.flyTo(i&&i),n.flyOverEvent.emit(e,"over",o),!0):!1}flyIn(i,e){const{sceneObject:n,czmViewer:o}=this;return o.actived?n.flyInParam?super.flyIn(i,e):(n.esImageryLayer.flyTo(i&&i),n.flyOverEvent.emit(e,"over",o),!0):!1}};m(xl,"type",xl.register("ESCesiumViewer",gh.type,xl));let $p=xl;const Al=class Al extends Yt{constructor(e,n){super(e,n);m(this,"geoPolyline");m(this,"czmWater");if(!n.viewer){console.warn("viewer is undefined!");return}if(!et(n.viewer))return;this.geoPolyline=this.dv(new Se(n,e.id)),this.czmWater=this.dv(new fo(n,e.id));const{geoPolyline:r,czmWater:l}=this;this.d(a.track([l,"allowPicking"],[e,"allowPicking"])),this.d(a.track([l,"ground"],[e,"fillGround"])),this.d(a.track([r,"allowPicking"],[e,"allowPicking"])),this.d(a.track([r,"color"],[e,"strokeColor"])),this.d(a.track([r,"width"],[e,"strokeWidth"])),this.d(a.track([r,"ground"],[e,"strokeGround"]));{const c=this.dv(a.createNextAnimateFrameEvent(e.waterColorChanged,e.waterImageChanged,e.frequencyChanged,e.waveVelocityChanged,e.amplitudeChanged,e.specularIntensityChanged,e.waterTypeChanged,e.flowDirectionChanged,e.flowSpeedChanged)),u=()=>{if(e.waterType==="custom")this.updateWater({waterColor:e.waterColor??a.ESGeoWater.defaults.waterColor,frequency:(e.frequency??a.ESGeoWater.defaults.frequency)/10,waveVelocity:(e.waveVelocity??a.ESGeoWater.defaults.waveVelocity)/100,amplitude:(e.amplitude??a.ESGeoWater.defaults.amplitude)*100,specularIntensity:e.specularIntensity??a.ESGeoWater.defaults.specularIntensity,flowDirection:e.flowDirection??a.ESGeoWater.defaults.flowDirection,flowSpeed:e.flowSpeed??a.ESGeoWater.defaults.flowSpeed,waterImage:e.waterImage??a.ESGeoWater.defaults.waterImage});else{const d=Object.assign({},Ec[e.waterType]);d.frequency&&(d.frequency/=10),d.waveVelocity&&(d.waveVelocity/=100),d.amplitude&&(d.amplitude*=100),this.updateWater(d)}};u(),this.d(c.don(u))}{const c=()=>{r.show=!!(e.show&&e.stroked)},u=this.disposeVar(a.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged));this.d(u.don(c)),c()}{const c=()=>{l.show=e.show&&e.filled},u=this.disposeVar(a.createNextAnimateFrameEvent(e.showChanged,e.filledChanged));this.d(u.don(c)),c()}{const c=()=>{e.points&&e.points.length>=3?(r.positions=[...e.points,e.points[0]],l.points=[...e.points]):(r.positions=e.points&&e.points.length>=2?[...e.points,e.points[0]]:[],l.points=[])};c();const u=this.dv(a.createNextAnimateFrameEvent(e.pointsChanged));this.d(u.don(c))}this.ad(e.editingChanged.don(c=>{l.updateBoundingSphere(c)}))}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):o.points?(oe(s,o,n,o.points,e),!0):!1:!1}updateWater(e){const{czmWater:n}=this;e.waterColor&&n.waterColor!=e.waterColor&&(n.waterColor=e.waterColor),e.specularIntensity!=null&&n.specularIntensity!=e.specularIntensity&&(n.specularIntensity=e.specularIntensity),e.frequency!=null&&n.frequency!=e.frequency&&(n.frequency=e.frequency),e.waveVelocity!=null&&n.animationSpeed!=e.waveVelocity&&(n.animationSpeed=e.waveVelocity),e.amplitude!=null&&n.amplitude!=e.amplitude&&(n.amplitude=e.amplitude),e.flowSpeed!=null&&n.flowSpeed!=e.flowSpeed&&(n.flowSpeed=e.flowSpeed),n.baseWaterImage=e.waterImage,n.stRotation=e.flowDirection}};m(Al,"type",Al.register("ESCesiumViewer",a.ESGeoWater.type,Al));let qp=Al;function DT(t){let i,e;if(Reflect.has(t,"type")&&t.type==="symbol"&&Reflect.has(t,"layout")){const n=t.layout;if(Reflect.has(n,"icon-image")){e={},e.image=n["icon-image"];const{horizontalOrigin:o,verticalOrigin:s}=qy(n["icon-anchor"]??"center");if(e.horizontalOrigin=o,e.verticalOrigin=s,Reflect.has(t,"paint")){const r=t.paint;e.color=h.Color.fromCssColorString(r["icon-color"]??"#FF0000").withAlpha(r["icon-opacity"]??1)}e.rotation=h.Math.toRadians(n["icon-rotate"]??0),e.scale=n["icon-size"]??1,e.show=(n.visibility??"visible")==="visible"}if(Reflect.has(n,"text-field")){i={},i.text=n["text-field"];const{horizontalOrigin:o,verticalOrigin:s}=qy(n["text-anchor"]??"center");if(i.horizontalOrigin=o,i.verticalOrigin=s,Reflect.has(t,"paint")){const r=t.paint;i.fillColor=h.Color.fromCssColorString(r["text-color"]??"#FFFFFF").withAlpha(r["text-opacity"]??1)}i.font=`${n["text-size"]??16}px ${n["text-font"]??"sans-serif"}`,i.show=(n.visibility??"visible")==="visible"}}return{labelStyle:i,billboardStyle:e}}function qy(t){let i=h.HorizontalOrigin.CENTER,e=h.VerticalOrigin.CENTER;switch(t){case"center":break;case"left":i=h.HorizontalOrigin.LEFT;break;case"right":i=h.HorizontalOrigin.RIGHT;break;case"top":e=h.VerticalOrigin.TOP;break;case"bottom":e=h.VerticalOrigin.BOTTOM;break;case"top-left":i=h.HorizontalOrigin.LEFT,e=h.VerticalOrigin.TOP;break;case"top-right":i=h.HorizontalOrigin.RIGHT,e=h.VerticalOrigin.TOP;break;case"bottom-left":i=h.HorizontalOrigin.LEFT,e=h.VerticalOrigin.BOTTOM;break;case"bottom-right":i=h.HorizontalOrigin.RIGHT,e=h.VerticalOrigin.BOTTOM;break}return{horizontalOrigin:i,verticalOrigin:e}}class RT extends a.Destroyable{constructor(e,n){super();m(this,"czmViewer");m(this,"czmESMVTLayer");m(this,"screenManager");m(this,"cacheSize",100);m(this,"urlMap",new Map);m(this,"tileScheme","xyz");m(this,"minimumLevel",0);m(this,"maximumLevel",18);m(this,"_cache",new Map);m(this,"lastTiles",new Map);this.czmViewer=e,this.czmESMVTLayer=n;const o=this.czmViewer.viewer;if(!o)return;const s=et(o);if(!s)return;this.screenManager=s.screenManager,this.tileScheme=n.sceneObject.scheme??"xyz",this.maximumLevel=n.sceneObject.maximumLevel,this.minimumLevel=n.sceneObject.minimumLevel,(()=>{do{if(!n.mvtLayerJson)break;if(typeof n.mvtLayerJson.mainJson=="string"){this.urlMap.set("customSource",[n.mvtLayerJson.mainJson]);break}if(typeof n.mvtLayerJson.mainJson=="object"){const l=n.mvtLayerJson.mainJson.sources;for(const c in l){const u=l[c];u.type==="vector"&&Reflect.has(u,"tiles")&&this.urlMap.set(c,u.tiles)}break}}while(!1)})(),this.ad(()=>{var c;const l=this.lastTiles.values().next().value;l&&((c=this.screenManager)==null||c.remove(l.layer,l==null?void 0:l.id,Object.values(l.featureTable).flat())),this.cache&&(this.cache.clear(),this.cache=null)})}get cache(){return this._cache}set cache(e){this._cache=e}addTiles(e){var r;if(this.urlMap.size==0)return;if(this.cache&&this.cache.has(e)&&this.lastTiles.has(e)){this.updateTiles([e],"show");return}const[n,o,s]=e.split("-").map(Number);(r=this.cache)==null||r.set(e,new Map),this.requestImage(o,s,n,e)}updateTiles(e,n="hide"){var o,s;for(let r=0;r<e.length;r++){const l=e[r],c=this.lastTiles.get(l);if(c){const u=Object.keys(c.featureTable);for(let d=0;d<u.length;d++){const p=u[d],f=c.featureTable[p];n=="delete"?(o=this.screenManager)==null||o.remove(c.layer,c.id,f):(s=this.screenManager)==null||s.update(c.layer,c.id,f,{all:{show:n=="show"}})}}n=="delete"&&this.lastTiles.delete(l)}}update(e){const n=Array.from(this.lastTiles.keys()),o=n.filter(l=>!e.includes(l)),s=n.filter(l=>e.includes(l)),r=e.filter(l=>!n.includes(l));this.updateTiles(o),this.updateTiles(s,"show");for(let l=0;l<r.length;l++){const c=r[l];this.addTiles(c)}this.clearCache()}requestImage(e,n,o,s){const r=this.tileScheme=="tms"?Math.pow(2,o)-n-1:n;this.urlMap.size!=0&&this.urlMap.entries().forEach(([l,c])=>{if(c.length!=0&&c[0].includes("{z}")){const u=c[0].replace(/{z}/g,o.toString()).replace(/{x}/g,e.toString()).replace(/{y}/g,r.toString());fetch(u).then(d=>{var p,f;if(d.ok&&((p=this.cache)!=null&&p.has(s))&&((f=this.cache.get(s))==null?void 0:f.size)==0)return d.arrayBuffer()}).then(d=>{var v;const p=new g_(d),f=new m_.VectorTile(p),g=new Map;for(const y in f.layers){const w=f.layers[y];if(w.length<=0||w.feature(0).type!==1)continue;const P=[];for(let C=0;C<w.length;C++){const S=w.feature(C);P.push(S.toGeoJSON(e,n,o))}g.set(y,P)}(v=this.cache)==null||v.set(s,g),this.addScreenManage(s,g)})}})}clearCache(){if(!this.cache)return;const e=this.cache.size-this.cacheSize;if(!(e<=0))for(let n=0;n<e;n++){const o=this.cache.keys().next().value;o&&(this.updateTiles([o],"delete"),this.cache.delete(o))}}addScreenManage(e,n){this.lastTiles.set(e,{layer:"default",id:this.czmESMVTLayer.sceneObject.id,featureTable:{}});const o=this.lastTiles.get(e);for(const[s,r]of n.entries()){const l=this.czmESMVTLayer.mvtLayerJson.pointJson.find(c=>c["source-layer"]==s)??{};for(const c of r){const{labelStyle:u,billboardStyle:d}=DT(l);let p,f;u&&(u.show=!this.screenManager.avoidanceManager.enable,p=this.screenManager.addLabel(this.czmESMVTLayer.sceneObject.id,"default",u??{},{position:c.geometry.coordinates,name:c.properties.NAME??c.properties.name,index:c.id})),d&&(d.show=!this.screenManager.avoidanceManager.enable,f=this.screenManager.addImage(this.czmESMVTLayer.sceneObject.id,"default",d??{},{position:c.geometry.coordinates,name:c.properties.NAME??c.properties.name,index:c.id})),o.featureTable[s]||(o.featureTable[s]=[]),p&&o.featureTable[s].push(p.screenObjectId),f&&o.featureTable[s].push(f.screenObjectId)}}}reset(){if(!this.cache)return;const e=Array.from(this.cache.keys());this.update([]),setTimeout(()=>{this.update(e)})}}class FT extends a.Destroyable{constructor(e,n){super();m(this,"vectorTilesCache");m(this,"czmViewer");m(this,"czmESMVTLayer");this.czmViewer=e,this.czmESMVTLayer=n,this.vectorTilesCache=this.ad(new RT(e,n)),this.updateTiles();const o=this.czmViewer.viewer.scene.globe._surface.tileLoadProgressEvent.addEventListener(s=>{s==0&&this.updateTiles()});this.ad(()=>{o()})}updateTiles(){const e=this.czmViewer.viewer;if(!e)return;const n=new Set;for(let o=0;o<e.scene.globe._surface._tilesToRender.length;o++){const s=e.scene.globe._surface._tilesToRender[o];if(s.data)for(let r=0;r<s.data.imagery.length;r++){const l=s.data.imagery[r],c=l.loadingImagery??l.readyImagery;if(c){const u=`${c.level}-${c.x}-${c.y}`;n.add(u)}}}this.vectorTilesCache.update(Array.from(n))}}const Tl=class Tl extends jt{constructor(e,n){super(e,n);m(this,"_czmImagery");m(this,"_mvtLayerJson",this.disposeVar(a.reactJson({mainJson:"",pointJson:[],otherJson:[]})));m(this,"mvtLayerJsonChanged",this.ad(new a.Event));if(this._czmImagery=this.dv(new Ln(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmImagery;this.d(a.track([s,"show"],[e,"show"])),this.d(a.track([s,"zIndex"],[e,"zIndex"])),this.d(a.track([s,"rectangle"],[e,"rectangle"])),this.d(a.track([s,"alpha"],[e,"opacity"])),this.d(a.track([s,"splitDirection"],[e,"splitDirection"])),this.d(a.track([s,"brightness"],[e,"czmBrightness"])),this.d(a.track([s,"contrast"],[e,"czmContrast"])),this.d(a.track([s,"hue"],[e,"czmHue"])),this.d(a.track([s,"saturation"],[e,"czmSaturation"])),this.d(a.track([s,"gamma"],[e,"czmGamma"]));{const l=this.dv(a.createNextAnimateFrameEvent(e.accessTokenChanged,e.maximumLevelChanged,e.minimumLevelChanged,e.tileSizeChanged,e.allowPickingChanged,e.rectangleChanged,e.schemeChanged,this.mvtLayerJsonChanged)),c=()=>{!this.mvtLayerJson||this.mvtLayerJson.otherJson.length==0||(s.imageryProvider={type:"MVTImageryProvider",url:this.mvtLayerJson.mainJson,accessToken:e.accessToken,maximumLevel:e.maximumLevel,minimumLevel:e.minimumLevel,tileSize:e.tileSize,enablePickFeatures:e.allowPicking,rectangle:e.rectangle,style:this.mvtLayerJson.otherJson,scheme:e.scheme})};c(),this.d(l.don(c))}{const l=d=>{const p=structuredClone(d);Reflect.deleteProperty(p,"layers"),this.mvtLayerJson={mainJson:p,pointJson:d.layers.filter(f=>f.type=="symbol"),otherJson:d.layers.filter(f=>f.type!="symbol")}},c=async()=>{var d;if(typeof e.url=="string")if(e.url.includes("{z}"))this.mvtLayerJson.mainJson=e.url;else{const p=await fetch(e.url);if((d=p.headers.get("Content-Type"))!=null&&d.includes("json")){const f=await p.json();l(f)}}else l(e.url);e.style&&e.style.length!=0&&(this.mvtLayerJson.pointJson=e.style.filter(p=>p.type=="symbol"),this.mvtLayerJson.otherJson=e.style.filter(p=>p.type!="symbol")),this.mvtLayerJsonChanged.emit()};c();const u=this.ad(a.createNextAnimateFrameEvent(e.urlChanged,e.styleChanged));this.ad(u.don(c))}const r=this.ad(a.createNextAnimateFrameEvent(e.schemeChanged,e.maximumLevelChanged,e.minimumLevelChanged,this.mvtLayerJsonChanged));this.ad(new a.ObjResettingWithEvent(r,()=>new FT(n,this)))}get czmImagery(){return this._czmImagery}get mvtLayerJson(){return this._mvtLayerJson.value}set mvtLayerJson(e){this._mvtLayerJson.value=e}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmImagery:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r.flyTo(e&&e),o.flyOverEvent.emit(n,"over",s),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmImagery:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):(r.flyTo(e&&e),o.flyOverEvent.emit(n,"over",s),!0):!1}};m(Tl,"type",Tl.register("ESCesiumViewer",fh.type,Tl));let Xp=Tl;class zT extends a.Destroyable{constructor(i,e){super(),this._czmESPipeFence=i,this._sceneObject=e;const n=this._sceneObject,o=this._czmESPipeFence,s=o.czmCustomPrimitive;if(!n.points||n.points.length<2){this.clear(s);return}const r=n.points.length;let l=[],c=[],u=[],d=[],p=[];for(let P=0;P<r-1;P++){const{outlinePionts:C,customPrimitivePoints:S}=this.divideFourPoints(n.points[P],n.points[P+1]);d.push(...S),p.push(...C),u.push(...this.setIndexs(P))}const[f,g,v]=Dt({originPosition:d[0]},d),y=this.setFaces(f);l.push(...y.flat());const w=this.setTextureCoordinates(n,o);c.push(...w.flat()),o.computeBoundingBox(),this.updateCustomPrimitive(s,g,l,u,c)}divideFourPoints(i,e){const n=a.geoHeading(i,e),o=a.geoDestination(i,this._sceneObject.width/2,90+n),s=a.geoDestination(i,this._sceneObject.width/2,n-90),r=a.geoDestination(e,this._sceneObject.width/2,n-90),l=a.geoDestination(e,this._sceneObject.width/2,90+n),c=[o[0],o[1],o[2]+this._sceneObject.height/2],u=[o[0],o[1],o[2]-this._sceneObject.height/2],d=[s[0],s[1],s[2]+this._sceneObject.height/2],p=[s[0],s[1],s[2]-this._sceneObject.height/2],f=[l[0],l[1],l[2]+this._sceneObject.height/2],g=[l[0],l[1],l[2]-this._sceneObject.height/2],v=[r[0],r[1],r[2]+this._sceneObject.height/2],y=[r[0],r[1],r[2]-this._sceneObject.height/2],w=[[c,d],[c,f],[c,u],[u,g]],P=[[u,p],[d,v],[d,p],[p,y]],C=[[f,g],[f,v],[g,y],[v,y]];return{outlinePionts:[...w,...P,...C],customPrimitivePoints:[u,c,d,p,g,f,v,y]}}setIndexs(i){const e=i*16;return[e+1,e+0,e+3,e+1,e+3,e+2,e+5,e+4,e+7,e+6,e+5,e+7,e+9,e+8,e+11,e+9,e+11,e+10,e+13,e+12,e+15,e+13,e+15,e+14]}setFaces(i){const e=[],n=i.length/8;for(let s=0;s<n;s++){const r=i.slice(8*s,8*(s+1));e.push(r)}return[...e.map(s=>[s[4],s[5],s[1],s[0],s[5],s[6],s[2],s[1],s[6],s[7],s[3],s[2],s[7],s[4],s[0],s[3]]).flat()]}getDistances(i,e){const[n]=Dt({originPosition:i[0]},i),o=n.length,s=n.reduce((c,u,d,p)=>{if(d===0)return c.push(0),c;const f=d-1,g=p[f],v=Math.sqrt((g[0]-u[0])*(g[0]-u[0])+(g[1]-u[1])*(g[1]-u[1]));return c.push(c[f]+v),c},[]),r=s[o-1];return e.distances=r,s.map(c=>c/r)}setTextureCoordinates(i,e){if(!i.points||i.points.length<2)return;const n=this.getDistances(i.points,e),o=[];for(let s=1;s<n.length;s++){let r=[];if(s===n.length-1){const l=[1,0,1,1,n[s-1],1,n[s-1],0];r=[...l,...l,...l,...l]}else{const l=[n[s],0,n[s],1,n[s-1],1,n[s-1],0];r=[...l,...l,...l,...l]}o.push(r)}return o}updateCustomPrimitive(i,e,n,o,s){i.modelMatrix=e,i.indexTypedArray=new Uint16Array(o),i.attributes={position:{typedArray:new Float32Array(n),componentsPerAttribute:3},a_st:{typedArray:new Float32Array(s),componentsPerAttribute:2}}}clear(i){i.indexTypedArray=void 0,i.modelMatrix=void 0,i.attributes=void 0}}const Ml=class Ml extends yt{constructor(e,n){super(e,n);m(this,"_line",this.dv(new Se(this.czmViewer,this.sceneObject.id)));m(this,"_czmTexture",this.ad(new Be(this.czmViewer,this.sceneObject.id)));m(this,"_czmCustomPrimitive",this.dv(new ze(this.czmViewer,this.sceneObject.id)));m(this,"_distances",this.dv(a.react(0)));if(!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmTexture,r=this._line;this.d(a.bind([r,"positions"],[e,"points"])),this.d(a.track([this.line,"allowPicking"],[e,"allowPicking"])),this.d(a.track([this.line,"color"],[e,"strokeColor"])),this.d(a.track([this.line,"width"],[e,"strokeWidth"])),this.d(a.track([this.line,"ground"],[e,"strokeGround"]));{const d=this.dv(a.createNextAnimateFrameEvent(this.sceneObject.pointsChanged,this.sceneObject.strokeWidthChanged,this.sceneObject.strokeColorChanged,this.sceneObject.heightChanged,this.sceneObject.widthChanged,this.sceneObject.fillColorChanged));this.dv(new a.ObjResettingWithEvent(d,()=>new zT(this,this.sceneObject)))}{const d=()=>{r.show=e.show&&e.stroked};d();const p=this.dv(a.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged));this.d(p.don(d))}this.bindCustomPrimitive(e);let l="";const c=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/path/singleArrow.png"),u=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/path/multipleArrows.png");{const d=()=>{e.materialMode==="multipleArrows"||e.materialMode==="blue"?l=u:e.materialMode==="color"?l="":l=c,s.uri=l,l==""?(this._czmCustomPrimitive.uniformMap={u_color:e.fillColor},this._czmCustomPrimitive.fragmentShaderSource=` uniform vec4 u_color;
|
|
1747
1747
|
in vec2 v_st;
|
|
1748
1748
|
void main()
|
|
1749
1749
|
{
|
|
@@ -2291,10 +2291,10 @@ async function initCesiumViewer(container, czmViewer) {
|
|
|
2291
2291
|
`;function $4(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
|
|
2292
2292
|
github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
|
|
2293
2293
|
gitee地址:${t}
|
|
2294
|
-
`;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const at=class at extends a.ESViewer{constructor(e){super(e);m(this,"_disabledInputStack",this.disposeVar(a.react(0)));m(this,"_viewer",this.dv(a.react(void 0)));m(this,"_viewerInstance");m(this,"_viewerLegend");m(this,"pickCustomAttachedInfo");m(this,"_fps",this.dv(a.react(0)));m(this,"_notSupportEditingCount",this.disposeVar(a.react(0)));m(this,"_editingSystem",Wh);m(this,"_moveObjectsProcess",this.ad(bC()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new CF(this)),this.ad(new _F(this)),this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new EF(this)})),this._viewerLegend=this.dv(new B4(this)),this._viewerInstance=this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Rg(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=te([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new a.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new bL(this.subContainer,this,o=>this._viewer.value=o,n.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&et(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:s}=this.extensions;return await s.pick(e,void 0,n)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:n}=this;if(!n)return;const o=h.Cartographic.fromDegrees(e[0],e[1],e[2],at.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Ht(e),rotation:Ko(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=h.Cartesian3.fromDegrees(...e),s=h.Transforms.eastNorthUpToFixedFrame(o),r=h.Matrix4.inverse(s,new h.Matrix4),l=h.Matrix4.multiplyByPoint(r,n.positionWC,new h.Cartesian3),c=h.Cartesian3.magnitude(l);let u=-Math.asin(l.z/c);u=h.Math.toDegrees(u);let d=h.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(d+=l.y<0?-h.Math.PI:h.Math.PI),d=h.Math.toDegrees(d);const p=Ko(n),f=p[0]-d,g=p[1]-u;return{distance:c,heading:d,pitch:u,flyDuration:1,hDelta:f,pDelta:g}}flyIn(e,n,o,s="default"){var c;if(!n)return;const r={position:e,rotation:n,duration:(o??1)*1e3},l=(c=this.viewer)==null?void 0:c.camera;return l&&Er(l,r,s)}flyTo(e,n,o="default"){var g;const{distance:s,heading:r,pitch:l,flyDuration:c,hDelta:u,pDelta:d}=e,p={position:n,viewDistance:s,rotation:[r,l,0],duration:c*1e3,hdelta:u,pdelta:d},f=(g=this.viewer)==null?void 0:g.camera;return f&&Er(f,p,o)}flyToBoundingSphere(e,n,o=1){var p;const s=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],r=a.getGeoBoundingSphereFromPositions(s);if(!r)return;const{center:l,radius:c}=r,u={position:l,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},d=(p=this.viewer)==null?void 0:p.camera;return d&&Er(d,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Ht(e),rotation:Ko(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToWalk(e,n,o),this._navigationMode.value="Walk"}changeToMap(){var e,n;(n=(e=this._viewerInstance)==null?void 0:e.obj)==null||n.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,n,o){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,s,r,l){var c,u;(u=(c=this._viewerInstance)==null?void 0:c.obj)==null||u.navigationManager.changeToLine(e,n,o,s,r,l),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToFollow(e,n,o,s,r),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium={version:h.VERSION},e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=h.Cartographic.fromDegrees(e,n,void 0,at.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(s)??null}async getHeightsByLonLats(e,n){const o=e.map(r=>this.getHeightByLonLat(...r));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await Pm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Ie(e));if(n)return[n.x,n.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,n,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const s=e.components.main??e;s&&n!=null&&(s.editingID=`${o.callSource}_${a.createGuid()}`,this._editingSystem.create(this,s,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=a.createGuid();for(let s=0;s<e.length;s++){const r=e[s],l=r.components.main??r;l.editingID=o,l&&n.push(l)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=at.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!at.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=at.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Dt(e,n)}localPositionsToPositions(e,n){return yn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=e instanceof h.Cartesian3?e:Ie(e),o=new h.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(n))return!1;const s=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!s||s.x<0||s.y<0)}getESProperties(){const e={...super.getESProperties()},n=at.defaults;return{...e,more:[...e.more,new a.GroupProperty([],"通用","通用"),new a.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",H4,G4,!0),new a.FunctionProperty([],()=>at.getCesiumIonToken(),[],"获取官方token"),new a.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new a.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new a.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new a.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new a.GroupProperty([],"Viewer","Viewer"),new a.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new a.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new a.BooleanProperty([this,"shadows"]),new a.GroupProperty([],"比例尺","比例尺(Legend)"),new a.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new a.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new a.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new a.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new a.GroupProperty([],"场景","场景(Scene)"),new a.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new a.GroupProperty([],"Globe","Globe"),new a.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new a.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new a.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new a.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new a.BooleanProperty([this,"sceneGlobeShowSkirts"]),new a.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new a.ColorProperty([this,"sceneGlobeBaseColor"]),new a.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new a.JsonProperty([this,"sceneGlobeClippingPlanes"]),new a.StringProperty([this,"sceneGlobeClippingPlanesId"]),new a.JsonProperty([this,"sceneGlobeClippingPolygons"]),new a.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new a.GroupProperty([],"underground","underground"),new a.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new a.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new a.GroupProperty([],"Translucency","Translucency"),new a.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new a.GroupProperty([],"Sun","Sun"),new a.BooleanProperty([this,"sun"],"sun",n.sun,!0),new a.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new a.GroupProperty([],"Moon","Moon"),new a.BooleanProperty([this,"moon"],"moon",n.moon,!0),new a.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new a.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new a.GroupProperty([],"SkyBox","SkyBox"),new a.BooleanProperty([this,"sceneSkyBoxShow"]),new a.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new a.GroupProperty([],"Background","Background"),new a.BooleanProperty([this,"xbsjUseBackground"]),new a.StringProperty([this,"xbsjBackgroundImageUri"]),new a.ColorProperty([this,"xbsjBackgroundColor"]),new a.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new a.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new a.ColorProperty([this,"sceneBackgroundColor"]),new a.GroupProperty([],"Fog","Fog"),new a.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new a.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new a.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new a.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new a.GroupProperty([],"Sscc","Sscc"),new a.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new a.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new a.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new a.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new a.GroupProperty([],"后处理","后处理"),new a.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new a.GroupProperty([],"环境遮蔽","环境遮蔽"),new a.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new a.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new a.GroupProperty([],"Bloom","Bloom"),new a.BooleanProperty([this,"scenePpsBloomEnabled"]),new a.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new a.NumberProperty([this,"scenePpsBloomContrast"]),new a.NumberProperty([this,"scenePpsBloomBrightness"]),new a.NumberProperty([this,"scenePpsBloomDelta"]),new a.NumberProperty([this,"scenePpsBloomSigma"]),new a.NumberProperty([this,"scenePpsBloomStepSize"]),new a.GroupProperty([],"调试","调试"),new a.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new a.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new a.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new a.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new a.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new a.GroupProperty([],"Inspector","Inspector"),new a.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new a.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new a.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};m(at,"type",at.register("ESCesiumViewer",at)),m(at,"getCesiumIonToken",$4),m(at,"currentDefaultAccessToken",h.Ion.defaultAccessToken),m(at,"latestDefaultAccessToken"),m(at,"ObjectsToExcludeWrapper",SF),m(at,"defaults",{...a.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:h.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),m(at,"getHeightsScartchCarto",new h.Cartographic);let Re=at;(t=>{t.createDefaultProps=()=>({...a.ESViewer.createDefaultProps(),...W4()})})(Re||(Re={})),a.extendClassProps(Re.prototype,Re.createDefaultProps),M.copyright=void 0;try{const t="earthsdk3-cesium",i="3.6.0-beta.114",e="2025-11-04T07:08:24.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="f414a145e6204a2d8a0b511ec4636c035d8718a6",l=((Date.now()-1762240104e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${l}个小时)
|
|
2294
|
+
`;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const at=class at extends a.ESViewer{constructor(e){super(e);m(this,"_disabledInputStack",this.disposeVar(a.react(0)));m(this,"_viewer",this.dv(a.react(void 0)));m(this,"_viewerInstance");m(this,"_viewerLegend");m(this,"pickCustomAttachedInfo");m(this,"_fps",this.dv(a.react(0)));m(this,"_notSupportEditingCount",this.disposeVar(a.react(0)));m(this,"_editingSystem",Wh);m(this,"_moveObjectsProcess",this.ad(bC()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new CF(this)),this.ad(new _F(this)),this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new EF(this)})),this._viewerLegend=this.dv(new B4(this)),this._viewerInstance=this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Rg(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=te([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new a.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new bL(this.subContainer,this,o=>this._viewer.value=o,n.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&et(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:s}=this.extensions;return await s.pick(e,void 0,n)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:n}=this;if(!n)return;const o=h.Cartographic.fromDegrees(e[0],e[1],e[2],at.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Ht(e),rotation:Ko(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=h.Cartesian3.fromDegrees(...e),s=h.Transforms.eastNorthUpToFixedFrame(o),r=h.Matrix4.inverse(s,new h.Matrix4),l=h.Matrix4.multiplyByPoint(r,n.positionWC,new h.Cartesian3),c=h.Cartesian3.magnitude(l);let u=-Math.asin(l.z/c);u=h.Math.toDegrees(u);let d=h.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(d+=l.y<0?-h.Math.PI:h.Math.PI),d=h.Math.toDegrees(d);const p=Ko(n),f=p[0]-d,g=p[1]-u;return{distance:c,heading:d,pitch:u,flyDuration:1,hDelta:f,pDelta:g}}flyIn(e,n,o,s="default"){var c;if(!n)return;const r={position:e,rotation:n,duration:(o??1)*1e3},l=(c=this.viewer)==null?void 0:c.camera;return l&&Er(l,r,s)}flyTo(e,n,o="default"){var g;const{distance:s,heading:r,pitch:l,flyDuration:c,hDelta:u,pDelta:d}=e,p={position:n,viewDistance:s,rotation:[r,l,0],duration:c*1e3,hdelta:u,pdelta:d},f=(g=this.viewer)==null?void 0:g.camera;return f&&Er(f,p,o)}flyToBoundingSphere(e,n,o=1){var p;const s=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],r=a.getGeoBoundingSphereFromPositions(s);if(!r)return;const{center:l,radius:c}=r,u={position:l,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},d=(p=this.viewer)==null?void 0:p.camera;return d&&Er(d,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Ht(e),rotation:Ko(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToWalk(e,n,o),this._navigationMode.value="Walk"}changeToMap(){var e,n;(n=(e=this._viewerInstance)==null?void 0:e.obj)==null||n.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,n,o){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,s,r,l){var c,u;(u=(c=this._viewerInstance)==null?void 0:c.obj)==null||u.navigationManager.changeToLine(e,n,o,s,r,l),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToFollow(e,n,o,s,r),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium={version:h.VERSION},e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=h.Cartographic.fromDegrees(e,n,void 0,at.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(s)??null}async getHeightsByLonLats(e,n){const o=e.map(r=>this.getHeightByLonLat(...r));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await Pm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Ie(e));if(n)return[n.x,n.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,n,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const s=e.components.main??e;s&&n!=null&&(s.editingID=`${o.callSource}_${a.createGuid()}`,this._editingSystem.create(this,s,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=a.createGuid();for(let s=0;s<e.length;s++){const r=e[s],l=r.components.main??r;l.editingID=o,l&&n.push(l)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=at.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!at.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=at.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Dt(e,n)}localPositionsToPositions(e,n){return yn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=e instanceof h.Cartesian3?e:Ie(e),o=new h.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(n))return!1;const s=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!s||s.x<0||s.y<0)}getESProperties(){const e={...super.getESProperties()},n=at.defaults;return{...e,more:[...e.more,new a.GroupProperty([],"通用","通用"),new a.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",H4,G4,!0),new a.FunctionProperty([],()=>at.getCesiumIonToken(),[],"获取官方token"),new a.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new a.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new a.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new a.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new a.GroupProperty([],"Viewer","Viewer"),new a.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new a.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new a.BooleanProperty([this,"shadows"]),new a.GroupProperty([],"比例尺","比例尺(Legend)"),new a.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new a.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new a.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new a.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new a.GroupProperty([],"场景","场景(Scene)"),new a.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new a.GroupProperty([],"Globe","Globe"),new a.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new a.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new a.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new a.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new a.BooleanProperty([this,"sceneGlobeShowSkirts"]),new a.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new a.ColorProperty([this,"sceneGlobeBaseColor"]),new a.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new a.JsonProperty([this,"sceneGlobeClippingPlanes"]),new a.StringProperty([this,"sceneGlobeClippingPlanesId"]),new a.JsonProperty([this,"sceneGlobeClippingPolygons"]),new a.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new a.GroupProperty([],"underground","underground"),new a.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new a.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new a.GroupProperty([],"Translucency","Translucency"),new a.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new a.GroupProperty([],"Sun","Sun"),new a.BooleanProperty([this,"sun"],"sun",n.sun,!0),new a.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new a.GroupProperty([],"Moon","Moon"),new a.BooleanProperty([this,"moon"],"moon",n.moon,!0),new a.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new a.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new a.GroupProperty([],"SkyBox","SkyBox"),new a.BooleanProperty([this,"sceneSkyBoxShow"]),new a.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new a.GroupProperty([],"Background","Background"),new a.BooleanProperty([this,"xbsjUseBackground"]),new a.StringProperty([this,"xbsjBackgroundImageUri"]),new a.ColorProperty([this,"xbsjBackgroundColor"]),new a.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new a.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new a.ColorProperty([this,"sceneBackgroundColor"]),new a.GroupProperty([],"Fog","Fog"),new a.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new a.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new a.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new a.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new a.GroupProperty([],"Sscc","Sscc"),new a.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new a.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new a.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new a.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new a.GroupProperty([],"后处理","后处理"),new a.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new a.GroupProperty([],"环境遮蔽","环境遮蔽"),new a.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new a.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new a.GroupProperty([],"Bloom","Bloom"),new a.BooleanProperty([this,"scenePpsBloomEnabled"]),new a.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new a.NumberProperty([this,"scenePpsBloomContrast"]),new a.NumberProperty([this,"scenePpsBloomBrightness"]),new a.NumberProperty([this,"scenePpsBloomDelta"]),new a.NumberProperty([this,"scenePpsBloomSigma"]),new a.NumberProperty([this,"scenePpsBloomStepSize"]),new a.GroupProperty([],"调试","调试"),new a.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new a.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new a.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new a.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new a.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new a.GroupProperty([],"Inspector","Inspector"),new a.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new a.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new a.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};m(at,"type",at.register("ESCesiumViewer",at)),m(at,"getCesiumIonToken",$4),m(at,"currentDefaultAccessToken",h.Ion.defaultAccessToken),m(at,"latestDefaultAccessToken"),m(at,"ObjectsToExcludeWrapper",SF),m(at,"defaults",{...a.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:h.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),m(at,"getHeightsScartchCarto",new h.Cartographic);let Re=at;(t=>{t.createDefaultProps=()=>({...a.ESViewer.createDefaultProps(),...W4()})})(Re||(Re={})),a.extendClassProps(Re.prototype,Re.createDefaultProps),M.copyright=void 0;try{const t="earthsdk3-cesium",i="3.6.0-beta.116",e="2025-11-04T07:08:24.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="f414a145e6204a2d8a0b511ec4636c035d8718a6",l=((Date.now()-1762240104e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${l}个小时)
|
|
2295
2295
|
%c${o?o+`
|
|
2296
2296
|
`:""}当前网站正在使用${t},此软件版权归${n}所有
|
|
2297
|
-
`;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","f414a145e6204a2d8a0b511ec4636c035d8718a6")},get info(){return c},get date(){return"2025-11-04T07:08:24.000Z"},get author(){return"suplyang"},get version(){return"3.6.0-beta.
|
|
2297
|
+
`;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","f414a145e6204a2d8a0b511ec4636c035d8718a6")},get info(){return c},get date(){return"2025-11-04T07:08:24.000Z"},get author(){return"suplyang"},get version(){return"3.6.0-beta.116"},get name(){return"earthsdk3-cesium"},get commitId(){return"f414a145e6204a2d8a0b511ec4636c035d8718a6"},print(){console.info(this.info,`
|
|
2298
2298
|
font-size: 18px;
|
|
2299
2299
|
font-weight: 1000;
|
|
2300
2300
|
line-height: 1;
|
package/dist/types/CzmObjects/general/CzmESMVTLayer/VectorTilesManager/VectorTilesCache.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorTilesCache.d.ts","sourceRoot":"","sources":["../../../../../../src/CzmObjects/general/CzmESMVTLayer/VectorTilesManager/VectorTilesCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2C,MAAM,WAAW,CAAC;AAGjF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAuB,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEhH,qBAAa,gBAAiB,SAAQ,WAAW;IACtC,SAAS,EAAE,cAAc,CAAC;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAG,aAAa,CAAC;IAC9B,SAAS,SAAO;IAEhB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAa;IAE1C,UAAU,EAAE,KAAK,GAAG,KAAK,CAAS;IAClC,YAAY,EAAE,MAAM,CAAK;IACzB,YAAY,EAAE,MAAM,CAAM;IAEjC,OAAO,CAAC,MAAM,CAAmD;IACjE,IAAI,KAAK,yCAAyB;IAClC,IAAI,KAAK,CAAC,CAAC,sCAAA,EAAqB;IAEhC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE;YAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;SAAE,CAAA;KAAE,CAAC,CAAa;gBAQvG,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa;IA4CrE,QAAQ,CAAC,IAAI,EAAE,MAAM;IAWrB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE,MAAM,GAAG,MAAM,GAAG,QAAiB;IAoBtE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE;IAe7B,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAkC1D,UAAU;IAYV,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"VectorTilesCache.d.ts","sourceRoot":"","sources":["../../../../../../src/CzmObjects/general/CzmESMVTLayer/VectorTilesManager/VectorTilesCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2C,MAAM,WAAW,CAAC;AAGjF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAuB,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEhH,qBAAa,gBAAiB,SAAQ,WAAW;IACtC,SAAS,EAAE,cAAc,CAAC;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAG,aAAa,CAAC;IAC9B,SAAS,SAAO;IAEhB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAa;IAE1C,UAAU,EAAE,KAAK,GAAG,KAAK,CAAS;IAClC,YAAY,EAAE,MAAM,CAAK;IACzB,YAAY,EAAE,MAAM,CAAM;IAEjC,OAAO,CAAC,MAAM,CAAmD;IACjE,IAAI,KAAK,yCAAyB;IAClC,IAAI,KAAK,CAAC,CAAC,sCAAA,EAAqB;IAEhC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE;YAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;SAAE,CAAA;KAAE,CAAC,CAAa;gBAQvG,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa;IA4CrE,QAAQ,CAAC,IAAI,EAAE,MAAM;IAWrB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE,MAAM,GAAG,MAAM,GAAG,QAAiB;IAoBtE,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE;IAe7B,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAkC1D,UAAU;IAYV,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IA8BxD,KAAK;CAQR"}
|
package/package.json
CHANGED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import * as Cesium from 'cesium';
|
|
2
|
-
|
|
3
|
-
// declare class GroundPolylinePrimitive extends Destroyable {
|
|
4
|
-
// constructor()
|
|
5
|
-
// }
|
|
6
|
-
|
|
7
|
-
type GeometryInstance = Cesium.GeometryInstance;
|
|
8
|
-
type Appearance = Cesium.Appearance;
|
|
9
|
-
type ClassificationType = Cesium.ClassificationType;
|
|
10
|
-
type Scene = Cesium.Scene;
|
|
11
|
-
|
|
12
|
-
declare class GroundPolylinePrimitive {
|
|
13
|
-
constructor(options?: {
|
|
14
|
-
geometryInstances?: any[] | GeometryInstance;
|
|
15
|
-
appearance?: Appearance;
|
|
16
|
-
show?: boolean;
|
|
17
|
-
interleave?: boolean;
|
|
18
|
-
releaseGeometryInstances?: boolean;
|
|
19
|
-
allowPicking?: boolean;
|
|
20
|
-
asynchronous?: boolean;
|
|
21
|
-
classificationType?: ClassificationType;
|
|
22
|
-
debugShowBoundingVolume?: boolean;
|
|
23
|
-
debugShowShadowVolume?: boolean;
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* The geometry instances rendered with this primitive. This may
|
|
27
|
-
* be <code>undefined</code> if <code>options.releaseGeometryInstances</code>
|
|
28
|
-
* is <code>true</code> when the primitive is constructed.
|
|
29
|
-
* <p>
|
|
30
|
-
* Changing this property after the primitive is rendered has no effect.
|
|
31
|
-
* </p>
|
|
32
|
-
*/
|
|
33
|
-
readonly geometryInstances: any[] | GeometryInstance;
|
|
34
|
-
/**
|
|
35
|
-
* The {@link Appearance} used to shade this primitive. Each geometry
|
|
36
|
-
* instance is shaded with the same appearance. Some appearances, like
|
|
37
|
-
* {@link PolylineColorAppearance} allow giving each instance unique
|
|
38
|
-
* properties.
|
|
39
|
-
*/
|
|
40
|
-
appearance: Appearance;
|
|
41
|
-
/**
|
|
42
|
-
* Determines if the primitive will be shown. This affects all geometry
|
|
43
|
-
* instances in the primitive.
|
|
44
|
-
*/
|
|
45
|
-
show: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Determines whether terrain, 3D Tiles or both will be classified.
|
|
48
|
-
*/
|
|
49
|
-
classificationType: ClassificationType;
|
|
50
|
-
/**
|
|
51
|
-
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
52
|
-
* <p>
|
|
53
|
-
* Draws the bounding sphere for each draw command in the primitive.
|
|
54
|
-
* </p>
|
|
55
|
-
*/
|
|
56
|
-
debugShowBoundingVolume: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
|
|
59
|
-
*/
|
|
60
|
-
readonly interleave: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* When <code>true</code>, the primitive does not keep a reference to the input <code>geometryInstances</code> to save memory.
|
|
63
|
-
*/
|
|
64
|
-
readonly releaseGeometryInstances: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* When <code>true</code>, each geometry instance will only be pickable with {@link Scene#pick}. When <code>false</code>, GPU memory is saved.
|
|
67
|
-
*/
|
|
68
|
-
readonly allowPicking: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Determines if the geometry instances will be created and batched on a web worker.
|
|
71
|
-
*/
|
|
72
|
-
readonly asynchronous: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Determines if the primitive is complete and ready to render. If this property is
|
|
75
|
-
* true, the primitive will be rendered the next time that {@link GroundPolylinePrimitive#update}
|
|
76
|
-
* is called.
|
|
77
|
-
*/
|
|
78
|
-
readonly ready: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Gets a promise that resolves when the primitive is ready to render.
|
|
81
|
-
*/
|
|
82
|
-
readonly readyPromise: Promise<GroundPolylinePrimitive>;
|
|
83
|
-
/**
|
|
84
|
-
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
85
|
-
* <p>
|
|
86
|
-
* If true, draws the shadow volume for each geometry in the primitive.
|
|
87
|
-
* </p>
|
|
88
|
-
*/
|
|
89
|
-
readonly debugShowShadowVolume: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* Initializes the minimum and maximum terrain heights. This only needs to be called if you are creating the
|
|
92
|
-
* GroundPolylinePrimitive synchronously.
|
|
93
|
-
* @returns A promise that will resolve once the terrain heights have been loaded.
|
|
94
|
-
*/
|
|
95
|
-
static initializeTerrainHeights(): Promise<void>;
|
|
96
|
-
/**
|
|
97
|
-
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
98
|
-
* get the draw commands needed to render this primitive.
|
|
99
|
-
* <p>
|
|
100
|
-
* Do not call this function directly. This is documented just to
|
|
101
|
-
* list the exceptions that may be propagated when the scene is rendered:
|
|
102
|
-
* </p>
|
|
103
|
-
*/
|
|
104
|
-
update(): void;
|
|
105
|
-
/**
|
|
106
|
-
* Returns the modifiable per-instance attributes for a {@link GeometryInstance}.
|
|
107
|
-
* @example
|
|
108
|
-
* const attributes = primitive.getGeometryInstanceAttributes('an id');
|
|
109
|
-
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
|
|
110
|
-
* attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true);
|
|
111
|
-
* @param id - The id of the {@link GeometryInstance}.
|
|
112
|
-
* @returns The typed array in the attribute's format or undefined if the is no instance with id.
|
|
113
|
-
*/
|
|
114
|
-
getGeometryInstanceAttributes(id: any): any;
|
|
115
|
-
/**
|
|
116
|
-
* Checks if the given Scene supports GroundPolylinePrimitives.
|
|
117
|
-
* GroundPolylinePrimitives require support for the WEBGL_depth_texture extension.
|
|
118
|
-
* @param scene - The current scene.
|
|
119
|
-
* @returns Whether or not the current scene supports GroundPolylinePrimitives.
|
|
120
|
-
*/
|
|
121
|
-
static isSupported(scene: Scene): boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Returns true if this object was destroyed; otherwise, false.
|
|
124
|
-
* <p>
|
|
125
|
-
* If this object was destroyed, it should not be used; calling any function other than
|
|
126
|
-
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
127
|
-
* </p>
|
|
128
|
-
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
129
|
-
*/
|
|
130
|
-
isDestroyed(): boolean;
|
|
131
|
-
/**
|
|
132
|
-
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
133
|
-
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
134
|
-
* <p>
|
|
135
|
-
* Once an object is destroyed, it should not be used; calling any function other than
|
|
136
|
-
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
137
|
-
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
138
|
-
* </p>
|
|
139
|
-
* @example
|
|
140
|
-
* e = e && e.destroy();
|
|
141
|
-
*/
|
|
142
|
-
destroy(): void;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export default GroundPolylinePrimitive;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as Cesium from 'cesium';
|
|
2
|
-
import { XbsjRoutePath } from './XbsjRoutePath';
|
|
3
|
-
import { SceneObjectKey } from "earthsdk3";
|
|
4
|
-
|
|
5
|
-
export type XbsjPositionCallbackResultType = {
|
|
6
|
-
timeRatio: number;
|
|
7
|
-
repeat: number;
|
|
8
|
-
color: [number, number, number, number];
|
|
9
|
-
bgColor: [number, number, number, number];
|
|
10
|
-
bidirectional: 0 | 1 | 2 | 3; // 0/1表示单向,2表示双向, 3表示无信号
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export type XbsjODLinesPostionCallback = (
|
|
14
|
-
instanceIndex: number,
|
|
15
|
-
frameState: Cesium.FrameState,
|
|
16
|
-
result: XbsjPositionCallbackResultType,
|
|
17
|
-
) => XbsjPositionCallbackResultType;
|
|
18
|
-
|
|
19
|
-
export default function xbsjCreateODLinesPrimitive(
|
|
20
|
-
routePaths: XbsjRoutePath[],
|
|
21
|
-
color: [number, number, number, number],
|
|
22
|
-
arcType: Cesium.ArcType,
|
|
23
|
-
postionCallback: (instanceIndex: number, frameState: Cesium.FrameState | undefined, result: XbsjPositionCallbackResultType) => XbsjPositionCallbackResultType,
|
|
24
|
-
brightening?: boolean,
|
|
25
|
-
depthTest?: boolean,
|
|
26
|
-
getTextureFunc?: () => Cesium.Texture,
|
|
27
|
-
id?: SceneObjectKey
|
|
28
|
-
): Cesium.Primitive;
|
|
29
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as Cesium from 'cesium';
|
|
2
|
-
|
|
3
|
-
export declare class XbsjCameraVideo {
|
|
4
|
-
constructor(options: {
|
|
5
|
-
inverseViewMatrix: Cesium.Matrix4,
|
|
6
|
-
frustum: Cesium.PerspectiveFrustum,
|
|
7
|
-
// videoElement: HTMLVideoElement | string | undefined,
|
|
8
|
-
videoTextureFunc?: (() => Cesium.Texture | undefined) | undefined,
|
|
9
|
-
alphaTextureFunc?: (() => Cesium.Texture | undefined) | undefined,
|
|
10
|
-
showHelperPrimitive: true,
|
|
11
|
-
});
|
|
12
|
-
// videoElement: HTMLVideoElement | string | undefined;
|
|
13
|
-
// alphaImage: string;
|
|
14
|
-
videoTextureFunc: (() => Cesium.Texture | undefined) | undefined;
|
|
15
|
-
alphaTextureFunc: (() => Cesium.Texture | undefined) | undefined;
|
|
16
|
-
showHelperPrimitive: boolean;
|
|
17
|
-
destroy(): void;
|
|
18
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as Cesium from 'cesium';
|
|
2
|
-
|
|
3
|
-
export declare class XbsjViewshed {
|
|
4
|
-
constructor(scene: Cesium.Scene, id?: string);
|
|
5
|
-
enabled: boolean;
|
|
6
|
-
showHelper: boolean;
|
|
7
|
-
fovH: number;
|
|
8
|
-
fovV: number;
|
|
9
|
-
near: number;
|
|
10
|
-
far: number;
|
|
11
|
-
position: Cesium.Cartesian3;
|
|
12
|
-
heading: number;
|
|
13
|
-
pitch: number;
|
|
14
|
-
roll: number;
|
|
15
|
-
destroy(): void;
|
|
16
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as Cesium from 'cesium';
|
|
2
|
-
|
|
3
|
-
declare class SkyAtmosphere {
|
|
4
|
-
constructor(ellipsoid: Cesium.Ellipsoid | undefined, sources: {
|
|
5
|
-
positiveX: string;
|
|
6
|
-
negativeX: string;
|
|
7
|
-
positiveY: string;
|
|
8
|
-
negativeY: string;
|
|
9
|
-
positiveZ: string;
|
|
10
|
-
negativeZ: string;
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export = SkyAtmosphere;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as Cesium from 'cesium';
|
|
2
|
-
|
|
3
|
-
declare const GaussianSplatPipelineStage: {
|
|
4
|
-
name: string;
|
|
5
|
-
process: (
|
|
6
|
-
renderResources: any,
|
|
7
|
-
primitive: Cesium.Primitive,
|
|
8
|
-
frameState: Cesium.FrameState
|
|
9
|
-
) => void;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default GaussianSplatPipelineStage;
|