@vcmap/ui 5.0.0-rc.6 → 5.0.0-rc.7
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/README.md +3 -0
- package/config/aerowest.config.json +2 -1
- package/config/base.config.json +7 -7
- package/dist/assets/cesium/Workers/{AttributeCompression-27507afe.js → AttributeCompression-80665726.js} +1 -1
- package/dist/assets/cesium/Workers/{AxisAlignedBoundingBox-7565c1e8.js → AxisAlignedBoundingBox-a655a4bc.js} +1 -1
- package/dist/assets/cesium/Workers/{BoundingRectangle-9d707275.js → BoundingRectangle-c3b79029.js} +1 -1
- package/dist/assets/cesium/Workers/{BoxGeometry-fb31d3b5.js → BoxGeometry-f8f9c981.js} +1 -1
- package/dist/assets/cesium/Workers/{Color-56bb5728.js → Color-de06a177.js} +1 -1
- package/dist/assets/cesium/Workers/{CoplanarPolygonGeometryLibrary-72143c19.js → CoplanarPolygonGeometryLibrary-48cdc26d.js} +1 -1
- package/dist/assets/cesium/Workers/{CorridorGeometryLibrary-7bae1712.js → CorridorGeometryLibrary-ddc027d3.js} +1 -1
- package/dist/assets/cesium/Workers/{CylinderGeometry-331891fe.js → CylinderGeometry-82a8cbe6.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometry-5e3f67b6.js → EllipseGeometry-32d55454.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseGeometryLibrary-dbc15162.js → EllipseGeometryLibrary-b2ae188a.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipseOutlineGeometry-21191fce.js → EllipseOutlineGeometry-f05a5a27.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeodesic-cc3bace8.js → EllipsoidGeodesic-19e75e11.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidGeometry-8bfa24a9.js → EllipsoidGeometry-7c99fc81.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidOutlineGeometry-48d9c023.js → EllipsoidOutlineGeometry-21c243df.js} +1 -1
- package/dist/assets/cesium/Workers/{EllipsoidRhumbLine-125a8b72.js → EllipsoidRhumbLine-6145377b.js} +1 -1
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-a01286f6.js +1 -0
- package/dist/assets/cesium/Workers/{EncodedCartesian3-96fdc0ef.js → EncodedCartesian3-d9f5c4a4.js} +1 -1
- package/dist/assets/cesium/Workers/{FrustumGeometry-9ab86004.js → FrustumGeometry-17776af8.js} +1 -1
- package/dist/assets/cesium/Workers/GeometryAttribute-89a520b9.js +1 -0
- package/dist/assets/cesium/Workers/{GeometryInstance-13e4ff38.js → GeometryInstance-4fbf16ba.js} +1 -1
- package/dist/assets/cesium/Workers/{GeometryPipeline-e0eb4567.js → GeometryPipeline-309fad76.js} +1 -1
- package/dist/assets/cesium/Workers/IntersectionTests-58aa8f80.js +1 -0
- package/dist/assets/cesium/Workers/{Matrix2-37e55508.js → Matrix2-47e98d76.js} +0 -0
- package/dist/assets/cesium/Workers/{OrientedBoundingBox-e9c07538.js → OrientedBoundingBox-fcb5b750.js} +1 -1
- package/dist/assets/cesium/Workers/{Plane-6ee42cab.js → Plane-3f01019d.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonGeometryLibrary-b408c688.js → PolygonGeometryLibrary-0b29eb16.js} +1 -1
- package/dist/assets/cesium/Workers/{PolygonPipeline-7b8e4643.js → PolygonPipeline-a934c4dd.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylinePipeline-6757400c.js → PolylinePipeline-8095c9bc.js} +1 -1
- package/dist/assets/cesium/Workers/{PolylineVolumeGeometryLibrary-eb972210.js → PolylineVolumeGeometryLibrary-67d12fff.js} +1 -1
- package/dist/assets/cesium/Workers/{PrimitivePipeline-f244975e.js → PrimitivePipeline-980e44c5.js} +1 -1
- package/dist/assets/cesium/Workers/{RectangleGeometryLibrary-1bd6152a.js → RectangleGeometryLibrary-621c6de8.js} +1 -1
- package/dist/assets/cesium/Workers/{TerrainEncoding-5a21a97f.js → TerrainEncoding-f96552d5.js} +1 -1
- package/dist/assets/cesium/Workers/{Transforms-eb5c1a84.js → Transforms-c8cb8f43.js} +3 -3
- package/dist/assets/cesium/Workers/{WallGeometryLibrary-a6b6a368.js → WallGeometryLibrary-c03d8479.js} +1 -1
- package/dist/assets/cesium/Workers/{WebMercatorProjection-2839e524.js → WebMercatorProjection-79b3214e.js} +1 -1
- package/dist/assets/cesium/Workers/combineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +1 -1
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +1 -1
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/dist/assets/cesium/Workers/createWallGeometry.js +1 -1
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/dist/assets/{cesium.fba8ca.js → cesium.2a963a.js} +955 -968
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core.ba64c8.js +4 -0
- package/dist/assets/core.js +1 -1
- package/dist/assets/{index.6a83278e.js → index.83d29643.js} +1 -1
- package/dist/assets/{ol.abea3a.js → ol.5c9201.js} +0 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui.c4abb7.css +1 -0
- package/dist/assets/ui.c4abb7.js +39 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/uicomponents.5e36c1.css +1 -0
- package/dist/assets/uicomponents.5e36c1.js +32 -0
- package/dist/assets/uicomponents.js +1 -1
- package/dist/assets/{vue-composition-api.7051d7.js → vue-composition-api.ff8a0e.js} +1 -1
- package/dist/assets/vue-composition-api.js +2 -2
- package/dist/assets/{vue.9fd7f6.js → vue.f0d3bf.js} +0 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify.33dafc.css → vuetify.69b350.css} +1 -1
- package/dist/assets/{vuetify.33dafc.js → vuetify.69b350.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/src/actions/actionHelper.js +39 -0
- package/src/application/Navbar.vue +32 -3
- package/src/application/VcsApp.vue +3 -1
- package/src/application/VcsMap.vue +1 -20
- package/src/manager/buttonManager.js +2 -1
- package/src/manager/window/WindowComponent.vue +27 -20
- package/src/manager/window/WindowComponentHeader.vue +13 -6
- package/src/navigation/mapNavigation.vue +26 -1
- package/src/navigation/overviewMap.js +616 -0
- package/src/navigation/overviewMapClickedInteraction.js +38 -0
- package/src/vcsUiApp.js +14 -0
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-678e34e4.js +0 -1
- package/dist/assets/cesium/Workers/GeometryAttribute-3915ea0b.js +0 -1
- package/dist/assets/cesium/Workers/IntersectionTests-ac2459de.js +0 -1
- package/dist/assets/core.d5ed0f.js +0 -4
- package/dist/assets/ui.ad1ec9.css +0 -1
- package/dist/assets/ui.ad1ec9.js +0 -39
- package/dist/assets/uicomponents.161461.css +0 -1
- package/dist/assets/uicomponents.161461.js +0 -31
package/README.md
CHANGED
@@ -63,6 +63,9 @@ Example Template to show how to integrate the @vcmap/ui in a webpack5 project.
|
|
63
63
|
### [@vcmap/core demo](https://github.com/virtualcitySYSTEMS/map-core-demo)
|
64
64
|
Example demo Application based on the @vcmap/core, shows how to implement a different UI on top of the @vcmap/core
|
65
65
|
|
66
|
+
## Component Diagram
|
67
|
+

|
68
|
+
|
66
69
|
# Project and Component Status
|
67
70
|
The Project is currently in Alpha status. Different components have different states. For development check here
|
68
71
|
how safe it is to start developing with these components.
|
@@ -170,7 +170,8 @@
|
|
170
170
|
],
|
171
171
|
"properties": {
|
172
172
|
"title": "TopPlus",
|
173
|
-
"infoUrl": "https://sg.geodatenzentrum.de/web_public/Datenquellen_TopPlus_Open.pdf"
|
173
|
+
"infoUrl": "https://sg.geodatenzentrum.de/web_public/Datenquellen_TopPlus_Open.pdf",
|
174
|
+
"showInOverviewMap": true
|
174
175
|
}
|
175
176
|
},
|
176
177
|
{
|
package/config/base.config.json
CHANGED
@@ -491,6 +491,10 @@
|
|
491
491
|
}
|
492
492
|
],
|
493
493
|
"maps": [
|
494
|
+
{
|
495
|
+
"type": "OpenlayersMap",
|
496
|
+
"name": "ol3"
|
497
|
+
},
|
494
498
|
{
|
495
499
|
"type": "CesiumMap",
|
496
500
|
"name": "cesium",
|
@@ -506,10 +510,6 @@
|
|
506
510
|
"fogScreenSpaceError": 2,
|
507
511
|
"fogScreenSpaceErrorMobile": 4
|
508
512
|
},
|
509
|
-
{
|
510
|
-
"type": "OpenlayersMap",
|
511
|
-
"name": "ol3"
|
512
|
-
},
|
513
513
|
{
|
514
514
|
"name": "Oblique Map",
|
515
515
|
"showObliqueImageName": true,
|
@@ -684,7 +684,8 @@
|
|
684
684
|
"en": "OpenStreetMap",
|
685
685
|
"de": "OpenStreetMap",
|
686
686
|
"pl": "OpenStreetMap"
|
687
|
-
}
|
687
|
+
},
|
688
|
+
"showInOverviewMap": true
|
688
689
|
}
|
689
690
|
},
|
690
691
|
{
|
@@ -1028,8 +1029,7 @@
|
|
1028
1029
|
"Bäume",
|
1029
1030
|
"terrain_v3.4"
|
1030
1031
|
],
|
1031
|
-
"title": "Buildings - Trees - Terrain"
|
1032
|
-
"icon": "msi-group"
|
1032
|
+
"title": "Buildings - Trees - Terrain"
|
1033
1033
|
},
|
1034
1034
|
{
|
1035
1035
|
"name": "berlin_obliques",
|
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./Matrix2-
|
1
|
+
define(["exports","./Matrix2-47e98d76","./ComponentDatatype-a15c9a19","./RuntimeError-8952249c","./defaultValue-81eec7ed"],(function(t,e,n,o,a){"use strict";const r={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",getMathType:function(t){switch(t){case r.SCALAR:return Number;case r.VEC2:return e.Cartesian2;case r.VEC3:return e.Cartesian3;case r.VEC4:return e.Cartesian4;case r.MAT2:return e.Matrix2;case r.MAT3:return e.Matrix3;case r.MAT4:return e.Matrix4}},getNumberOfComponents:function(t){switch(t){case r.SCALAR:return 1;case r.VEC2:return 2;case r.VEC3:return 3;case r.VEC4:case r.MAT2:return 4;case r.MAT3:return 9;case r.MAT4:return 16}},getAttributeLocationCount:function(t){switch(t){case r.SCALAR:case r.VEC2:case r.VEC3:case r.VEC4:return 1;case r.MAT2:return 2;case r.MAT3:return 3;case r.MAT4:return 4}},getGlslType:function(t){switch(t){case r.SCALAR:return"float";case r.VEC2:return"vec2";case r.VEC3:return"vec3";case r.VEC4:return"vec4";case r.MAT2:return"mat2";case r.MAT3:return"mat3";case r.MAT4:return"mat4"}}};var c=Object.freeze(r);const s=1/256,u={octEncodeInRange:function(t,e,o){if(o.x=t.x/(Math.abs(t.x)+Math.abs(t.y)+Math.abs(t.z)),o.y=t.y/(Math.abs(t.x)+Math.abs(t.y)+Math.abs(t.z)),t.z<0){const t=o.x,e=o.y;o.x=(1-Math.abs(e))*n.CesiumMath.signNotZero(t),o.y=(1-Math.abs(t))*n.CesiumMath.signNotZero(e)}return o.x=n.CesiumMath.toSNorm(o.x,e),o.y=n.CesiumMath.toSNorm(o.y,e),o},octEncode:function(t,e){return u.octEncodeInRange(t,255,e)}},i=new e.Cartesian2,C=new Uint8Array(1);function M(t){return C[0]=t,C[0]}u.octEncodeToCartesian4=function(t,e){return u.octEncodeInRange(t,65535,i),e.x=M(i.x*s),e.y=M(i.x),e.z=M(i.y*s),e.w=M(i.y),e},u.octDecodeInRange=function(t,o,a,r){if(r.x=n.CesiumMath.fromSNorm(t,a),r.y=n.CesiumMath.fromSNorm(o,a),r.z=1-(Math.abs(r.x)+Math.abs(r.y)),r.z<0){const t=r.x;r.x=(1-Math.abs(r.y))*n.CesiumMath.signNotZero(t),r.y=(1-Math.abs(t))*n.CesiumMath.signNotZero(r.y)}return e.Cartesian3.normalize(r,r)},u.octDecode=function(t,e,n){return u.octDecodeInRange(t,e,255,n)},u.octDecodeFromCartesian4=function(t,e){const n=256*t.x+t.y,o=256*t.z+t.w;return u.octDecodeInRange(n,o,65535,e)},u.octPackFloat=function(t){return 256*t.x+t.y};const f=new e.Cartesian2;function m(t){return t>>1^-(1&t)}u.octEncodeFloat=function(t){return u.octEncode(t,f),u.octPackFloat(f)},u.octDecodeFloat=function(t,e){const n=t/256,o=Math.floor(n),a=256*(n-o);return u.octDecode(o,a,e)},u.octPack=function(t,e,n,o){const a=u.octEncodeFloat(t),r=u.octEncodeFloat(e),c=u.octEncode(n,f);return o.x=65536*c.x+a,o.y=65536*c.y+r,o},u.octUnpack=function(t,e,n,o){let a=t.x/65536;const r=Math.floor(a),c=65536*(a-r);a=t.y/65536;const s=Math.floor(a),i=65536*(a-s);u.octDecodeFloat(c,e),u.octDecodeFloat(i,n),u.octDecode(r,s,o)},u.compressTextureCoordinates=function(t){return 4096*(4095*t.x|0)+(4095*t.y|0)},u.decompressTextureCoordinates=function(t,e){const n=t/4096,o=Math.floor(n);return e.x=o/4095,e.y=(t-4096*o)/4095,e},u.zigZagDeltaDecode=function(t,e,n){const o=t.length;let r=0,c=0,s=0;for(let u=0;u<o;++u)r+=m(t[u]),c+=m(e[u]),t[u]=r,e[u]=c,a.defined(n)&&(s+=m(n[u]),n[u]=s)},u.dequantize=function(t,e,o,a){const r=c.getNumberOfComponents(o);let s;switch(e){case n.ComponentDatatype.BYTE:s=127;break;case n.ComponentDatatype.UNSIGNED_BYTE:s=255;break;case n.ComponentDatatype.SHORT:s=32767;break;case n.ComponentDatatype.UNSIGNED_SHORT:s=65535;break;case n.ComponentDatatype.INT:s=2147483647;break;case n.ComponentDatatype.UNSIGNED_INT:s=4294967295}const u=new Float32Array(a*r);for(let e=0;e<a;e++)for(let n=0;n<r;n++){const o=e*r+n;u[o]=Math.max(t[o]/s,-1)}return u},u.decodeRGB565=function(t,e){const n=t.length;a.defined(e)||(e=new Float32Array(3*n));const o=1/31;for(let a=0;a<n;a++){const n=t[a],r=n>>11,c=n>>5&63,s=31&n,u=3*a;e[u]=r*o,e[u+1]=.015873015873015872*c,e[u+2]=s*o}return e},t.AttributeCompression=u}));
|
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./Matrix2-
|
1
|
+
define(["exports","./Matrix2-47e98d76","./RuntimeError-8952249c","./defaultValue-81eec7ed","./Transforms-c8cb8f43"],(function(e,n,t,i,a){"use strict";function m(e,t,a){this.minimum=n.Cartesian3.clone(i.defaultValue(e,n.Cartesian3.ZERO)),this.maximum=n.Cartesian3.clone(i.defaultValue(t,n.Cartesian3.ZERO)),a=i.defined(a)?n.Cartesian3.clone(a):n.Cartesian3.midpoint(this.minimum,this.maximum,new n.Cartesian3),this.center=a}m.fromCorners=function(e,t,a){return i.defined(a)||(a=new m),a.minimum=n.Cartesian3.clone(e,a.minimum),a.maximum=n.Cartesian3.clone(t,a.maximum),a.center=n.Cartesian3.midpoint(e,t,a.center),a},m.fromPoints=function(e,t){if(i.defined(t)||(t=new m),!i.defined(e)||0===e.length)return t.minimum=n.Cartesian3.clone(n.Cartesian3.ZERO,t.minimum),t.maximum=n.Cartesian3.clone(n.Cartesian3.ZERO,t.maximum),t.center=n.Cartesian3.clone(n.Cartesian3.ZERO,t.center),t;let a=e[0].x,r=e[0].y,s=e[0].z,u=e[0].x,c=e[0].y,o=e[0].z;const l=e.length;for(let n=1;n<l;n++){const t=e[n],i=t.x,m=t.y,l=t.z;a=Math.min(i,a),u=Math.max(i,u),r=Math.min(m,r),c=Math.max(m,c),s=Math.min(l,s),o=Math.max(l,o)}const d=t.minimum;d.x=a,d.y=r,d.z=s;const f=t.maximum;return f.x=u,f.y=c,f.z=o,t.center=n.Cartesian3.midpoint(d,f,t.center),t},m.clone=function(e,t){if(i.defined(e))return i.defined(t)?(t.minimum=n.Cartesian3.clone(e.minimum,t.minimum),t.maximum=n.Cartesian3.clone(e.maximum,t.maximum),t.center=n.Cartesian3.clone(e.center,t.center),t):new m(e.minimum,e.maximum,e.center)},m.equals=function(e,t){return e===t||i.defined(e)&&i.defined(t)&&n.Cartesian3.equals(e.center,t.center)&&n.Cartesian3.equals(e.minimum,t.minimum)&&n.Cartesian3.equals(e.maximum,t.maximum)};let r=new n.Cartesian3;m.intersectPlane=function(e,t){r=n.Cartesian3.subtract(e.maximum,e.minimum,r);const i=n.Cartesian3.multiplyByScalar(r,.5,r),m=t.normal,s=i.x*Math.abs(m.x)+i.y*Math.abs(m.y)+i.z*Math.abs(m.z),u=n.Cartesian3.dot(e.center,m)+t.distance;return u-s>0?a.Intersect.INSIDE:u+s<0?a.Intersect.OUTSIDE:a.Intersect.INTERSECTING},m.prototype.clone=function(e){return m.clone(this,e)},m.prototype.intersectPlane=function(e){return m.intersectPlane(this,e)},m.prototype.equals=function(e){return m.equals(this,e)},e.AxisAlignedBoundingBox=m}));
|
package/dist/assets/cesium/Workers/{BoundingRectangle-9d707275.js → BoundingRectangle-c3b79029.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./Matrix2-
|
1
|
+
define(["exports","./Matrix2-47e98d76","./RuntimeError-8952249c","./defaultValue-81eec7ed","./Transforms-c8cb8f43"],(function(t,e,n,i,h){"use strict";function r(t,e,n,h){this.x=i.defaultValue(t,0),this.y=i.defaultValue(e,0),this.width=i.defaultValue(n,0),this.height=i.defaultValue(h,0)}r.packedLength=4,r.pack=function(t,e,n){return n=i.defaultValue(n,0),e[n++]=t.x,e[n++]=t.y,e[n++]=t.width,e[n]=t.height,e},r.unpack=function(t,e,n){return e=i.defaultValue(e,0),i.defined(n)||(n=new r),n.x=t[e++],n.y=t[e++],n.width=t[e++],n.height=t[e],n},r.fromPoints=function(t,e){if(i.defined(e)||(e=new r),!i.defined(t)||0===t.length)return e.x=0,e.y=0,e.width=0,e.height=0,e;const n=t.length;let h=t[0].x,d=t[0].y,u=t[0].x,a=t[0].y;for(let e=1;e<n;e++){const n=t[e],i=n.x,r=n.y;h=Math.min(i,h),u=Math.max(i,u),d=Math.min(r,d),a=Math.max(r,a)}return e.x=h,e.y=d,e.width=u-h,e.height=a-d,e};const d=new h.GeographicProjection,u=new e.Cartographic,a=new e.Cartographic;r.fromRectangle=function(t,n,h){if(i.defined(h)||(h=new r),!i.defined(t))return h.x=0,h.y=0,h.width=0,h.height=0,h;const c=(n=i.defaultValue(n,d)).project(e.Rectangle.southwest(t,u)),o=n.project(e.Rectangle.northeast(t,a));return e.Cartesian2.subtract(o,c,o),h.x=c.x,h.y=c.y,h.width=o.x,h.height=o.y,h},r.clone=function(t,e){if(i.defined(t))return i.defined(e)?(e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e):new r(t.x,t.y,t.width,t.height)},r.union=function(t,e,n){i.defined(n)||(n=new r);const h=Math.min(t.x,e.x),d=Math.min(t.y,e.y),u=Math.max(t.x+t.width,e.x+e.width),a=Math.max(t.y+t.height,e.y+e.height);return n.x=h,n.y=d,n.width=u-h,n.height=a-d,n},r.expand=function(t,e,n){n=r.clone(t,n);const i=e.x-n.x,h=e.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=e.x),h>n.height?n.height=h:h<0&&(n.height-=h,n.y=e.y),n},r.intersect=function(t,e){const n=t.x,i=t.y,r=e.x,d=e.y;return n>r+e.width||n+t.width<r||i+t.height<d||i>d+e.height?h.Intersect.OUTSIDE:h.Intersect.INTERSECTING},r.equals=function(t,e){return t===e||i.defined(t)&&i.defined(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},r.prototype.clone=function(t){return r.clone(this,t)},r.prototype.intersect=function(t){return r.intersect(this,t)},r.prototype.equals=function(t){return r.equals(this,t)},t.BoundingRectangle=r}));
|
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-
|
1
|
+
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-c8cb8f43","./Matrix2-47e98d76","./RuntimeError-8952249c","./ComponentDatatype-a15c9a19","./defaultValue-81eec7ed","./GeometryAttribute-89a520b9","./GeometryAttributes-32b29525","./VertexFormat-a0b706b0"],(function(t,e,n,a,r,i,o,m,u,s){"use strict";const y=new a.Cartesian3;function c(t){const e=(t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT)).minimum,n=t.maximum,r=o.defaultValue(t.vertexFormat,s.VertexFormat.DEFAULT);this._minimum=a.Cartesian3.clone(e),this._maximum=a.Cartesian3.clone(n),this._vertexFormat=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createBoxGeometry"}c.fromDimensions=function(t){const e=(t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT)).dimensions,n=a.Cartesian3.multiplyByScalar(e,.5,new a.Cartesian3);return new c({minimum:a.Cartesian3.negate(n,new a.Cartesian3),maximum:n,vertexFormat:t.vertexFormat,offsetAttribute:t.offsetAttribute})},c.fromAxisAlignedBoundingBox=function(t){return new c({minimum:t.minimum,maximum:t.maximum})},c.packedLength=2*a.Cartesian3.packedLength+s.VertexFormat.packedLength+1,c.pack=function(t,e,n){return n=o.defaultValue(n,0),a.Cartesian3.pack(t._minimum,e,n),a.Cartesian3.pack(t._maximum,e,n+a.Cartesian3.packedLength),s.VertexFormat.pack(t._vertexFormat,e,n+2*a.Cartesian3.packedLength),e[n+2*a.Cartesian3.packedLength+s.VertexFormat.packedLength]=o.defaultValue(t._offsetAttribute,-1),e};const p=new a.Cartesian3,x=new a.Cartesian3,f=new s.VertexFormat,l={minimum:p,maximum:x,vertexFormat:f,offsetAttribute:void 0};let A;c.unpack=function(t,e,n){e=o.defaultValue(e,0);const r=a.Cartesian3.unpack(t,e,p),i=a.Cartesian3.unpack(t,e+a.Cartesian3.packedLength,x),m=s.VertexFormat.unpack(t,e+2*a.Cartesian3.packedLength,f),u=t[e+2*a.Cartesian3.packedLength+s.VertexFormat.packedLength];return o.defined(n)?(n._minimum=a.Cartesian3.clone(r,n._minimum),n._maximum=a.Cartesian3.clone(i,n._maximum),n._vertexFormat=s.VertexFormat.clone(m,n._vertexFormat),n._offsetAttribute=-1===u?void 0:u,n):(l.offsetAttribute=-1===u?void 0:u,new c(l))},c.createGeometry=function(t){const r=t._minimum,s=t._maximum,c=t._vertexFormat;if(a.Cartesian3.equals(r,s))return;const p=new u.GeometryAttributes;let x,f;if(c.position&&(c.st||c.normal||c.tangent||c.bitangent)){if(c.position&&(f=new Float64Array(72),f[0]=r.x,f[1]=r.y,f[2]=s.z,f[3]=s.x,f[4]=r.y,f[5]=s.z,f[6]=s.x,f[7]=s.y,f[8]=s.z,f[9]=r.x,f[10]=s.y,f[11]=s.z,f[12]=r.x,f[13]=r.y,f[14]=r.z,f[15]=s.x,f[16]=r.y,f[17]=r.z,f[18]=s.x,f[19]=s.y,f[20]=r.z,f[21]=r.x,f[22]=s.y,f[23]=r.z,f[24]=s.x,f[25]=r.y,f[26]=r.z,f[27]=s.x,f[28]=s.y,f[29]=r.z,f[30]=s.x,f[31]=s.y,f[32]=s.z,f[33]=s.x,f[34]=r.y,f[35]=s.z,f[36]=r.x,f[37]=r.y,f[38]=r.z,f[39]=r.x,f[40]=s.y,f[41]=r.z,f[42]=r.x,f[43]=s.y,f[44]=s.z,f[45]=r.x,f[46]=r.y,f[47]=s.z,f[48]=r.x,f[49]=s.y,f[50]=r.z,f[51]=s.x,f[52]=s.y,f[53]=r.z,f[54]=s.x,f[55]=s.y,f[56]=s.z,f[57]=r.x,f[58]=s.y,f[59]=s.z,f[60]=r.x,f[61]=r.y,f[62]=r.z,f[63]=s.x,f[64]=r.y,f[65]=r.z,f[66]=s.x,f[67]=r.y,f[68]=s.z,f[69]=r.x,f[70]=r.y,f[71]=s.z,p.position=new m.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f})),c.normal){const t=new Float32Array(72);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,t[12]=0,t[13]=0,t[14]=-1,t[15]=0,t[16]=0,t[17]=-1,t[18]=0,t[19]=0,t[20]=-1,t[21]=0,t[22]=0,t[23]=-1,t[24]=1,t[25]=0,t[26]=0,t[27]=1,t[28]=0,t[29]=0,t[30]=1,t[31]=0,t[32]=0,t[33]=1,t[34]=0,t[35]=0,t[36]=-1,t[37]=0,t[38]=0,t[39]=-1,t[40]=0,t[41]=0,t[42]=-1,t[43]=0,t[44]=0,t[45]=-1,t[46]=0,t[47]=0,t[48]=0,t[49]=1,t[50]=0,t[51]=0,t[52]=1,t[53]=0,t[54]=0,t[55]=1,t[56]=0,t[57]=0,t[58]=1,t[59]=0,t[60]=0,t[61]=-1,t[62]=0,t[63]=0,t[64]=-1,t[65]=0,t[66]=0,t[67]=-1,t[68]=0,t[69]=0,t[70]=-1,t[71]=0,p.normal=new m.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(c.st){const t=new Float32Array(48);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,t[8]=1,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=1,t[14]=1,t[15]=1,t[16]=0,t[17]=0,t[18]=1,t[19]=0,t[20]=1,t[21]=1,t[22]=0,t[23]=1,t[24]=1,t[25]=0,t[26]=0,t[27]=0,t[28]=0,t[29]=1,t[30]=1,t[31]=1,t[32]=1,t[33]=0,t[34]=0,t[35]=0,t[36]=0,t[37]=1,t[38]=1,t[39]=1,t[40]=0,t[41]=0,t[42]=1,t[43]=0,t[44]=1,t[45]=1,t[46]=0,t[47]=1,p.st=new m.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:t})}if(c.tangent){const t=new Float32Array(72);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,t[12]=-1,t[13]=0,t[14]=0,t[15]=-1,t[16]=0,t[17]=0,t[18]=-1,t[19]=0,t[20]=0,t[21]=-1,t[22]=0,t[23]=0,t[24]=0,t[25]=1,t[26]=0,t[27]=0,t[28]=1,t[29]=0,t[30]=0,t[31]=1,t[32]=0,t[33]=0,t[34]=1,t[35]=0,t[36]=0,t[37]=-1,t[38]=0,t[39]=0,t[40]=-1,t[41]=0,t[42]=0,t[43]=-1,t[44]=0,t[45]=0,t[46]=-1,t[47]=0,t[48]=-1,t[49]=0,t[50]=0,t[51]=-1,t[52]=0,t[53]=0,t[54]=-1,t[55]=0,t[56]=0,t[57]=-1,t[58]=0,t[59]=0,t[60]=1,t[61]=0,t[62]=0,t[63]=1,t[64]=0,t[65]=0,t[66]=1,t[67]=0,t[68]=0,t[69]=1,t[70]=0,t[71]=0,p.tangent=new m.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}if(c.bitangent){const t=new Float32Array(72);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=1,t[14]=0,t[15]=0,t[16]=1,t[17]=0,t[18]=0,t[19]=1,t[20]=0,t[21]=0,t[22]=1,t[23]=0,t[24]=0,t[25]=0,t[26]=1,t[27]=0,t[28]=0,t[29]=1,t[30]=0,t[31]=0,t[32]=1,t[33]=0,t[34]=0,t[35]=1,t[36]=0,t[37]=0,t[38]=1,t[39]=0,t[40]=0,t[41]=1,t[42]=0,t[43]=0,t[44]=1,t[45]=0,t[46]=0,t[47]=1,t[48]=0,t[49]=0,t[50]=1,t[51]=0,t[52]=0,t[53]=1,t[54]=0,t[55]=0,t[56]=1,t[57]=0,t[58]=0,t[59]=1,t[60]=0,t[61]=0,t[62]=1,t[63]=0,t[64]=0,t[65]=1,t[66]=0,t[67]=0,t[68]=1,t[69]=0,t[70]=0,t[71]=1,p.bitangent=new m.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}x=new Uint16Array(36),x[0]=0,x[1]=1,x[2]=2,x[3]=0,x[4]=2,x[5]=3,x[6]=6,x[7]=5,x[8]=4,x[9]=7,x[10]=6,x[11]=4,x[12]=8,x[13]=9,x[14]=10,x[15]=8,x[16]=10,x[17]=11,x[18]=14,x[19]=13,x[20]=12,x[21]=15,x[22]=14,x[23]=12,x[24]=18,x[25]=17,x[26]=16,x[27]=19,x[28]=18,x[29]=16,x[30]=20,x[31]=21,x[32]=22,x[33]=20,x[34]=22,x[35]=23}else f=new Float64Array(24),f[0]=r.x,f[1]=r.y,f[2]=r.z,f[3]=s.x,f[4]=r.y,f[5]=r.z,f[6]=s.x,f[7]=s.y,f[8]=r.z,f[9]=r.x,f[10]=s.y,f[11]=r.z,f[12]=r.x,f[13]=r.y,f[14]=s.z,f[15]=s.x,f[16]=r.y,f[17]=s.z,f[18]=s.x,f[19]=s.y,f[20]=s.z,f[21]=r.x,f[22]=s.y,f[23]=s.z,p.position=new m.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f}),x=new Uint16Array(36),x[0]=4,x[1]=5,x[2]=6,x[3]=4,x[4]=6,x[5]=7,x[6]=1,x[7]=0,x[8]=3,x[9]=1,x[10]=3,x[11]=2,x[12]=1,x[13]=6,x[14]=5,x[15]=1,x[16]=2,x[17]=6,x[18]=2,x[19]=3,x[20]=7,x[21]=2,x[22]=7,x[23]=6,x[24]=3,x[25]=0,x[26]=4,x[27]=3,x[28]=4,x[29]=7,x[30]=0,x[31]=1,x[32]=5,x[33]=0,x[34]=5,x[35]=4;const l=a.Cartesian3.subtract(s,r,y),A=.5*a.Cartesian3.magnitude(l);if(o.defined(t._offsetAttribute)){const n=f.length,a=new Uint8Array(n/3),r=t._offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;e.arrayFill(a,r),p.applyOffset=new m.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return new m.Geometry({attributes:p,indices:x,primitiveType:m.PrimitiveType.TRIANGLES,boundingSphere:new n.BoundingSphere(a.Cartesian3.ZERO,A),offsetAttribute:t._offsetAttribute})},c.getUnitBox=function(){return o.defined(A)||(A=c.createGeometry(c.fromDimensions({dimensions:new a.Cartesian3(1,1,1),vertexFormat:s.VertexFormat.POSITION_ONLY}))),A},t.BoxGeometry=c}));
|
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./RuntimeError-8952249c","./defaultValue-81eec7ed","./Transforms-eb5c1a84","./ComponentDatatype-a15c9a19"],(function(e,r,t,o,f){"use strict";function s(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),6*t<1?e+6*(r-e)*t:2*t<1?r:3*t<2?e+(r-e)*(2/3-t)*6:e}function n(e,r,o,f){this.red=t.defaultValue(e,1),this.green=t.defaultValue(r,1),this.blue=t.defaultValue(o,1),this.alpha=t.defaultValue(f,1)}let l,C,i;n.fromCartesian4=function(e,r){return t.defined(r)?(r.red=e.x,r.green=e.y,r.blue=e.z,r.alpha=e.w,r):new n(e.x,e.y,e.z,e.w)},n.fromBytes=function(e,r,o,f,s){return e=n.byteToFloat(t.defaultValue(e,255)),r=n.byteToFloat(t.defaultValue(r,255)),o=n.byteToFloat(t.defaultValue(o,255)),f=n.byteToFloat(t.defaultValue(f,255)),t.defined(s)?(s.red=e,s.green=r,s.blue=o,s.alpha=f,s):new n(e,r,o,f)},n.fromAlpha=function(e,r,o){return t.defined(o)?(o.red=e.red,o.green=e.green,o.blue=e.blue,o.alpha=r,o):new n(e.red,e.green,e.blue,r)},o.FeatureDetection.supportsTypedArrays()&&(l=new ArrayBuffer(4),C=new Uint32Array(l),i=new Uint8Array(l)),n.fromRgba=function(e,r){return C[0]=e,n.fromBytes(i[0],i[1],i[2],i[3],r)},n.fromHsl=function(e,r,o,f,l){e=t.defaultValue(e,0)%1,r=t.defaultValue(r,0),o=t.defaultValue(o,0),f=t.defaultValue(f,1);let C=o,i=o,a=o;if(0!==r){let t;t=o<.5?o*(1+r):o+r-o*r;const f=2*o-t;C=s(f,t,e+1/3),i=s(f,t,e),a=s(f,t,e-1/3)}return t.defined(l)?(l.red=C,l.green=i,l.blue=a,l.alpha=f,l):new n(C,i,a,f)},n.fromRandom=function(e,r){let o=(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).red;if(!t.defined(o)){const r=t.defaultValue(e.minimumRed,0),s=t.defaultValue(e.maximumRed,1);o=r+f.CesiumMath.nextRandomNumber()*(s-r)}let s=e.green;if(!t.defined(s)){const r=t.defaultValue(e.minimumGreen,0),o=t.defaultValue(e.maximumGreen,1);s=r+f.CesiumMath.nextRandomNumber()*(o-r)}let l=e.blue;if(!t.defined(l)){const r=t.defaultValue(e.minimumBlue,0),o=t.defaultValue(e.maximumBlue,1);l=r+f.CesiumMath.nextRandomNumber()*(o-r)}let C=e.alpha;if(!t.defined(C)){const r=t.defaultValue(e.minimumAlpha,0),o=t.defaultValue(e.maximumAlpha,1);C=r+f.CesiumMath.nextRandomNumber()*(o-r)}return t.defined(r)?(r.red=o,r.green=s,r.blue=l,r.alpha=C,r):new n(o,s,l,C)};const a=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,E=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,u=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,b=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;n.fromCssColorString=function(e,r){t.defined(r)||(r=new n);const o=n[(e=e.replace(/\s/g,"")).toUpperCase()];if(t.defined(o))return n.clone(o,r),r;let f=a.exec(e);return null!==f?(r.red=parseInt(f[1],16)/15,r.green=parseInt(f[2],16)/15,r.blue=parseInt(f[3],16)/15,r.alpha=parseInt(t.defaultValue(f[4],"f"),16)/15,r):(f=E.exec(e),null!==f?(r.red=parseInt(f[1],16)/255,r.green=parseInt(f[2],16)/255,r.blue=parseInt(f[3],16)/255,r.alpha=parseInt(t.defaultValue(f[4],"ff"),16)/255,r):(f=u.exec(e),null!==f?(r.red=parseFloat(f[1])/("%"===f[1].substr(-1)?100:255),r.green=parseFloat(f[2])/("%"===f[2].substr(-1)?100:255),r.blue=parseFloat(f[3])/("%"===f[3].substr(-1)?100:255),r.alpha=parseFloat(t.defaultValue(f[4],"1.0")),r):(f=b.exec(e),null!==f?n.fromHsl(parseFloat(f[1])/360,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(t.defaultValue(f[4],"1.0")),r):r=void 0)))},n.packedLength=4,n.pack=function(e,r,o){return o=t.defaultValue(o,0),r[o++]=e.red,r[o++]=e.green,r[o++]=e.blue,r[o]=e.alpha,r},n.unpack=function(e,r,o){return r=t.defaultValue(r,0),t.defined(o)||(o=new n),o.red=e[r++],o.green=e[r++],o.blue=e[r++],o.alpha=e[r],o},n.byteToFloat=function(e){return e/255},n.floatToByte=function(e){return 1===e?255:256*e|0},n.clone=function(e,r){if(t.defined(e))return t.defined(r)?(r.red=e.red,r.green=e.green,r.blue=e.blue,r.alpha=e.alpha,r):new n(e.red,e.green,e.blue,e.alpha)},n.equals=function(e,r){return e===r||t.defined(e)&&t.defined(r)&&e.red===r.red&&e.green===r.green&&e.blue===r.blue&&e.alpha===r.alpha},n.equalsArray=function(e,r,t){return e.red===r[t]&&e.green===r[t+1]&&e.blue===r[t+2]&&e.alpha===r[t+3]},n.prototype.clone=function(e){return n.clone(this,e)},n.prototype.equals=function(e){return n.equals(this,e)},n.prototype.equalsEpsilon=function(e,r){return this===e||t.defined(e)&&Math.abs(this.red-e.red)<=r&&Math.abs(this.green-e.green)<=r&&Math.abs(this.blue-e.blue)<=r&&Math.abs(this.alpha-e.alpha)<=r},n.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`},n.prototype.toCssColorString=function(){const e=n.floatToByte(this.red),r=n.floatToByte(this.green),t=n.floatToByte(this.blue);return 1===this.alpha?`rgb(${e},${r},${t})`:`rgba(${e},${r},${t},${this.alpha})`},n.prototype.toCssHexString=function(){let e=n.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let r=n.floatToByte(this.green).toString(16);r.length<2&&(r=`0${r}`);let t=n.floatToByte(this.blue).toString(16);if(t.length<2&&(t=`0${t}`),this.alpha<1){let o=n.floatToByte(this.alpha).toString(16);return o.length<2&&(o=`0${o}`),`#${e}${r}${t}${o}`}return`#${e}${r}${t}`},n.prototype.toBytes=function(e){const r=n.floatToByte(this.red),o=n.floatToByte(this.green),f=n.floatToByte(this.blue),s=n.floatToByte(this.alpha);return t.defined(e)?(e[0]=r,e[1]=o,e[2]=f,e[3]=s,e):[r,o,f,s]},n.prototype.toRgba=function(){return i[0]=n.floatToByte(this.red),i[1]=n.floatToByte(this.green),i[2]=n.floatToByte(this.blue),i[3]=n.floatToByte(this.alpha),C[0]},n.prototype.brighten=function(e,r){return e=1-e,r.red=1-(1-this.red)*e,r.green=1-(1-this.green)*e,r.blue=1-(1-this.blue)*e,r.alpha=this.alpha,r},n.prototype.darken=function(e,r){return e=1-e,r.red=this.red*e,r.green=this.green*e,r.blue=this.blue*e,r.alpha=this.alpha,r},n.prototype.withAlpha=function(e,r){return n.fromAlpha(this,e,r)},n.add=function(e,r,t){return t.red=e.red+r.red,t.green=e.green+r.green,t.blue=e.blue+r.blue,t.alpha=e.alpha+r.alpha,t},n.subtract=function(e,r,t){return t.red=e.red-r.red,t.green=e.green-r.green,t.blue=e.blue-r.blue,t.alpha=e.alpha-r.alpha,t},n.multiply=function(e,r,t){return t.red=e.red*r.red,t.green=e.green*r.green,t.blue=e.blue*r.blue,t.alpha=e.alpha*r.alpha,t},n.divide=function(e,r,t){return t.red=e.red/r.red,t.green=e.green/r.green,t.blue=e.blue/r.blue,t.alpha=e.alpha/r.alpha,t},n.mod=function(e,r,t){return t.red=e.red%r.red,t.green=e.green%r.green,t.blue=e.blue%r.blue,t.alpha=e.alpha%r.alpha,t},n.lerp=function(e,r,t,o){return o.red=f.CesiumMath.lerp(e.red,r.red,t),o.green=f.CesiumMath.lerp(e.green,r.green,t),o.blue=f.CesiumMath.lerp(e.blue,r.blue,t),o.alpha=f.CesiumMath.lerp(e.alpha,r.alpha,t),o},n.multiplyByScalar=function(e,r,t){return t.red=e.red*r,t.green=e.green*r,t.blue=e.blue*r,t.alpha=e.alpha*r,t},n.divideByScalar=function(e,r,t){return t.red=e.red/r,t.green=e.green/r,t.blue=e.blue/r,t.alpha=e.alpha/r,t},n.ALICEBLUE=Object.freeze(n.fromCssColorString("#F0F8FF")),n.ANTIQUEWHITE=Object.freeze(n.fromCssColorString("#FAEBD7")),n.AQUA=Object.freeze(n.fromCssColorString("#00FFFF")),n.AQUAMARINE=Object.freeze(n.fromCssColorString("#7FFFD4")),n.AZURE=Object.freeze(n.fromCssColorString("#F0FFFF")),n.BEIGE=Object.freeze(n.fromCssColorString("#F5F5DC")),n.BISQUE=Object.freeze(n.fromCssColorString("#FFE4C4")),n.BLACK=Object.freeze(n.fromCssColorString("#000000")),n.BLANCHEDALMOND=Object.freeze(n.fromCssColorString("#FFEBCD")),n.BLUE=Object.freeze(n.fromCssColorString("#0000FF")),n.BLUEVIOLET=Object.freeze(n.fromCssColorString("#8A2BE2")),n.BROWN=Object.freeze(n.fromCssColorString("#A52A2A")),n.BURLYWOOD=Object.freeze(n.fromCssColorString("#DEB887")),n.CADETBLUE=Object.freeze(n.fromCssColorString("#5F9EA0")),n.CHARTREUSE=Object.freeze(n.fromCssColorString("#7FFF00")),n.CHOCOLATE=Object.freeze(n.fromCssColorString("#D2691E")),n.CORAL=Object.freeze(n.fromCssColorString("#FF7F50")),n.CORNFLOWERBLUE=Object.freeze(n.fromCssColorString("#6495ED")),n.CORNSILK=Object.freeze(n.fromCssColorString("#FFF8DC")),n.CRIMSON=Object.freeze(n.fromCssColorString("#DC143C")),n.CYAN=Object.freeze(n.fromCssColorString("#00FFFF")),n.DARKBLUE=Object.freeze(n.fromCssColorString("#00008B")),n.DARKCYAN=Object.freeze(n.fromCssColorString("#008B8B")),n.DARKGOLDENROD=Object.freeze(n.fromCssColorString("#B8860B")),n.DARKGRAY=Object.freeze(n.fromCssColorString("#A9A9A9")),n.DARKGREEN=Object.freeze(n.fromCssColorString("#006400")),n.DARKGREY=n.DARKGRAY,n.DARKKHAKI=Object.freeze(n.fromCssColorString("#BDB76B")),n.DARKMAGENTA=Object.freeze(n.fromCssColorString("#8B008B")),n.DARKOLIVEGREEN=Object.freeze(n.fromCssColorString("#556B2F")),n.DARKORANGE=Object.freeze(n.fromCssColorString("#FF8C00")),n.DARKORCHID=Object.freeze(n.fromCssColorString("#9932CC")),n.DARKRED=Object.freeze(n.fromCssColorString("#8B0000")),n.DARKSALMON=Object.freeze(n.fromCssColorString("#E9967A")),n.DARKSEAGREEN=Object.freeze(n.fromCssColorString("#8FBC8F")),n.DARKSLATEBLUE=Object.freeze(n.fromCssColorString("#483D8B")),n.DARKSLATEGRAY=Object.freeze(n.fromCssColorString("#2F4F4F")),n.DARKSLATEGREY=n.DARKSLATEGRAY,n.DARKTURQUOISE=Object.freeze(n.fromCssColorString("#00CED1")),n.DARKVIOLET=Object.freeze(n.fromCssColorString("#9400D3")),n.DEEPPINK=Object.freeze(n.fromCssColorString("#FF1493")),n.DEEPSKYBLUE=Object.freeze(n.fromCssColorString("#00BFFF")),n.DIMGRAY=Object.freeze(n.fromCssColorString("#696969")),n.DIMGREY=n.DIMGRAY,n.DODGERBLUE=Object.freeze(n.fromCssColorString("#1E90FF")),n.FIREBRICK=Object.freeze(n.fromCssColorString("#B22222")),n.FLORALWHITE=Object.freeze(n.fromCssColorString("#FFFAF0")),n.FORESTGREEN=Object.freeze(n.fromCssColorString("#228B22")),n.FUCHSIA=Object.freeze(n.fromCssColorString("#FF00FF")),n.GAINSBORO=Object.freeze(n.fromCssColorString("#DCDCDC")),n.GHOSTWHITE=Object.freeze(n.fromCssColorString("#F8F8FF")),n.GOLD=Object.freeze(n.fromCssColorString("#FFD700")),n.GOLDENROD=Object.freeze(n.fromCssColorString("#DAA520")),n.GRAY=Object.freeze(n.fromCssColorString("#808080")),n.GREEN=Object.freeze(n.fromCssColorString("#008000")),n.GREENYELLOW=Object.freeze(n.fromCssColorString("#ADFF2F")),n.GREY=n.GRAY,n.HONEYDEW=Object.freeze(n.fromCssColorString("#F0FFF0")),n.HOTPINK=Object.freeze(n.fromCssColorString("#FF69B4")),n.INDIANRED=Object.freeze(n.fromCssColorString("#CD5C5C")),n.INDIGO=Object.freeze(n.fromCssColorString("#4B0082")),n.IVORY=Object.freeze(n.fromCssColorString("#FFFFF0")),n.KHAKI=Object.freeze(n.fromCssColorString("#F0E68C")),n.LAVENDER=Object.freeze(n.fromCssColorString("#E6E6FA")),n.LAVENDAR_BLUSH=Object.freeze(n.fromCssColorString("#FFF0F5")),n.LAWNGREEN=Object.freeze(n.fromCssColorString("#7CFC00")),n.LEMONCHIFFON=Object.freeze(n.fromCssColorString("#FFFACD")),n.LIGHTBLUE=Object.freeze(n.fromCssColorString("#ADD8E6")),n.LIGHTCORAL=Object.freeze(n.fromCssColorString("#F08080")),n.LIGHTCYAN=Object.freeze(n.fromCssColorString("#E0FFFF")),n.LIGHTGOLDENRODYELLOW=Object.freeze(n.fromCssColorString("#FAFAD2")),n.LIGHTGRAY=Object.freeze(n.fromCssColorString("#D3D3D3")),n.LIGHTGREEN=Object.freeze(n.fromCssColorString("#90EE90")),n.LIGHTGREY=n.LIGHTGRAY,n.LIGHTPINK=Object.freeze(n.fromCssColorString("#FFB6C1")),n.LIGHTSEAGREEN=Object.freeze(n.fromCssColorString("#20B2AA")),n.LIGHTSKYBLUE=Object.freeze(n.fromCssColorString("#87CEFA")),n.LIGHTSLATEGRAY=Object.freeze(n.fromCssColorString("#778899")),n.LIGHTSLATEGREY=n.LIGHTSLATEGRAY,n.LIGHTSTEELBLUE=Object.freeze(n.fromCssColorString("#B0C4DE")),n.LIGHTYELLOW=Object.freeze(n.fromCssColorString("#FFFFE0")),n.LIME=Object.freeze(n.fromCssColorString("#00FF00")),n.LIMEGREEN=Object.freeze(n.fromCssColorString("#32CD32")),n.LINEN=Object.freeze(n.fromCssColorString("#FAF0E6")),n.MAGENTA=Object.freeze(n.fromCssColorString("#FF00FF")),n.MAROON=Object.freeze(n.fromCssColorString("#800000")),n.MEDIUMAQUAMARINE=Object.freeze(n.fromCssColorString("#66CDAA")),n.MEDIUMBLUE=Object.freeze(n.fromCssColorString("#0000CD")),n.MEDIUMORCHID=Object.freeze(n.fromCssColorString("#BA55D3")),n.MEDIUMPURPLE=Object.freeze(n.fromCssColorString("#9370DB")),n.MEDIUMSEAGREEN=Object.freeze(n.fromCssColorString("#3CB371")),n.MEDIUMSLATEBLUE=Object.freeze(n.fromCssColorString("#7B68EE")),n.MEDIUMSPRINGGREEN=Object.freeze(n.fromCssColorString("#00FA9A")),n.MEDIUMTURQUOISE=Object.freeze(n.fromCssColorString("#48D1CC")),n.MEDIUMVIOLETRED=Object.freeze(n.fromCssColorString("#C71585")),n.MIDNIGHTBLUE=Object.freeze(n.fromCssColorString("#191970")),n.MINTCREAM=Object.freeze(n.fromCssColorString("#F5FFFA")),n.MISTYROSE=Object.freeze(n.fromCssColorString("#FFE4E1")),n.MOCCASIN=Object.freeze(n.fromCssColorString("#FFE4B5")),n.NAVAJOWHITE=Object.freeze(n.fromCssColorString("#FFDEAD")),n.NAVY=Object.freeze(n.fromCssColorString("#000080")),n.OLDLACE=Object.freeze(n.fromCssColorString("#FDF5E6")),n.OLIVE=Object.freeze(n.fromCssColorString("#808000")),n.OLIVEDRAB=Object.freeze(n.fromCssColorString("#6B8E23")),n.ORANGE=Object.freeze(n.fromCssColorString("#FFA500")),n.ORANGERED=Object.freeze(n.fromCssColorString("#FF4500")),n.ORCHID=Object.freeze(n.fromCssColorString("#DA70D6")),n.PALEGOLDENROD=Object.freeze(n.fromCssColorString("#EEE8AA")),n.PALEGREEN=Object.freeze(n.fromCssColorString("#98FB98")),n.PALETURQUOISE=Object.freeze(n.fromCssColorString("#AFEEEE")),n.PALEVIOLETRED=Object.freeze(n.fromCssColorString("#DB7093")),n.PAPAYAWHIP=Object.freeze(n.fromCssColorString("#FFEFD5")),n.PEACHPUFF=Object.freeze(n.fromCssColorString("#FFDAB9")),n.PERU=Object.freeze(n.fromCssColorString("#CD853F")),n.PINK=Object.freeze(n.fromCssColorString("#FFC0CB")),n.PLUM=Object.freeze(n.fromCssColorString("#DDA0DD")),n.POWDERBLUE=Object.freeze(n.fromCssColorString("#B0E0E6")),n.PURPLE=Object.freeze(n.fromCssColorString("#800080")),n.RED=Object.freeze(n.fromCssColorString("#FF0000")),n.ROSYBROWN=Object.freeze(n.fromCssColorString("#BC8F8F")),n.ROYALBLUE=Object.freeze(n.fromCssColorString("#4169E1")),n.SADDLEBROWN=Object.freeze(n.fromCssColorString("#8B4513")),n.SALMON=Object.freeze(n.fromCssColorString("#FA8072")),n.SANDYBROWN=Object.freeze(n.fromCssColorString("#F4A460")),n.SEAGREEN=Object.freeze(n.fromCssColorString("#2E8B57")),n.SEASHELL=Object.freeze(n.fromCssColorString("#FFF5EE")),n.SIENNA=Object.freeze(n.fromCssColorString("#A0522D")),n.SILVER=Object.freeze(n.fromCssColorString("#C0C0C0")),n.SKYBLUE=Object.freeze(n.fromCssColorString("#87CEEB")),n.SLATEBLUE=Object.freeze(n.fromCssColorString("#6A5ACD")),n.SLATEGRAY=Object.freeze(n.fromCssColorString("#708090")),n.SLATEGREY=n.SLATEGRAY,n.SNOW=Object.freeze(n.fromCssColorString("#FFFAFA")),n.SPRINGGREEN=Object.freeze(n.fromCssColorString("#00FF7F")),n.STEELBLUE=Object.freeze(n.fromCssColorString("#4682B4")),n.TAN=Object.freeze(n.fromCssColorString("#D2B48C")),n.TEAL=Object.freeze(n.fromCssColorString("#008080")),n.THISTLE=Object.freeze(n.fromCssColorString("#D8BFD8")),n.TOMATO=Object.freeze(n.fromCssColorString("#FF6347")),n.TURQUOISE=Object.freeze(n.fromCssColorString("#40E0D0")),n.VIOLET=Object.freeze(n.fromCssColorString("#EE82EE")),n.WHEAT=Object.freeze(n.fromCssColorString("#F5DEB3")),n.WHITE=Object.freeze(n.fromCssColorString("#FFFFFF")),n.WHITESMOKE=Object.freeze(n.fromCssColorString("#F5F5F5")),n.YELLOW=Object.freeze(n.fromCssColorString("#FFFF00")),n.YELLOWGREEN=Object.freeze(n.fromCssColorString("#9ACD32")),n.TRANSPARENT=Object.freeze(new n(0,0,0,0)),e.Color=n}));
|
1
|
+
define(["exports","./RuntimeError-8952249c","./defaultValue-81eec7ed","./Transforms-c8cb8f43","./ComponentDatatype-a15c9a19"],(function(e,r,t,o,f){"use strict";function s(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),6*t<1?e+6*(r-e)*t:2*t<1?r:3*t<2?e+(r-e)*(2/3-t)*6:e}function n(e,r,o,f){this.red=t.defaultValue(e,1),this.green=t.defaultValue(r,1),this.blue=t.defaultValue(o,1),this.alpha=t.defaultValue(f,1)}let l,C,i;n.fromCartesian4=function(e,r){return t.defined(r)?(r.red=e.x,r.green=e.y,r.blue=e.z,r.alpha=e.w,r):new n(e.x,e.y,e.z,e.w)},n.fromBytes=function(e,r,o,f,s){return e=n.byteToFloat(t.defaultValue(e,255)),r=n.byteToFloat(t.defaultValue(r,255)),o=n.byteToFloat(t.defaultValue(o,255)),f=n.byteToFloat(t.defaultValue(f,255)),t.defined(s)?(s.red=e,s.green=r,s.blue=o,s.alpha=f,s):new n(e,r,o,f)},n.fromAlpha=function(e,r,o){return t.defined(o)?(o.red=e.red,o.green=e.green,o.blue=e.blue,o.alpha=r,o):new n(e.red,e.green,e.blue,r)},o.FeatureDetection.supportsTypedArrays()&&(l=new ArrayBuffer(4),C=new Uint32Array(l),i=new Uint8Array(l)),n.fromRgba=function(e,r){return C[0]=e,n.fromBytes(i[0],i[1],i[2],i[3],r)},n.fromHsl=function(e,r,o,f,l){e=t.defaultValue(e,0)%1,r=t.defaultValue(r,0),o=t.defaultValue(o,0),f=t.defaultValue(f,1);let C=o,i=o,a=o;if(0!==r){let t;t=o<.5?o*(1+r):o+r-o*r;const f=2*o-t;C=s(f,t,e+1/3),i=s(f,t,e),a=s(f,t,e-1/3)}return t.defined(l)?(l.red=C,l.green=i,l.blue=a,l.alpha=f,l):new n(C,i,a,f)},n.fromRandom=function(e,r){let o=(e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT)).red;if(!t.defined(o)){const r=t.defaultValue(e.minimumRed,0),s=t.defaultValue(e.maximumRed,1);o=r+f.CesiumMath.nextRandomNumber()*(s-r)}let s=e.green;if(!t.defined(s)){const r=t.defaultValue(e.minimumGreen,0),o=t.defaultValue(e.maximumGreen,1);s=r+f.CesiumMath.nextRandomNumber()*(o-r)}let l=e.blue;if(!t.defined(l)){const r=t.defaultValue(e.minimumBlue,0),o=t.defaultValue(e.maximumBlue,1);l=r+f.CesiumMath.nextRandomNumber()*(o-r)}let C=e.alpha;if(!t.defined(C)){const r=t.defaultValue(e.minimumAlpha,0),o=t.defaultValue(e.maximumAlpha,1);C=r+f.CesiumMath.nextRandomNumber()*(o-r)}return t.defined(r)?(r.red=o,r.green=s,r.blue=l,r.alpha=C,r):new n(o,s,l,C)};const a=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,E=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,u=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,b=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;n.fromCssColorString=function(e,r){t.defined(r)||(r=new n);const o=n[(e=e.replace(/\s/g,"")).toUpperCase()];if(t.defined(o))return n.clone(o,r),r;let f=a.exec(e);return null!==f?(r.red=parseInt(f[1],16)/15,r.green=parseInt(f[2],16)/15,r.blue=parseInt(f[3],16)/15,r.alpha=parseInt(t.defaultValue(f[4],"f"),16)/15,r):(f=E.exec(e),null!==f?(r.red=parseInt(f[1],16)/255,r.green=parseInt(f[2],16)/255,r.blue=parseInt(f[3],16)/255,r.alpha=parseInt(t.defaultValue(f[4],"ff"),16)/255,r):(f=u.exec(e),null!==f?(r.red=parseFloat(f[1])/("%"===f[1].substr(-1)?100:255),r.green=parseFloat(f[2])/("%"===f[2].substr(-1)?100:255),r.blue=parseFloat(f[3])/("%"===f[3].substr(-1)?100:255),r.alpha=parseFloat(t.defaultValue(f[4],"1.0")),r):(f=b.exec(e),null!==f?n.fromHsl(parseFloat(f[1])/360,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(t.defaultValue(f[4],"1.0")),r):r=void 0)))},n.packedLength=4,n.pack=function(e,r,o){return o=t.defaultValue(o,0),r[o++]=e.red,r[o++]=e.green,r[o++]=e.blue,r[o]=e.alpha,r},n.unpack=function(e,r,o){return r=t.defaultValue(r,0),t.defined(o)||(o=new n),o.red=e[r++],o.green=e[r++],o.blue=e[r++],o.alpha=e[r],o},n.byteToFloat=function(e){return e/255},n.floatToByte=function(e){return 1===e?255:256*e|0},n.clone=function(e,r){if(t.defined(e))return t.defined(r)?(r.red=e.red,r.green=e.green,r.blue=e.blue,r.alpha=e.alpha,r):new n(e.red,e.green,e.blue,e.alpha)},n.equals=function(e,r){return e===r||t.defined(e)&&t.defined(r)&&e.red===r.red&&e.green===r.green&&e.blue===r.blue&&e.alpha===r.alpha},n.equalsArray=function(e,r,t){return e.red===r[t]&&e.green===r[t+1]&&e.blue===r[t+2]&&e.alpha===r[t+3]},n.prototype.clone=function(e){return n.clone(this,e)},n.prototype.equals=function(e){return n.equals(this,e)},n.prototype.equalsEpsilon=function(e,r){return this===e||t.defined(e)&&Math.abs(this.red-e.red)<=r&&Math.abs(this.green-e.green)<=r&&Math.abs(this.blue-e.blue)<=r&&Math.abs(this.alpha-e.alpha)<=r},n.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`},n.prototype.toCssColorString=function(){const e=n.floatToByte(this.red),r=n.floatToByte(this.green),t=n.floatToByte(this.blue);return 1===this.alpha?`rgb(${e},${r},${t})`:`rgba(${e},${r},${t},${this.alpha})`},n.prototype.toCssHexString=function(){let e=n.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let r=n.floatToByte(this.green).toString(16);r.length<2&&(r=`0${r}`);let t=n.floatToByte(this.blue).toString(16);if(t.length<2&&(t=`0${t}`),this.alpha<1){let o=n.floatToByte(this.alpha).toString(16);return o.length<2&&(o=`0${o}`),`#${e}${r}${t}${o}`}return`#${e}${r}${t}`},n.prototype.toBytes=function(e){const r=n.floatToByte(this.red),o=n.floatToByte(this.green),f=n.floatToByte(this.blue),s=n.floatToByte(this.alpha);return t.defined(e)?(e[0]=r,e[1]=o,e[2]=f,e[3]=s,e):[r,o,f,s]},n.prototype.toRgba=function(){return i[0]=n.floatToByte(this.red),i[1]=n.floatToByte(this.green),i[2]=n.floatToByte(this.blue),i[3]=n.floatToByte(this.alpha),C[0]},n.prototype.brighten=function(e,r){return e=1-e,r.red=1-(1-this.red)*e,r.green=1-(1-this.green)*e,r.blue=1-(1-this.blue)*e,r.alpha=this.alpha,r},n.prototype.darken=function(e,r){return e=1-e,r.red=this.red*e,r.green=this.green*e,r.blue=this.blue*e,r.alpha=this.alpha,r},n.prototype.withAlpha=function(e,r){return n.fromAlpha(this,e,r)},n.add=function(e,r,t){return t.red=e.red+r.red,t.green=e.green+r.green,t.blue=e.blue+r.blue,t.alpha=e.alpha+r.alpha,t},n.subtract=function(e,r,t){return t.red=e.red-r.red,t.green=e.green-r.green,t.blue=e.blue-r.blue,t.alpha=e.alpha-r.alpha,t},n.multiply=function(e,r,t){return t.red=e.red*r.red,t.green=e.green*r.green,t.blue=e.blue*r.blue,t.alpha=e.alpha*r.alpha,t},n.divide=function(e,r,t){return t.red=e.red/r.red,t.green=e.green/r.green,t.blue=e.blue/r.blue,t.alpha=e.alpha/r.alpha,t},n.mod=function(e,r,t){return t.red=e.red%r.red,t.green=e.green%r.green,t.blue=e.blue%r.blue,t.alpha=e.alpha%r.alpha,t},n.lerp=function(e,r,t,o){return o.red=f.CesiumMath.lerp(e.red,r.red,t),o.green=f.CesiumMath.lerp(e.green,r.green,t),o.blue=f.CesiumMath.lerp(e.blue,r.blue,t),o.alpha=f.CesiumMath.lerp(e.alpha,r.alpha,t),o},n.multiplyByScalar=function(e,r,t){return t.red=e.red*r,t.green=e.green*r,t.blue=e.blue*r,t.alpha=e.alpha*r,t},n.divideByScalar=function(e,r,t){return t.red=e.red/r,t.green=e.green/r,t.blue=e.blue/r,t.alpha=e.alpha/r,t},n.ALICEBLUE=Object.freeze(n.fromCssColorString("#F0F8FF")),n.ANTIQUEWHITE=Object.freeze(n.fromCssColorString("#FAEBD7")),n.AQUA=Object.freeze(n.fromCssColorString("#00FFFF")),n.AQUAMARINE=Object.freeze(n.fromCssColorString("#7FFFD4")),n.AZURE=Object.freeze(n.fromCssColorString("#F0FFFF")),n.BEIGE=Object.freeze(n.fromCssColorString("#F5F5DC")),n.BISQUE=Object.freeze(n.fromCssColorString("#FFE4C4")),n.BLACK=Object.freeze(n.fromCssColorString("#000000")),n.BLANCHEDALMOND=Object.freeze(n.fromCssColorString("#FFEBCD")),n.BLUE=Object.freeze(n.fromCssColorString("#0000FF")),n.BLUEVIOLET=Object.freeze(n.fromCssColorString("#8A2BE2")),n.BROWN=Object.freeze(n.fromCssColorString("#A52A2A")),n.BURLYWOOD=Object.freeze(n.fromCssColorString("#DEB887")),n.CADETBLUE=Object.freeze(n.fromCssColorString("#5F9EA0")),n.CHARTREUSE=Object.freeze(n.fromCssColorString("#7FFF00")),n.CHOCOLATE=Object.freeze(n.fromCssColorString("#D2691E")),n.CORAL=Object.freeze(n.fromCssColorString("#FF7F50")),n.CORNFLOWERBLUE=Object.freeze(n.fromCssColorString("#6495ED")),n.CORNSILK=Object.freeze(n.fromCssColorString("#FFF8DC")),n.CRIMSON=Object.freeze(n.fromCssColorString("#DC143C")),n.CYAN=Object.freeze(n.fromCssColorString("#00FFFF")),n.DARKBLUE=Object.freeze(n.fromCssColorString("#00008B")),n.DARKCYAN=Object.freeze(n.fromCssColorString("#008B8B")),n.DARKGOLDENROD=Object.freeze(n.fromCssColorString("#B8860B")),n.DARKGRAY=Object.freeze(n.fromCssColorString("#A9A9A9")),n.DARKGREEN=Object.freeze(n.fromCssColorString("#006400")),n.DARKGREY=n.DARKGRAY,n.DARKKHAKI=Object.freeze(n.fromCssColorString("#BDB76B")),n.DARKMAGENTA=Object.freeze(n.fromCssColorString("#8B008B")),n.DARKOLIVEGREEN=Object.freeze(n.fromCssColorString("#556B2F")),n.DARKORANGE=Object.freeze(n.fromCssColorString("#FF8C00")),n.DARKORCHID=Object.freeze(n.fromCssColorString("#9932CC")),n.DARKRED=Object.freeze(n.fromCssColorString("#8B0000")),n.DARKSALMON=Object.freeze(n.fromCssColorString("#E9967A")),n.DARKSEAGREEN=Object.freeze(n.fromCssColorString("#8FBC8F")),n.DARKSLATEBLUE=Object.freeze(n.fromCssColorString("#483D8B")),n.DARKSLATEGRAY=Object.freeze(n.fromCssColorString("#2F4F4F")),n.DARKSLATEGREY=n.DARKSLATEGRAY,n.DARKTURQUOISE=Object.freeze(n.fromCssColorString("#00CED1")),n.DARKVIOLET=Object.freeze(n.fromCssColorString("#9400D3")),n.DEEPPINK=Object.freeze(n.fromCssColorString("#FF1493")),n.DEEPSKYBLUE=Object.freeze(n.fromCssColorString("#00BFFF")),n.DIMGRAY=Object.freeze(n.fromCssColorString("#696969")),n.DIMGREY=n.DIMGRAY,n.DODGERBLUE=Object.freeze(n.fromCssColorString("#1E90FF")),n.FIREBRICK=Object.freeze(n.fromCssColorString("#B22222")),n.FLORALWHITE=Object.freeze(n.fromCssColorString("#FFFAF0")),n.FORESTGREEN=Object.freeze(n.fromCssColorString("#228B22")),n.FUCHSIA=Object.freeze(n.fromCssColorString("#FF00FF")),n.GAINSBORO=Object.freeze(n.fromCssColorString("#DCDCDC")),n.GHOSTWHITE=Object.freeze(n.fromCssColorString("#F8F8FF")),n.GOLD=Object.freeze(n.fromCssColorString("#FFD700")),n.GOLDENROD=Object.freeze(n.fromCssColorString("#DAA520")),n.GRAY=Object.freeze(n.fromCssColorString("#808080")),n.GREEN=Object.freeze(n.fromCssColorString("#008000")),n.GREENYELLOW=Object.freeze(n.fromCssColorString("#ADFF2F")),n.GREY=n.GRAY,n.HONEYDEW=Object.freeze(n.fromCssColorString("#F0FFF0")),n.HOTPINK=Object.freeze(n.fromCssColorString("#FF69B4")),n.INDIANRED=Object.freeze(n.fromCssColorString("#CD5C5C")),n.INDIGO=Object.freeze(n.fromCssColorString("#4B0082")),n.IVORY=Object.freeze(n.fromCssColorString("#FFFFF0")),n.KHAKI=Object.freeze(n.fromCssColorString("#F0E68C")),n.LAVENDER=Object.freeze(n.fromCssColorString("#E6E6FA")),n.LAVENDAR_BLUSH=Object.freeze(n.fromCssColorString("#FFF0F5")),n.LAWNGREEN=Object.freeze(n.fromCssColorString("#7CFC00")),n.LEMONCHIFFON=Object.freeze(n.fromCssColorString("#FFFACD")),n.LIGHTBLUE=Object.freeze(n.fromCssColorString("#ADD8E6")),n.LIGHTCORAL=Object.freeze(n.fromCssColorString("#F08080")),n.LIGHTCYAN=Object.freeze(n.fromCssColorString("#E0FFFF")),n.LIGHTGOLDENRODYELLOW=Object.freeze(n.fromCssColorString("#FAFAD2")),n.LIGHTGRAY=Object.freeze(n.fromCssColorString("#D3D3D3")),n.LIGHTGREEN=Object.freeze(n.fromCssColorString("#90EE90")),n.LIGHTGREY=n.LIGHTGRAY,n.LIGHTPINK=Object.freeze(n.fromCssColorString("#FFB6C1")),n.LIGHTSEAGREEN=Object.freeze(n.fromCssColorString("#20B2AA")),n.LIGHTSKYBLUE=Object.freeze(n.fromCssColorString("#87CEFA")),n.LIGHTSLATEGRAY=Object.freeze(n.fromCssColorString("#778899")),n.LIGHTSLATEGREY=n.LIGHTSLATEGRAY,n.LIGHTSTEELBLUE=Object.freeze(n.fromCssColorString("#B0C4DE")),n.LIGHTYELLOW=Object.freeze(n.fromCssColorString("#FFFFE0")),n.LIME=Object.freeze(n.fromCssColorString("#00FF00")),n.LIMEGREEN=Object.freeze(n.fromCssColorString("#32CD32")),n.LINEN=Object.freeze(n.fromCssColorString("#FAF0E6")),n.MAGENTA=Object.freeze(n.fromCssColorString("#FF00FF")),n.MAROON=Object.freeze(n.fromCssColorString("#800000")),n.MEDIUMAQUAMARINE=Object.freeze(n.fromCssColorString("#66CDAA")),n.MEDIUMBLUE=Object.freeze(n.fromCssColorString("#0000CD")),n.MEDIUMORCHID=Object.freeze(n.fromCssColorString("#BA55D3")),n.MEDIUMPURPLE=Object.freeze(n.fromCssColorString("#9370DB")),n.MEDIUMSEAGREEN=Object.freeze(n.fromCssColorString("#3CB371")),n.MEDIUMSLATEBLUE=Object.freeze(n.fromCssColorString("#7B68EE")),n.MEDIUMSPRINGGREEN=Object.freeze(n.fromCssColorString("#00FA9A")),n.MEDIUMTURQUOISE=Object.freeze(n.fromCssColorString("#48D1CC")),n.MEDIUMVIOLETRED=Object.freeze(n.fromCssColorString("#C71585")),n.MIDNIGHTBLUE=Object.freeze(n.fromCssColorString("#191970")),n.MINTCREAM=Object.freeze(n.fromCssColorString("#F5FFFA")),n.MISTYROSE=Object.freeze(n.fromCssColorString("#FFE4E1")),n.MOCCASIN=Object.freeze(n.fromCssColorString("#FFE4B5")),n.NAVAJOWHITE=Object.freeze(n.fromCssColorString("#FFDEAD")),n.NAVY=Object.freeze(n.fromCssColorString("#000080")),n.OLDLACE=Object.freeze(n.fromCssColorString("#FDF5E6")),n.OLIVE=Object.freeze(n.fromCssColorString("#808000")),n.OLIVEDRAB=Object.freeze(n.fromCssColorString("#6B8E23")),n.ORANGE=Object.freeze(n.fromCssColorString("#FFA500")),n.ORANGERED=Object.freeze(n.fromCssColorString("#FF4500")),n.ORCHID=Object.freeze(n.fromCssColorString("#DA70D6")),n.PALEGOLDENROD=Object.freeze(n.fromCssColorString("#EEE8AA")),n.PALEGREEN=Object.freeze(n.fromCssColorString("#98FB98")),n.PALETURQUOISE=Object.freeze(n.fromCssColorString("#AFEEEE")),n.PALEVIOLETRED=Object.freeze(n.fromCssColorString("#DB7093")),n.PAPAYAWHIP=Object.freeze(n.fromCssColorString("#FFEFD5")),n.PEACHPUFF=Object.freeze(n.fromCssColorString("#FFDAB9")),n.PERU=Object.freeze(n.fromCssColorString("#CD853F")),n.PINK=Object.freeze(n.fromCssColorString("#FFC0CB")),n.PLUM=Object.freeze(n.fromCssColorString("#DDA0DD")),n.POWDERBLUE=Object.freeze(n.fromCssColorString("#B0E0E6")),n.PURPLE=Object.freeze(n.fromCssColorString("#800080")),n.RED=Object.freeze(n.fromCssColorString("#FF0000")),n.ROSYBROWN=Object.freeze(n.fromCssColorString("#BC8F8F")),n.ROYALBLUE=Object.freeze(n.fromCssColorString("#4169E1")),n.SADDLEBROWN=Object.freeze(n.fromCssColorString("#8B4513")),n.SALMON=Object.freeze(n.fromCssColorString("#FA8072")),n.SANDYBROWN=Object.freeze(n.fromCssColorString("#F4A460")),n.SEAGREEN=Object.freeze(n.fromCssColorString("#2E8B57")),n.SEASHELL=Object.freeze(n.fromCssColorString("#FFF5EE")),n.SIENNA=Object.freeze(n.fromCssColorString("#A0522D")),n.SILVER=Object.freeze(n.fromCssColorString("#C0C0C0")),n.SKYBLUE=Object.freeze(n.fromCssColorString("#87CEEB")),n.SLATEBLUE=Object.freeze(n.fromCssColorString("#6A5ACD")),n.SLATEGRAY=Object.freeze(n.fromCssColorString("#708090")),n.SLATEGREY=n.SLATEGRAY,n.SNOW=Object.freeze(n.fromCssColorString("#FFFAFA")),n.SPRINGGREEN=Object.freeze(n.fromCssColorString("#00FF7F")),n.STEELBLUE=Object.freeze(n.fromCssColorString("#4682B4")),n.TAN=Object.freeze(n.fromCssColorString("#D2B48C")),n.TEAL=Object.freeze(n.fromCssColorString("#008080")),n.THISTLE=Object.freeze(n.fromCssColorString("#D8BFD8")),n.TOMATO=Object.freeze(n.fromCssColorString("#FF6347")),n.TURQUOISE=Object.freeze(n.fromCssColorString("#40E0D0")),n.VIOLET=Object.freeze(n.fromCssColorString("#EE82EE")),n.WHEAT=Object.freeze(n.fromCssColorString("#F5DEB3")),n.WHITE=Object.freeze(n.fromCssColorString("#FFFFFF")),n.WHITESMOKE=Object.freeze(n.fromCssColorString("#F5F5F5")),n.YELLOW=Object.freeze(n.fromCssColorString("#FFFF00")),n.YELLOWGREEN=Object.freeze(n.fromCssColorString("#9ACD32")),n.TRANSPARENT=Object.freeze(new n(0,0,0,0)),e.Color=n}));
|
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./Matrix2-
|
1
|
+
define(["exports","./Matrix2-47e98d76","./RuntimeError-8952249c","./OrientedBoundingBox-fcb5b750"],(function(n,t,e,r){"use strict";const i={},a=new t.Cartesian3,o=new t.Cartesian3,u=new t.Cartesian3,s=new t.Cartesian3,c=new r.OrientedBoundingBox;function C(n,e,r,i,o){const u=t.Cartesian3.subtract(n,e,a),s=t.Cartesian3.dot(r,u),c=t.Cartesian3.dot(i,u);return t.Cartesian2.fromElements(s,c,o)}i.validOutline=function(n){const e=r.OrientedBoundingBox.fromPoints(n,c).halfAxes,i=t.Matrix3.getColumn(e,0,o),a=t.Matrix3.getColumn(e,1,u),C=t.Matrix3.getColumn(e,2,s),m=t.Cartesian3.magnitude(i),g=t.Cartesian3.magnitude(a),l=t.Cartesian3.magnitude(C);return!(0===m&&(0===g||0===l)||0===g&&0===l)},i.computeProjectTo2DArguments=function(n,e,i,a){const C=r.OrientedBoundingBox.fromPoints(n,c),m=C.halfAxes,g=t.Matrix3.getColumn(m,0,o),l=t.Matrix3.getColumn(m,1,u),d=t.Matrix3.getColumn(m,2,s),f=t.Cartesian3.magnitude(g),x=t.Cartesian3.magnitude(l),B=t.Cartesian3.magnitude(d),M=Math.min(f,x,B);if(0===f&&(0===x||0===B)||0===x&&0===B)return!1;let P,w;return M!==x&&M!==B||(P=g),M===f?P=l:M===B&&(w=l),M!==f&&M!==x||(w=d),t.Cartesian3.normalize(P,i),t.Cartesian3.normalize(w,a),t.Cartesian3.clone(C.center,e),!0},i.createProjectPointsTo2DFunction=function(n,t,e){return function(r){const i=new Array(r.length);for(let a=0;a<r.length;a++)i[a]=C(r[a],n,t,e);return i}},i.createProjectPointTo2DFunction=function(n,t,e){return function(r,i){return C(r,n,t,e,i)}},n.CoplanarPolygonGeometryLibrary=i}));
|
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./Matrix2-
|
1
|
+
define(["exports","./Matrix2-47e98d76","./PolylineVolumeGeometryLibrary-67d12fff","./defaultValue-81eec7ed","./ComponentDatatype-a15c9a19","./PolylinePipeline-8095c9bc","./Transforms-c8cb8f43"],(function(a,e,n,t,r,i,s){"use strict";const o={},l=new e.Cartesian3,C=new e.Cartesian3,c=new e.Cartesian3,y=new e.Cartesian3,u=[new e.Cartesian3,new e.Cartesian3],d=new e.Cartesian3,p=new e.Cartesian3,m=new e.Cartesian3,f=new e.Cartesian3,g=new e.Cartesian3,h=new e.Cartesian3,w=new e.Cartesian3,x=new e.Cartesian3,z=new e.Cartesian3,P=new e.Cartesian3,A=new s.Quaternion,B=new e.Matrix3;function E(a,t,i,o,c){const y=e.Cartesian3.angleBetween(e.Cartesian3.subtract(t,a,l),e.Cartesian3.subtract(i,a,C)),u=o===n.CornerType.BEVELED?1:Math.ceil(y/r.CesiumMath.toRadians(5))+1,d=3*u,p=new Array(d);let m;p[d-3]=i.x,p[d-2]=i.y,p[d-1]=i.z,m=c?e.Matrix3.fromQuaternion(s.Quaternion.fromAxisAngle(e.Cartesian3.negate(a,l),y/u,A),B):e.Matrix3.fromQuaternion(s.Quaternion.fromAxisAngle(a,y/u,A),B);let f=0;t=e.Cartesian3.clone(t,l);for(let a=0;a<u;a++)t=e.Matrix3.multiplyByVector(m,t,t),p[f++]=t.x,p[f++]=t.y,p[f++]=t.z;return p}function S(a,n,t,r){let i=l;return r||(n=e.Cartesian3.negate(n,n)),i=e.Cartesian3.add(a,n,i),[i.x,i.y,i.z,t.x,t.y,t.z]}function b(a,n,t,r){const i=new Array(a.length),s=new Array(a.length),o=e.Cartesian3.multiplyByScalar(n,t,l),u=e.Cartesian3.negate(o,C);let d=0,p=a.length-1;for(let n=0;n<a.length;n+=3){const t=e.Cartesian3.fromArray(a,n,c),r=e.Cartesian3.add(t,u,y);i[d++]=r.x,i[d++]=r.y,i[d++]=r.z;const l=e.Cartesian3.add(t,o,y);s[p--]=l.z,s[p--]=l.y,s[p--]=l.x}return r.push(i,s),r}o.addAttribute=function(a,e,n,r){const i=e.x,s=e.y,o=e.z;t.defined(n)&&(a[n]=i,a[n+1]=s,a[n+2]=o),t.defined(r)&&(a[r]=o,a[r-1]=s,a[r-2]=i)};const D=new e.Cartesian3,M=new e.Cartesian3;o.computePositions=function(a){const t=a.granularity,s=a.positions,o=a.ellipsoid,C=a.width/2,c=a.cornerType,y=a.saveAttributes;let A=d,B=p,T=m,N=f,L=g,V=h,O=w,R=x,Q=z,U=P,G=[];const v=y?[]:void 0,I=y?[]:void 0;let q,j=s[0],k=s[1];B=e.Cartesian3.normalize(e.Cartesian3.subtract(k,j,B),B),A=o.geodeticSurfaceNormal(j,A),N=e.Cartesian3.normalize(e.Cartesian3.cross(A,B,N),N),y&&(v.push(N.x,N.y,N.z),I.push(A.x,A.y,A.z)),O=e.Cartesian3.clone(j,O),j=k,T=e.Cartesian3.negate(B,T);const F=[];let H;const J=s.length;for(H=1;H<J-1;H++){A=o.geodeticSurfaceNormal(j,A),k=s[H+1],B=e.Cartesian3.normalize(e.Cartesian3.subtract(k,j,B),B),L=e.Cartesian3.normalize(e.Cartesian3.add(B,T,L),L);const a=e.Cartesian3.multiplyByScalar(A,e.Cartesian3.dot(B,A),D);e.Cartesian3.subtract(B,a,a),e.Cartesian3.normalize(a,a);const d=e.Cartesian3.multiplyByScalar(A,e.Cartesian3.dot(T,A),M);e.Cartesian3.subtract(T,d,d),e.Cartesian3.normalize(d,d);if(!r.CesiumMath.equalsEpsilon(Math.abs(e.Cartesian3.dot(a,d)),1,r.CesiumMath.EPSILON7)){L=e.Cartesian3.cross(L,A,L),L=e.Cartesian3.cross(A,L,L),L=e.Cartesian3.normalize(L,L);const a=C/Math.max(.25,e.Cartesian3.magnitude(e.Cartesian3.cross(L,T,l))),r=n.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(B,T,j,o);L=e.Cartesian3.multiplyByScalar(L,a,L),r?(R=e.Cartesian3.add(j,L,R),U=e.Cartesian3.add(R,e.Cartesian3.multiplyByScalar(N,C,U),U),Q=e.Cartesian3.add(R,e.Cartesian3.multiplyByScalar(N,2*C,Q),Q),u[0]=e.Cartesian3.clone(O,u[0]),u[1]=e.Cartesian3.clone(U,u[1]),q=i.PolylinePipeline.generateArc({positions:u,granularity:t,ellipsoid:o}),G=b(q,N,C,G),y&&(v.push(N.x,N.y,N.z),I.push(A.x,A.y,A.z)),V=e.Cartesian3.clone(Q,V),N=e.Cartesian3.normalize(e.Cartesian3.cross(A,B,N),N),Q=e.Cartesian3.add(R,e.Cartesian3.multiplyByScalar(N,2*C,Q),Q),O=e.Cartesian3.add(R,e.Cartesian3.multiplyByScalar(N,C,O),O),c===n.CornerType.ROUNDED||c===n.CornerType.BEVELED?F.push({leftPositions:E(R,V,Q,c,r)}):F.push({leftPositions:S(j,e.Cartesian3.negate(L,L),Q,r)})):(Q=e.Cartesian3.add(j,L,Q),U=e.Cartesian3.add(Q,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(N,C,U),U),U),R=e.Cartesian3.add(Q,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(N,2*C,R),R),R),u[0]=e.Cartesian3.clone(O,u[0]),u[1]=e.Cartesian3.clone(U,u[1]),q=i.PolylinePipeline.generateArc({positions:u,granularity:t,ellipsoid:o}),G=b(q,N,C,G),y&&(v.push(N.x,N.y,N.z),I.push(A.x,A.y,A.z)),V=e.Cartesian3.clone(R,V),N=e.Cartesian3.normalize(e.Cartesian3.cross(A,B,N),N),R=e.Cartesian3.add(Q,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(N,2*C,R),R),R),O=e.Cartesian3.add(Q,e.Cartesian3.negate(e.Cartesian3.multiplyByScalar(N,C,O),O),O),c===n.CornerType.ROUNDED||c===n.CornerType.BEVELED?F.push({rightPositions:E(Q,V,R,c,r)}):F.push({rightPositions:S(j,L,R,r)})),T=e.Cartesian3.negate(B,T)}j=k}let K;return A=o.geodeticSurfaceNormal(j,A),u[0]=e.Cartesian3.clone(O,u[0]),u[1]=e.Cartesian3.clone(j,u[1]),q=i.PolylinePipeline.generateArc({positions:u,granularity:t,ellipsoid:o}),G=b(q,N,C,G),y&&(v.push(N.x,N.y,N.z),I.push(A.x,A.y,A.z)),c===n.CornerType.ROUNDED&&(K=function(a){let t=d,r=p,i=m,s=a[1];r=e.Cartesian3.fromArray(a[1],s.length-3,r),i=e.Cartesian3.fromArray(a[0],0,i),t=e.Cartesian3.midpoint(r,i,t);const o=E(t,r,i,n.CornerType.ROUNDED,!1),l=a.length-1,C=a[l-1];return s=a[l],r=e.Cartesian3.fromArray(C,C.length-3,r),i=e.Cartesian3.fromArray(s,0,i),t=e.Cartesian3.midpoint(r,i,t),[o,E(t,r,i,n.CornerType.ROUNDED,!1)]}(G)),{positions:G,corners:F,lefts:v,normals:I,endPositions:K}},a.CorridorGeometryLibrary=o}));
|
package/dist/assets/cesium/Workers/{CylinderGeometry-331891fe.js → CylinderGeometry-82a8cbe6.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-
|
1
|
+
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-c8cb8f43","./Matrix2-47e98d76","./ComponentDatatype-a15c9a19","./CylinderGeometryLibrary-76cda53e","./defaultValue-81eec7ed","./RuntimeError-8952249c","./GeometryAttribute-89a520b9","./GeometryAttributes-32b29525","./IndexDatatype-f1dcdf35","./VertexFormat-a0b706b0"],(function(t,e,n,a,o,r,i,s,u,m,c,l){"use strict";const d=new a.Cartesian2,p=new a.Cartesian3,y=new a.Cartesian3,f=new a.Cartesian3,b=new a.Cartesian3;function A(t){const e=(t=i.defaultValue(t,i.defaultValue.EMPTY_OBJECT)).length,n=t.topRadius,a=t.bottomRadius,o=i.defaultValue(t.vertexFormat,l.VertexFormat.DEFAULT),r=i.defaultValue(t.slices,128);this._length=e,this._topRadius=n,this._bottomRadius=a,this._vertexFormat=l.VertexFormat.clone(o),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}A.packedLength=l.VertexFormat.packedLength+5,A.pack=function(t,e,n){return n=i.defaultValue(n,0),l.VertexFormat.pack(t._vertexFormat,e,n),n+=l.VertexFormat.packedLength,e[n++]=t._length,e[n++]=t._topRadius,e[n++]=t._bottomRadius,e[n++]=t._slices,e[n]=i.defaultValue(t._offsetAttribute,-1),e};const x=new l.VertexFormat,g={vertexFormat:x,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};let _;A.unpack=function(t,e,n){e=i.defaultValue(e,0);const a=l.VertexFormat.unpack(t,e,x);e+=l.VertexFormat.packedLength;const o=t[e++],r=t[e++],s=t[e++],u=t[e++],m=t[e];return i.defined(n)?(n._vertexFormat=l.VertexFormat.clone(a,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=u,n._offsetAttribute=-1===m?void 0:m,n):(g.length=o,g.topRadius=r,g.bottomRadius=s,g.slices=u,g.offsetAttribute=-1===m?void 0:m,new A(g))},A.createGeometry=function(t){let s=t._length;const l=t._topRadius,A=t._bottomRadius,x=t._vertexFormat,g=t._slices;if(s<=0||l<0||A<0||0===l&&0===A)return;const _=g+g,h=g+_,F=_+_,v=r.CylinderGeometryLibrary.computePositions(s,l,A,g,!0),C=x.st?new Float32Array(2*F):void 0,w=x.normal?new Float32Array(3*F):void 0,G=x.tangent?new Float32Array(3*F):void 0,R=x.bitangent?new Float32Array(3*F):void 0;let V;const D=x.normal||x.tangent||x.bitangent;if(D){const t=x.tangent||x.bitangent;let e=0,n=0,r=0;const i=Math.atan2(A-l,s),u=p;u.z=Math.sin(i);const m=Math.cos(i);let c=f,d=y;for(V=0;V<g;V++){const i=V/g*o.CesiumMath.TWO_PI,s=m*Math.cos(i),l=m*Math.sin(i);D&&(u.x=s,u.y=l,t&&(c=a.Cartesian3.normalize(a.Cartesian3.cross(a.Cartesian3.UNIT_Z,u,c),c)),x.normal&&(w[e++]=u.x,w[e++]=u.y,w[e++]=u.z,w[e++]=u.x,w[e++]=u.y,w[e++]=u.z),x.tangent&&(G[n++]=c.x,G[n++]=c.y,G[n++]=c.z,G[n++]=c.x,G[n++]=c.y,G[n++]=c.z),x.bitangent&&(d=a.Cartesian3.normalize(a.Cartesian3.cross(u,c,d),d),R[r++]=d.x,R[r++]=d.y,R[r++]=d.z,R[r++]=d.x,R[r++]=d.y,R[r++]=d.z))}for(V=0;V<g;V++)x.normal&&(w[e++]=0,w[e++]=0,w[e++]=-1),x.tangent&&(G[n++]=1,G[n++]=0,G[n++]=0),x.bitangent&&(R[r++]=0,R[r++]=-1,R[r++]=0);for(V=0;V<g;V++)x.normal&&(w[e++]=0,w[e++]=0,w[e++]=1),x.tangent&&(G[n++]=1,G[n++]=0,G[n++]=0),x.bitangent&&(R[r++]=0,R[r++]=1,R[r++]=0)}const T=12*g-12,O=c.IndexDatatype.createTypedArray(F,T);let L=0,P=0;for(V=0;V<g-1;V++)O[L++]=P,O[L++]=P+2,O[L++]=P+3,O[L++]=P,O[L++]=P+3,O[L++]=P+1,P+=2;for(O[L++]=_-2,O[L++]=0,O[L++]=1,O[L++]=_-2,O[L++]=1,O[L++]=_-1,V=1;V<g-1;V++)O[L++]=_+V+1,O[L++]=_+V,O[L++]=_;for(V=1;V<g-1;V++)O[L++]=h,O[L++]=h+V,O[L++]=h+V+1;let E=0;if(x.st){const t=Math.max(l,A);for(V=0;V<F;V++){const e=a.Cartesian3.fromArray(v,3*V,b);C[E++]=(e.x+t)/(2*t),C[E++]=(e.y+t)/(2*t)}}const M=new m.GeometryAttributes;x.position&&(M.position=new u.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v})),x.normal&&(M.normal=new u.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:w})),x.tangent&&(M.tangent=new u.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:G})),x.bitangent&&(M.bitangent=new u.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R})),x.st&&(M.st=new u.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:C})),d.x=.5*s,d.y=Math.max(A,l);const k=new n.BoundingSphere(a.Cartesian3.ZERO,a.Cartesian2.magnitude(d));if(i.defined(t._offsetAttribute)){s=v.length;const n=new Uint8Array(s/3),a=t._offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;e.arrayFill(n,a),M.applyOffset=new u.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new u.Geometry({attributes:M,indices:O,primitiveType:u.PrimitiveType.TRIANGLES,boundingSphere:k,offsetAttribute:t._offsetAttribute})},A.getUnitCylinder=function(){return i.defined(_)||(_=A.createGeometry(new A({topRadius:1,bottomRadius:1,length:1,vertexFormat:l.VertexFormat.POSITION_ONLY}))),_},t.CylinderGeometry=A}));
|
package/dist/assets/cesium/Workers/{EllipseGeometry-5e3f67b6.js → EllipseGeometry-32d55454.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-eb5c1a84","./Matrix2-37e55508","./RuntimeError-8952249c","./ComponentDatatype-a15c9a19","./defaultValue-81eec7ed","./EllipseGeometryLibrary-dbc15162","./GeometryAttribute-3915ea0b","./GeometryAttributes-32b29525","./GeometryInstance-13e4ff38","./GeometryPipeline-e0eb4567","./IndexDatatype-f1dcdf35","./VertexFormat-a0b706b0"],(function(t,e,i,r,n,o,a,s,l,u,m,c,p,y){"use strict";const d=new r.Cartesian3,f=new r.Cartesian3,A=new r.Cartesian3,x=new r.Cartesian3,h=new r.Cartesian2,g=new r.Matrix3,_=new r.Matrix3,b=new i.Quaternion,C=new r.Cartesian3,w=new r.Cartesian3,E=new r.Cartesian3,M=new r.Cartographic,I=new r.Cartesian3,T=new r.Cartesian2,G=new r.Cartesian2;function N(t,n,m){const c=n.vertexFormat,p=n.center,y=n.semiMajorAxis,x=n.semiMinorAxis,N=n.ellipsoid,P=n.stRotation,F=m?t.length/3*2:t.length/3,v=n.shadowVolume,V=c.st?new Float32Array(2*F):void 0,D=c.normal?new Float32Array(3*F):void 0,O=c.tangent?new Float32Array(3*F):void 0,S=c.bitangent?new Float32Array(3*F):void 0,L=v?new Float32Array(3*F):void 0;let R=0,j=C,z=w,k=E;const B=new i.GeographicProjection(N),Y=B.project(N.cartesianToCartographic(p,M),I),H=N.scaleToGeodeticSurface(p,d);N.geodeticSurfaceNormal(H,H);let U=g,Q=_;if(0!==P){let t=i.Quaternion.fromAxisAngle(H,P,b);U=r.Matrix3.fromQuaternion(t,U),t=i.Quaternion.fromAxisAngle(H,-P,b),Q=r.Matrix3.fromQuaternion(t,Q)}else U=r.Matrix3.clone(r.Matrix3.IDENTITY,U),Q=r.Matrix3.clone(r.Matrix3.IDENTITY,Q);const W=r.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,T),J=r.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,G);let q=t.length;const Z=m?q:0,K=Z/3*2;for(let e=0;e<q;e+=3){const i=e+1,n=e+2,o=r.Cartesian3.fromArray(t,e,d);if(c.st){const t=r.Matrix3.multiplyByVector(U,o,f),e=B.project(N.cartesianToCartographic(t,M),A);r.Cartesian3.subtract(e,Y,e),h.x=(e.x+y)/(2*y),h.y=(e.y+x)/(2*x),W.x=Math.min(h.x,W.x),W.y=Math.min(h.y,W.y),J.x=Math.max(h.x,J.x),J.y=Math.max(h.y,J.y),m&&(V[R+K]=h.x,V[R+1+K]=h.y),V[R++]=h.x,V[R++]=h.y}(c.normal||c.tangent||c.bitangent||v)&&(j=N.geodeticSurfaceNormal(o,j),v&&(L[e+Z]=-j.x,L[i+Z]=-j.y,L[n+Z]=-j.z),(c.normal||c.tangent||c.bitangent)&&((c.tangent||c.bitangent)&&(z=r.Cartesian3.normalize(r.Cartesian3.cross(r.Cartesian3.UNIT_Z,j,z),z),r.Matrix3.multiplyByVector(Q,z,z)),c.normal&&(D[e]=j.x,D[i]=j.y,D[n]=j.z,m&&(D[e+Z]=-j.x,D[i+Z]=-j.y,D[n+Z]=-j.z)),c.tangent&&(O[e]=z.x,O[i]=z.y,O[n]=z.z,m&&(O[e+Z]=-z.x,O[i+Z]=-z.y,O[n+Z]=-z.z)),c.bitangent&&(k=r.Cartesian3.normalize(r.Cartesian3.cross(j,z,k),k),S[e]=k.x,S[i]=k.y,S[n]=k.z,m&&(S[e+Z]=k.x,S[i+Z]=k.y,S[n+Z]=k.z))))}if(c.st){q=V.length;for(let t=0;t<q;t+=2)V[t]=(V[t]-W.x)/(J.x-W.x),V[t+1]=(V[t+1]-W.y)/(J.y-W.y)}const X=new u.GeometryAttributes;if(c.position){const e=s.EllipseGeometryLibrary.raisePositionsToHeight(t,n,m);X.position=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e})}if(c.st&&(X.st=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),c.normal&&(X.normal=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),c.tangent&&(X.tangent=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O})),c.bitangent&&(X.bitangent=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:S})),v&&(X.extrudeDirection=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),m&&a.defined(n.offsetAttribute)){let t=new Uint8Array(F);if(n.offsetAttribute===e.GeometryOffsetAttribute.TOP)t=e.arrayFill(t,1,0,F/2);else{const i=n.offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;t=e.arrayFill(t,i)}X.applyOffset=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return X}function P(t){const e=new Array(t*(t+1)*12-6);let i,r,n,o,a,s=0;for(i=0,n=1,o=0;o<3;o++)e[s++]=n++,e[s++]=i,e[s++]=n;for(o=2;o<t+1;++o){for(n=o*(o+1)-1,i=(o-1)*o-1,e[s++]=n++,e[s++]=i,e[s++]=n,r=2*o,a=0;a<r-1;++a)e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i,e[s++]=n;e[s++]=n++,e[s++]=i,e[s++]=n}for(r=2*t,++n,++i,o=0;o<r-1;++o)e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i,e[s++]=n;for(e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i++,e[s++]=i,++i,o=t-1;o>1;--o){for(e[s++]=i++,e[s++]=i,e[s++]=n,r=2*o,a=0;a<r-1;++a)e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i,e[s++]=n;e[s++]=i++,e[s++]=i++,e[s++]=n++}for(o=0;o<3;o++)e[s++]=i++,e[s++]=i,e[s++]=n;return e}let F=new r.Cartesian3;const v=new i.BoundingSphere,V=new i.BoundingSphere;function D(t){const n=t.center,y=t.ellipsoid,_=t.semiMajorAxis;let F=r.Cartesian3.multiplyByScalar(y.geodeticSurfaceNormal(n,d),t.height,d);v.center=r.Cartesian3.add(n,F,v.center),v.radius=_,F=r.Cartesian3.multiplyByScalar(y.geodeticSurfaceNormal(n,F),t.extrudedHeight,F),V.center=r.Cartesian3.add(n,F,V.center),V.radius=_;const D=s.EllipseGeometryLibrary.computeEllipsePositions(t,!0,!0),O=D.positions,S=D.numPts,L=D.outerPositions,R=i.BoundingSphere.union(v,V),j=N(O,t,!0);let z=P(S);const k=z.length;z.length=2*k;const B=O.length/3;for(let t=0;t<k;t+=3)z[t+k]=z[t+2]+B,z[t+1+k]=z[t+1]+B,z[t+2+k]=z[t]+B;const Y=p.IndexDatatype.createTypedArray(2*B/3,z),H=new l.Geometry({attributes:j,indices:Y,primitiveType:l.PrimitiveType.TRIANGLES}),U=function(t,n){const s=n.vertexFormat,m=n.center,c=n.semiMajorAxis,p=n.semiMinorAxis,y=n.ellipsoid,_=n.height,N=n.extrudedHeight,P=n.stRotation,F=t.length/3*2,v=new Float64Array(3*F),V=s.st?new Float32Array(2*F):void 0,D=s.normal?new Float32Array(3*F):void 0,O=s.tangent?new Float32Array(3*F):void 0,S=s.bitangent?new Float32Array(3*F):void 0,L=n.shadowVolume,R=L?new Float32Array(3*F):void 0;let j=0,z=C,k=w,B=E;const Y=new i.GeographicProjection(y),H=Y.project(y.cartesianToCartographic(m,M),I),U=y.scaleToGeodeticSurface(m,d);y.geodeticSurfaceNormal(U,U);const Q=i.Quaternion.fromAxisAngle(U,P,b),W=r.Matrix3.fromQuaternion(Q,g),J=r.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,T),q=r.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,G);let Z=t.length;const K=Z/3*2;for(let e=0;e<Z;e+=3){const i=e+1,n=e+2;let o,a=r.Cartesian3.fromArray(t,e,d);if(s.st){const t=r.Matrix3.multiplyByVector(W,a,f),e=Y.project(y.cartesianToCartographic(t,M),A);r.Cartesian3.subtract(e,H,e),h.x=(e.x+c)/(2*c),h.y=(e.y+p)/(2*p),J.x=Math.min(h.x,J.x),J.y=Math.min(h.y,J.y),q.x=Math.max(h.x,q.x),q.y=Math.max(h.y,q.y),V[j+K]=h.x,V[j+1+K]=h.y,V[j++]=h.x,V[j++]=h.y}a=y.scaleToGeodeticSurface(a,a),o=r.Cartesian3.clone(a,f),z=y.geodeticSurfaceNormal(a,z),L&&(R[e+Z]=-z.x,R[i+Z]=-z.y,R[n+Z]=-z.z);let l=r.Cartesian3.multiplyByScalar(z,_,x);if(a=r.Cartesian3.add(a,l,a),l=r.Cartesian3.multiplyByScalar(z,N,l),o=r.Cartesian3.add(o,l,o),s.position&&(v[e+Z]=o.x,v[i+Z]=o.y,v[n+Z]=o.z,v[e]=a.x,v[i]=a.y,v[n]=a.z),s.normal||s.tangent||s.bitangent){B=r.Cartesian3.clone(z,B);const l=r.Cartesian3.fromArray(t,(e+3)%Z,x);r.Cartesian3.subtract(l,a,l);const u=r.Cartesian3.subtract(o,a,A);z=r.Cartesian3.normalize(r.Cartesian3.cross(u,l,z),z),s.normal&&(D[e]=z.x,D[i]=z.y,D[n]=z.z,D[e+Z]=z.x,D[i+Z]=z.y,D[n+Z]=z.z),s.tangent&&(k=r.Cartesian3.normalize(r.Cartesian3.cross(B,z,k),k),O[e]=k.x,O[i]=k.y,O[n]=k.z,O[e+Z]=k.x,O[e+1+Z]=k.y,O[e+2+Z]=k.z),s.bitangent&&(S[e]=B.x,S[i]=B.y,S[n]=B.z,S[e+Z]=B.x,S[i+Z]=B.y,S[n+Z]=B.z)}}if(s.st){Z=V.length;for(let t=0;t<Z;t+=2)V[t]=(V[t]-J.x)/(q.x-J.x),V[t+1]=(V[t+1]-J.y)/(q.y-J.y)}const X=new u.GeometryAttributes;if(s.position&&(X.position=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v})),s.st&&(X.st=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),s.normal&&(X.normal=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),s.tangent&&(X.tangent=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O})),s.bitangent&&(X.bitangent=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:S})),L&&(X.extrudeDirection=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R})),a.defined(n.offsetAttribute)){let t=new Uint8Array(F);if(n.offsetAttribute===e.GeometryOffsetAttribute.TOP)t=e.arrayFill(t,1,0,F/2);else{const i=n.offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;t=e.arrayFill(t,i)}X.applyOffset=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return X}(L,t);z=function(t){const e=t.length/3,i=p.IndexDatatype.createTypedArray(e,6*e);let r=0;for(let t=0;t<e;t++){const n=t,o=t+e,a=(n+1)%e,s=a+e;i[r++]=n,i[r++]=o,i[r++]=a,i[r++]=a,i[r++]=o,i[r++]=s}return i}(L);const Q=p.IndexDatatype.createTypedArray(2*L.length/3,z),W=new l.Geometry({attributes:U,indices:Q,primitiveType:l.PrimitiveType.TRIANGLES}),J=c.GeometryPipeline.combineInstances([new m.GeometryInstance({geometry:H}),new m.GeometryInstance({geometry:W})]);return{boundingSphere:R,attributes:J[0].attributes,indices:J[0].indices}}function O(t,e,i,n,a,l,u){const m=s.EllipseGeometryLibrary.computeEllipsePositions({center:t,semiMajorAxis:e,semiMinorAxis:i,rotation:n,granularity:a},!1,!0).outerPositions,c=m.length/3,p=new Array(c);for(let t=0;t<c;++t)p[t]=r.Cartesian3.fromArray(m,3*t);const y=r.Rectangle.fromCartesianArray(p,l,u);return y.width>o.CesiumMath.PI&&(y.north=y.north>0?o.CesiumMath.PI_OVER_TWO-o.CesiumMath.EPSILON7:y.north,y.south=y.south<0?o.CesiumMath.EPSILON7-o.CesiumMath.PI_OVER_TWO:y.south,y.east=o.CesiumMath.PI,y.west=-o.CesiumMath.PI),y}function S(t){const e=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).center,i=a.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),n=t.semiMajorAxis,s=t.semiMinorAxis,l=a.defaultValue(t.granularity,o.CesiumMath.RADIANS_PER_DEGREE),u=a.defaultValue(t.vertexFormat,y.VertexFormat.DEFAULT),m=a.defaultValue(t.height,0),c=a.defaultValue(t.extrudedHeight,m);this._center=r.Cartesian3.clone(e),this._semiMajorAxis=n,this._semiMinorAxis=s,this._ellipsoid=r.Ellipsoid.clone(i),this._rotation=a.defaultValue(t.rotation,0),this._stRotation=a.defaultValue(t.stRotation,0),this._height=Math.max(c,m),this._granularity=l,this._vertexFormat=y.VertexFormat.clone(u),this._extrudedHeight=Math.min(c,m),this._shadowVolume=a.defaultValue(t.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}S.packedLength=r.Cartesian3.packedLength+r.Ellipsoid.packedLength+y.VertexFormat.packedLength+9,S.pack=function(t,e,i){return i=a.defaultValue(i,0),r.Cartesian3.pack(t._center,e,i),i+=r.Cartesian3.packedLength,r.Ellipsoid.pack(t._ellipsoid,e,i),i+=r.Ellipsoid.packedLength,y.VertexFormat.pack(t._vertexFormat,e,i),i+=y.VertexFormat.packedLength,e[i++]=t._semiMajorAxis,e[i++]=t._semiMinorAxis,e[i++]=t._rotation,e[i++]=t._stRotation,e[i++]=t._height,e[i++]=t._granularity,e[i++]=t._extrudedHeight,e[i++]=t._shadowVolume?1:0,e[i]=a.defaultValue(t._offsetAttribute,-1),e};const L=new r.Cartesian3,R=new r.Ellipsoid,j=new y.VertexFormat,z={center:L,ellipsoid:R,vertexFormat:j,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};S.unpack=function(t,e,i){e=a.defaultValue(e,0);const n=r.Cartesian3.unpack(t,e,L);e+=r.Cartesian3.packedLength;const o=r.Ellipsoid.unpack(t,e,R);e+=r.Ellipsoid.packedLength;const s=y.VertexFormat.unpack(t,e,j);e+=y.VertexFormat.packedLength;const l=t[e++],u=t[e++],m=t[e++],c=t[e++],p=t[e++],d=t[e++],f=t[e++],A=1===t[e++],x=t[e];return a.defined(i)?(i._center=r.Cartesian3.clone(n,i._center),i._ellipsoid=r.Ellipsoid.clone(o,i._ellipsoid),i._vertexFormat=y.VertexFormat.clone(s,i._vertexFormat),i._semiMajorAxis=l,i._semiMinorAxis=u,i._rotation=m,i._stRotation=c,i._height=p,i._granularity=d,i._extrudedHeight=f,i._shadowVolume=A,i._offsetAttribute=-1===x?void 0:x,i):(z.height=p,z.extrudedHeight=f,z.granularity=d,z.stRotation=c,z.rotation=m,z.semiMajorAxis=l,z.semiMinorAxis=u,z.shadowVolume=A,z.offsetAttribute=-1===x?void 0:x,new S(z))},S.computeRectangle=function(t,e){const i=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).center,n=a.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),s=t.semiMajorAxis,l=t.semiMinorAxis,u=a.defaultValue(t.granularity,o.CesiumMath.RADIANS_PER_DEGREE);return O(i,s,l,a.defaultValue(t.rotation,0),u,n,e)},S.createGeometry=function(t){if(t._semiMajorAxis<=0||t._semiMinorAxis<=0)return;const n=t._height,u=t._extrudedHeight,m=!o.CesiumMath.equalsEpsilon(n,u,0,o.CesiumMath.EPSILON2);t._center=t._ellipsoid.scaleToGeodeticSurface(t._center,t._center);const c={center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:t._ellipsoid,rotation:t._rotation,height:n,granularity:t._granularity,vertexFormat:t._vertexFormat,stRotation:t._stRotation};let y;if(m)c.extrudedHeight=u,c.shadowVolume=t._shadowVolume,c.offsetAttribute=t._offsetAttribute,y=D(c);else if(y=function(t){const e=t.center;F=r.Cartesian3.multiplyByScalar(t.ellipsoid.geodeticSurfaceNormal(e,F),t.height,F),F=r.Cartesian3.add(e,F,F);const n=new i.BoundingSphere(F,t.semiMajorAxis),o=s.EllipseGeometryLibrary.computeEllipsePositions(t,!0,!1),a=o.positions,l=o.numPts,u=N(a,t,!1);let m=P(l);return m=p.IndexDatatype.createTypedArray(a.length/3,m),{boundingSphere:n,attributes:u,indices:m}}(c),a.defined(t._offsetAttribute)){const i=y.attributes.position.values.length,r=new Uint8Array(i/3),n=t._offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;e.arrayFill(r,n),y.attributes.applyOffset=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}return new l.Geometry({attributes:y.attributes,indices:y.indices,primitiveType:l.PrimitiveType.TRIANGLES,boundingSphere:y.boundingSphere,offsetAttribute:t._offsetAttribute})},S.createShadowVolume=function(t,e,i){const r=t._granularity,n=t._ellipsoid,o=e(r,n),a=i(r,n);return new S({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:n,rotation:t._rotation,stRotation:t._stRotation,granularity:r,extrudedHeight:o,height:a,vertexFormat:y.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(S.prototype,{rectangle:{get:function(){return a.defined(this._rectangle)||(this._rectangle=O(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return a.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){const e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];const i=s.EllipseGeometryLibrary.computeEllipsePositions({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,rotation:t._rotation,granularity:t._granularity},!1,!0).outerPositions,n=i.length/3,o=new Array(n);for(let t=0;t<n;++t)o[t]=r.Cartesian3.fromArray(i,3*t);const a=t._ellipsoid,u=t.rectangle;return l.Geometry._textureCoordinateRotationPoints(o,e,a,u)}(this)),this._textureCoordinateRotationPoints}}}),t.EllipseGeometry=S}));
|
1
|
+
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-c8cb8f43","./Matrix2-47e98d76","./RuntimeError-8952249c","./ComponentDatatype-a15c9a19","./defaultValue-81eec7ed","./EllipseGeometryLibrary-b2ae188a","./GeometryAttribute-89a520b9","./GeometryAttributes-32b29525","./GeometryInstance-4fbf16ba","./GeometryPipeline-309fad76","./IndexDatatype-f1dcdf35","./VertexFormat-a0b706b0"],(function(t,e,i,r,n,o,a,s,l,u,m,c,p,y){"use strict";const d=new r.Cartesian3,f=new r.Cartesian3,A=new r.Cartesian3,x=new r.Cartesian3,h=new r.Cartesian2,g=new r.Matrix3,_=new r.Matrix3,b=new i.Quaternion,C=new r.Cartesian3,w=new r.Cartesian3,E=new r.Cartesian3,M=new r.Cartographic,I=new r.Cartesian3,T=new r.Cartesian2,G=new r.Cartesian2;function N(t,n,m){const c=n.vertexFormat,p=n.center,y=n.semiMajorAxis,x=n.semiMinorAxis,N=n.ellipsoid,P=n.stRotation,F=m?t.length/3*2:t.length/3,v=n.shadowVolume,V=c.st?new Float32Array(2*F):void 0,D=c.normal?new Float32Array(3*F):void 0,O=c.tangent?new Float32Array(3*F):void 0,S=c.bitangent?new Float32Array(3*F):void 0,L=v?new Float32Array(3*F):void 0;let R=0,j=C,z=w,k=E;const B=new i.GeographicProjection(N),Y=B.project(N.cartesianToCartographic(p,M),I),H=N.scaleToGeodeticSurface(p,d);N.geodeticSurfaceNormal(H,H);let U=g,Q=_;if(0!==P){let t=i.Quaternion.fromAxisAngle(H,P,b);U=r.Matrix3.fromQuaternion(t,U),t=i.Quaternion.fromAxisAngle(H,-P,b),Q=r.Matrix3.fromQuaternion(t,Q)}else U=r.Matrix3.clone(r.Matrix3.IDENTITY,U),Q=r.Matrix3.clone(r.Matrix3.IDENTITY,Q);const W=r.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,T),J=r.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,G);let q=t.length;const Z=m?q:0,K=Z/3*2;for(let e=0;e<q;e+=3){const i=e+1,n=e+2,o=r.Cartesian3.fromArray(t,e,d);if(c.st){const t=r.Matrix3.multiplyByVector(U,o,f),e=B.project(N.cartesianToCartographic(t,M),A);r.Cartesian3.subtract(e,Y,e),h.x=(e.x+y)/(2*y),h.y=(e.y+x)/(2*x),W.x=Math.min(h.x,W.x),W.y=Math.min(h.y,W.y),J.x=Math.max(h.x,J.x),J.y=Math.max(h.y,J.y),m&&(V[R+K]=h.x,V[R+1+K]=h.y),V[R++]=h.x,V[R++]=h.y}(c.normal||c.tangent||c.bitangent||v)&&(j=N.geodeticSurfaceNormal(o,j),v&&(L[e+Z]=-j.x,L[i+Z]=-j.y,L[n+Z]=-j.z),(c.normal||c.tangent||c.bitangent)&&((c.tangent||c.bitangent)&&(z=r.Cartesian3.normalize(r.Cartesian3.cross(r.Cartesian3.UNIT_Z,j,z),z),r.Matrix3.multiplyByVector(Q,z,z)),c.normal&&(D[e]=j.x,D[i]=j.y,D[n]=j.z,m&&(D[e+Z]=-j.x,D[i+Z]=-j.y,D[n+Z]=-j.z)),c.tangent&&(O[e]=z.x,O[i]=z.y,O[n]=z.z,m&&(O[e+Z]=-z.x,O[i+Z]=-z.y,O[n+Z]=-z.z)),c.bitangent&&(k=r.Cartesian3.normalize(r.Cartesian3.cross(j,z,k),k),S[e]=k.x,S[i]=k.y,S[n]=k.z,m&&(S[e+Z]=k.x,S[i+Z]=k.y,S[n+Z]=k.z))))}if(c.st){q=V.length;for(let t=0;t<q;t+=2)V[t]=(V[t]-W.x)/(J.x-W.x),V[t+1]=(V[t+1]-W.y)/(J.y-W.y)}const X=new u.GeometryAttributes;if(c.position){const e=s.EllipseGeometryLibrary.raisePositionsToHeight(t,n,m);X.position=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e})}if(c.st&&(X.st=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),c.normal&&(X.normal=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),c.tangent&&(X.tangent=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O})),c.bitangent&&(X.bitangent=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:S})),v&&(X.extrudeDirection=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:L})),m&&a.defined(n.offsetAttribute)){let t=new Uint8Array(F);if(n.offsetAttribute===e.GeometryOffsetAttribute.TOP)t=e.arrayFill(t,1,0,F/2);else{const i=n.offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;t=e.arrayFill(t,i)}X.applyOffset=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return X}function P(t){const e=new Array(t*(t+1)*12-6);let i,r,n,o,a,s=0;for(i=0,n=1,o=0;o<3;o++)e[s++]=n++,e[s++]=i,e[s++]=n;for(o=2;o<t+1;++o){for(n=o*(o+1)-1,i=(o-1)*o-1,e[s++]=n++,e[s++]=i,e[s++]=n,r=2*o,a=0;a<r-1;++a)e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i,e[s++]=n;e[s++]=n++,e[s++]=i,e[s++]=n}for(r=2*t,++n,++i,o=0;o<r-1;++o)e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i,e[s++]=n;for(e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i++,e[s++]=i,++i,o=t-1;o>1;--o){for(e[s++]=i++,e[s++]=i,e[s++]=n,r=2*o,a=0;a<r-1;++a)e[s++]=n,e[s++]=i++,e[s++]=i,e[s++]=n++,e[s++]=i,e[s++]=n;e[s++]=i++,e[s++]=i++,e[s++]=n++}for(o=0;o<3;o++)e[s++]=i++,e[s++]=i,e[s++]=n;return e}let F=new r.Cartesian3;const v=new i.BoundingSphere,V=new i.BoundingSphere;function D(t){const n=t.center,y=t.ellipsoid,_=t.semiMajorAxis;let F=r.Cartesian3.multiplyByScalar(y.geodeticSurfaceNormal(n,d),t.height,d);v.center=r.Cartesian3.add(n,F,v.center),v.radius=_,F=r.Cartesian3.multiplyByScalar(y.geodeticSurfaceNormal(n,F),t.extrudedHeight,F),V.center=r.Cartesian3.add(n,F,V.center),V.radius=_;const D=s.EllipseGeometryLibrary.computeEllipsePositions(t,!0,!0),O=D.positions,S=D.numPts,L=D.outerPositions,R=i.BoundingSphere.union(v,V),j=N(O,t,!0);let z=P(S);const k=z.length;z.length=2*k;const B=O.length/3;for(let t=0;t<k;t+=3)z[t+k]=z[t+2]+B,z[t+1+k]=z[t+1]+B,z[t+2+k]=z[t]+B;const Y=p.IndexDatatype.createTypedArray(2*B/3,z),H=new l.Geometry({attributes:j,indices:Y,primitiveType:l.PrimitiveType.TRIANGLES}),U=function(t,n){const s=n.vertexFormat,m=n.center,c=n.semiMajorAxis,p=n.semiMinorAxis,y=n.ellipsoid,_=n.height,N=n.extrudedHeight,P=n.stRotation,F=t.length/3*2,v=new Float64Array(3*F),V=s.st?new Float32Array(2*F):void 0,D=s.normal?new Float32Array(3*F):void 0,O=s.tangent?new Float32Array(3*F):void 0,S=s.bitangent?new Float32Array(3*F):void 0,L=n.shadowVolume,R=L?new Float32Array(3*F):void 0;let j=0,z=C,k=w,B=E;const Y=new i.GeographicProjection(y),H=Y.project(y.cartesianToCartographic(m,M),I),U=y.scaleToGeodeticSurface(m,d);y.geodeticSurfaceNormal(U,U);const Q=i.Quaternion.fromAxisAngle(U,P,b),W=r.Matrix3.fromQuaternion(Q,g),J=r.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,T),q=r.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,G);let Z=t.length;const K=Z/3*2;for(let e=0;e<Z;e+=3){const i=e+1,n=e+2;let o,a=r.Cartesian3.fromArray(t,e,d);if(s.st){const t=r.Matrix3.multiplyByVector(W,a,f),e=Y.project(y.cartesianToCartographic(t,M),A);r.Cartesian3.subtract(e,H,e),h.x=(e.x+c)/(2*c),h.y=(e.y+p)/(2*p),J.x=Math.min(h.x,J.x),J.y=Math.min(h.y,J.y),q.x=Math.max(h.x,q.x),q.y=Math.max(h.y,q.y),V[j+K]=h.x,V[j+1+K]=h.y,V[j++]=h.x,V[j++]=h.y}a=y.scaleToGeodeticSurface(a,a),o=r.Cartesian3.clone(a,f),z=y.geodeticSurfaceNormal(a,z),L&&(R[e+Z]=-z.x,R[i+Z]=-z.y,R[n+Z]=-z.z);let l=r.Cartesian3.multiplyByScalar(z,_,x);if(a=r.Cartesian3.add(a,l,a),l=r.Cartesian3.multiplyByScalar(z,N,l),o=r.Cartesian3.add(o,l,o),s.position&&(v[e+Z]=o.x,v[i+Z]=o.y,v[n+Z]=o.z,v[e]=a.x,v[i]=a.y,v[n]=a.z),s.normal||s.tangent||s.bitangent){B=r.Cartesian3.clone(z,B);const l=r.Cartesian3.fromArray(t,(e+3)%Z,x);r.Cartesian3.subtract(l,a,l);const u=r.Cartesian3.subtract(o,a,A);z=r.Cartesian3.normalize(r.Cartesian3.cross(u,l,z),z),s.normal&&(D[e]=z.x,D[i]=z.y,D[n]=z.z,D[e+Z]=z.x,D[i+Z]=z.y,D[n+Z]=z.z),s.tangent&&(k=r.Cartesian3.normalize(r.Cartesian3.cross(B,z,k),k),O[e]=k.x,O[i]=k.y,O[n]=k.z,O[e+Z]=k.x,O[e+1+Z]=k.y,O[e+2+Z]=k.z),s.bitangent&&(S[e]=B.x,S[i]=B.y,S[n]=B.z,S[e+Z]=B.x,S[i+Z]=B.y,S[n+Z]=B.z)}}if(s.st){Z=V.length;for(let t=0;t<Z;t+=2)V[t]=(V[t]-J.x)/(q.x-J.x),V[t+1]=(V[t+1]-J.y)/(q.y-J.y)}const X=new u.GeometryAttributes;if(s.position&&(X.position=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v})),s.st&&(X.st=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:V})),s.normal&&(X.normal=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:D})),s.tangent&&(X.tangent=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:O})),s.bitangent&&(X.bitangent=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:S})),L&&(X.extrudeDirection=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:R})),a.defined(n.offsetAttribute)){let t=new Uint8Array(F);if(n.offsetAttribute===e.GeometryOffsetAttribute.TOP)t=e.arrayFill(t,1,0,F/2);else{const i=n.offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;t=e.arrayFill(t,i)}X.applyOffset=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:t})}return X}(L,t);z=function(t){const e=t.length/3,i=p.IndexDatatype.createTypedArray(e,6*e);let r=0;for(let t=0;t<e;t++){const n=t,o=t+e,a=(n+1)%e,s=a+e;i[r++]=n,i[r++]=o,i[r++]=a,i[r++]=a,i[r++]=o,i[r++]=s}return i}(L);const Q=p.IndexDatatype.createTypedArray(2*L.length/3,z),W=new l.Geometry({attributes:U,indices:Q,primitiveType:l.PrimitiveType.TRIANGLES}),J=c.GeometryPipeline.combineInstances([new m.GeometryInstance({geometry:H}),new m.GeometryInstance({geometry:W})]);return{boundingSphere:R,attributes:J[0].attributes,indices:J[0].indices}}function O(t,e,i,n,a,l,u){const m=s.EllipseGeometryLibrary.computeEllipsePositions({center:t,semiMajorAxis:e,semiMinorAxis:i,rotation:n,granularity:a},!1,!0).outerPositions,c=m.length/3,p=new Array(c);for(let t=0;t<c;++t)p[t]=r.Cartesian3.fromArray(m,3*t);const y=r.Rectangle.fromCartesianArray(p,l,u);return y.width>o.CesiumMath.PI&&(y.north=y.north>0?o.CesiumMath.PI_OVER_TWO-o.CesiumMath.EPSILON7:y.north,y.south=y.south<0?o.CesiumMath.EPSILON7-o.CesiumMath.PI_OVER_TWO:y.south,y.east=o.CesiumMath.PI,y.west=-o.CesiumMath.PI),y}function S(t){const e=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).center,i=a.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),n=t.semiMajorAxis,s=t.semiMinorAxis,l=a.defaultValue(t.granularity,o.CesiumMath.RADIANS_PER_DEGREE),u=a.defaultValue(t.vertexFormat,y.VertexFormat.DEFAULT),m=a.defaultValue(t.height,0),c=a.defaultValue(t.extrudedHeight,m);this._center=r.Cartesian3.clone(e),this._semiMajorAxis=n,this._semiMinorAxis=s,this._ellipsoid=r.Ellipsoid.clone(i),this._rotation=a.defaultValue(t.rotation,0),this._stRotation=a.defaultValue(t.stRotation,0),this._height=Math.max(c,m),this._granularity=l,this._vertexFormat=y.VertexFormat.clone(u),this._extrudedHeight=Math.min(c,m),this._shadowVolume=a.defaultValue(t.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}S.packedLength=r.Cartesian3.packedLength+r.Ellipsoid.packedLength+y.VertexFormat.packedLength+9,S.pack=function(t,e,i){return i=a.defaultValue(i,0),r.Cartesian3.pack(t._center,e,i),i+=r.Cartesian3.packedLength,r.Ellipsoid.pack(t._ellipsoid,e,i),i+=r.Ellipsoid.packedLength,y.VertexFormat.pack(t._vertexFormat,e,i),i+=y.VertexFormat.packedLength,e[i++]=t._semiMajorAxis,e[i++]=t._semiMinorAxis,e[i++]=t._rotation,e[i++]=t._stRotation,e[i++]=t._height,e[i++]=t._granularity,e[i++]=t._extrudedHeight,e[i++]=t._shadowVolume?1:0,e[i]=a.defaultValue(t._offsetAttribute,-1),e};const L=new r.Cartesian3,R=new r.Ellipsoid,j=new y.VertexFormat,z={center:L,ellipsoid:R,vertexFormat:j,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};S.unpack=function(t,e,i){e=a.defaultValue(e,0);const n=r.Cartesian3.unpack(t,e,L);e+=r.Cartesian3.packedLength;const o=r.Ellipsoid.unpack(t,e,R);e+=r.Ellipsoid.packedLength;const s=y.VertexFormat.unpack(t,e,j);e+=y.VertexFormat.packedLength;const l=t[e++],u=t[e++],m=t[e++],c=t[e++],p=t[e++],d=t[e++],f=t[e++],A=1===t[e++],x=t[e];return a.defined(i)?(i._center=r.Cartesian3.clone(n,i._center),i._ellipsoid=r.Ellipsoid.clone(o,i._ellipsoid),i._vertexFormat=y.VertexFormat.clone(s,i._vertexFormat),i._semiMajorAxis=l,i._semiMinorAxis=u,i._rotation=m,i._stRotation=c,i._height=p,i._granularity=d,i._extrudedHeight=f,i._shadowVolume=A,i._offsetAttribute=-1===x?void 0:x,i):(z.height=p,z.extrudedHeight=f,z.granularity=d,z.stRotation=c,z.rotation=m,z.semiMajorAxis=l,z.semiMinorAxis=u,z.shadowVolume=A,z.offsetAttribute=-1===x?void 0:x,new S(z))},S.computeRectangle=function(t,e){const i=(t=a.defaultValue(t,a.defaultValue.EMPTY_OBJECT)).center,n=a.defaultValue(t.ellipsoid,r.Ellipsoid.WGS84),s=t.semiMajorAxis,l=t.semiMinorAxis,u=a.defaultValue(t.granularity,o.CesiumMath.RADIANS_PER_DEGREE);return O(i,s,l,a.defaultValue(t.rotation,0),u,n,e)},S.createGeometry=function(t){if(t._semiMajorAxis<=0||t._semiMinorAxis<=0)return;const n=t._height,u=t._extrudedHeight,m=!o.CesiumMath.equalsEpsilon(n,u,0,o.CesiumMath.EPSILON2);t._center=t._ellipsoid.scaleToGeodeticSurface(t._center,t._center);const c={center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:t._ellipsoid,rotation:t._rotation,height:n,granularity:t._granularity,vertexFormat:t._vertexFormat,stRotation:t._stRotation};let y;if(m)c.extrudedHeight=u,c.shadowVolume=t._shadowVolume,c.offsetAttribute=t._offsetAttribute,y=D(c);else if(y=function(t){const e=t.center;F=r.Cartesian3.multiplyByScalar(t.ellipsoid.geodeticSurfaceNormal(e,F),t.height,F),F=r.Cartesian3.add(e,F,F);const n=new i.BoundingSphere(F,t.semiMajorAxis),o=s.EllipseGeometryLibrary.computeEllipsePositions(t,!0,!1),a=o.positions,l=o.numPts,u=N(a,t,!1);let m=P(l);return m=p.IndexDatatype.createTypedArray(a.length/3,m),{boundingSphere:n,attributes:u,indices:m}}(c),a.defined(t._offsetAttribute)){const i=y.attributes.position.values.length,r=new Uint8Array(i/3),n=t._offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;e.arrayFill(r,n),y.attributes.applyOffset=new l.GeometryAttribute({componentDatatype:o.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}return new l.Geometry({attributes:y.attributes,indices:y.indices,primitiveType:l.PrimitiveType.TRIANGLES,boundingSphere:y.boundingSphere,offsetAttribute:t._offsetAttribute})},S.createShadowVolume=function(t,e,i){const r=t._granularity,n=t._ellipsoid,o=e(r,n),a=i(r,n);return new S({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:n,rotation:t._rotation,stRotation:t._stRotation,granularity:r,extrudedHeight:o,height:a,vertexFormat:y.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(S.prototype,{rectangle:{get:function(){return a.defined(this._rectangle)||(this._rectangle=O(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return a.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){const e=-t._stRotation;if(0===e)return[0,0,0,1,1,0];const i=s.EllipseGeometryLibrary.computeEllipsePositions({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,rotation:t._rotation,granularity:t._granularity},!1,!0).outerPositions,n=i.length/3,o=new Array(n);for(let t=0;t<n;++t)o[t]=r.Cartesian3.fromArray(i,3*t);const a=t._ellipsoid,u=t.rectangle;return l.Geometry._textureCoordinateRotationPoints(o,e,a,u)}(this)),this._textureCoordinateRotationPoints}}}),t.EllipseGeometry=S}));
|
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./Matrix2-
|
1
|
+
define(["exports","./Matrix2-47e98d76","./ComponentDatatype-a15c9a19","./Transforms-c8cb8f43"],(function(t,a,e,n){"use strict";const i={},r=new a.Cartesian3,s=new a.Cartesian3,o=new n.Quaternion,l=new a.Matrix3;function c(t,e,i,c,C,y,u,m,h,x){const M=t+e;a.Cartesian3.multiplyByScalar(c,Math.cos(M),r),a.Cartesian3.multiplyByScalar(i,Math.sin(M),s),a.Cartesian3.add(r,s,r);let f=Math.cos(t);f*=f;let z=Math.sin(t);z*=z;const _=y/Math.sqrt(u*f+C*z)/m;return n.Quaternion.fromAxisAngle(r,_,o),a.Matrix3.fromQuaternion(o,l),a.Matrix3.multiplyByVector(l,h,x),a.Cartesian3.normalize(x,x),a.Cartesian3.multiplyByScalar(x,m,x),x}const C=new a.Cartesian3,y=new a.Cartesian3,u=new a.Cartesian3,m=new a.Cartesian3;i.raisePositionsToHeight=function(t,e,n){const i=e.ellipsoid,r=e.height,s=e.extrudedHeight,o=n?t.length/3*2:t.length/3,l=new Float64Array(3*o),c=t.length,h=n?c:0;for(let e=0;e<c;e+=3){const o=e+1,c=e+2,x=a.Cartesian3.fromArray(t,e,C);i.scaleToGeodeticSurface(x,x);const M=a.Cartesian3.clone(x,y),f=i.geodeticSurfaceNormal(x,m),z=a.Cartesian3.multiplyByScalar(f,r,u);a.Cartesian3.add(x,z,x),n&&(a.Cartesian3.multiplyByScalar(f,s,z),a.Cartesian3.add(M,z,M),l[e+h]=M.x,l[o+h]=M.y,l[c+h]=M.z),l[e]=x.x,l[o]=x.y,l[c]=x.z}return l};const h=new a.Cartesian3,x=new a.Cartesian3,M=new a.Cartesian3;i.computeEllipsePositions=function(t,n,i){const r=t.semiMinorAxis,s=t.semiMajorAxis,o=t.rotation,l=t.center,m=8*t.granularity,f=r*r,z=s*s,_=s*r,d=a.Cartesian3.magnitude(l),p=a.Cartesian3.normalize(l,h);let O=a.Cartesian3.cross(a.Cartesian3.UNIT_Z,l,x);O=a.Cartesian3.normalize(O,O);const w=a.Cartesian3.cross(p,O,M);let P=1+Math.ceil(e.CesiumMath.PI_OVER_TWO/m);const T=e.CesiumMath.PI_OVER_TWO/(P-1);let I=e.CesiumMath.PI_OVER_TWO-P*T;I<0&&(P-=Math.ceil(Math.abs(I)/T));const g=n?new Array(3*(P*(P+2)*2)):void 0;let E=0,V=C,A=y;const R=4*P*3;let W=R-1,S=0;const B=i?new Array(R):void 0;let b,Q,v,G,H;for(I=e.CesiumMath.PI_OVER_TWO,V=c(I,o,w,O,f,_,z,d,p,V),n&&(g[E++]=V.x,g[E++]=V.y,g[E++]=V.z),i&&(B[W--]=V.z,B[W--]=V.y,B[W--]=V.x),I=e.CesiumMath.PI_OVER_TWO-T,b=1;b<P+1;++b){if(V=c(I,o,w,O,f,_,z,d,p,V),A=c(Math.PI-I,o,w,O,f,_,z,d,p,A),n){for(g[E++]=V.x,g[E++]=V.y,g[E++]=V.z,v=2*b+2,Q=1;Q<v-1;++Q)G=Q/(v-1),H=a.Cartesian3.lerp(V,A,G,u),g[E++]=H.x,g[E++]=H.y,g[E++]=H.z;g[E++]=A.x,g[E++]=A.y,g[E++]=A.z}i&&(B[W--]=V.z,B[W--]=V.y,B[W--]=V.x,B[S++]=A.x,B[S++]=A.y,B[S++]=A.z),I=e.CesiumMath.PI_OVER_TWO-(b+1)*T}for(b=P;b>1;--b){if(I=e.CesiumMath.PI_OVER_TWO-(b-1)*T,V=c(-I,o,w,O,f,_,z,d,p,V),A=c(I+Math.PI,o,w,O,f,_,z,d,p,A),n){for(g[E++]=V.x,g[E++]=V.y,g[E++]=V.z,v=2*(b-1)+2,Q=1;Q<v-1;++Q)G=Q/(v-1),H=a.Cartesian3.lerp(V,A,G,u),g[E++]=H.x,g[E++]=H.y,g[E++]=H.z;g[E++]=A.x,g[E++]=A.y,g[E++]=A.z}i&&(B[W--]=V.z,B[W--]=V.y,B[W--]=V.x,B[S++]=A.x,B[S++]=A.y,B[S++]=A.z)}I=e.CesiumMath.PI_OVER_TWO,V=c(-I,o,w,O,f,_,z,d,p,V);const N={};return n&&(g[E++]=V.x,g[E++]=V.y,g[E++]=V.z,N.positions=g,N.numPts=P),i&&(B[W--]=V.z,B[W--]=V.y,B[W--]=V.x,N.outerPositions=B),N},t.EllipseGeometryLibrary=i}));
|
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-
|
1
|
+
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-c8cb8f43","./Matrix2-47e98d76","./ComponentDatatype-a15c9a19","./defaultValue-81eec7ed","./RuntimeError-8952249c","./EllipseGeometryLibrary-b2ae188a","./GeometryAttribute-89a520b9","./GeometryAttributes-32b29525","./IndexDatatype-f1dcdf35"],(function(e,t,i,r,n,a,o,s,l,u,d){"use strict";const c=new r.Cartesian3;let p=new r.Cartesian3;const f=new i.BoundingSphere,m=new i.BoundingSphere;function h(e){const t=(e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT)).center,i=a.defaultValue(e.ellipsoid,r.Ellipsoid.WGS84),o=e.semiMajorAxis,s=e.semiMinorAxis,l=a.defaultValue(e.granularity,n.CesiumMath.RADIANS_PER_DEGREE),u=a.defaultValue(e.height,0),d=a.defaultValue(e.extrudedHeight,u);this._center=r.Cartesian3.clone(t),this._semiMajorAxis=o,this._semiMinorAxis=s,this._ellipsoid=r.Ellipsoid.clone(i),this._rotation=a.defaultValue(e.rotation,0),this._height=Math.max(d,u),this._granularity=l,this._extrudedHeight=Math.min(d,u),this._numberOfVerticalLines=Math.max(a.defaultValue(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}h.packedLength=r.Cartesian3.packedLength+r.Ellipsoid.packedLength+8,h.pack=function(e,t,i){return i=a.defaultValue(i,0),r.Cartesian3.pack(e._center,t,i),i+=r.Cartesian3.packedLength,r.Ellipsoid.pack(e._ellipsoid,t,i),i+=r.Ellipsoid.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i]=a.defaultValue(e._offsetAttribute,-1),t};const y=new r.Cartesian3,b=new r.Ellipsoid,A={center:y,ellipsoid:b,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};h.unpack=function(e,t,i){t=a.defaultValue(t,0);const n=r.Cartesian3.unpack(e,t,y);t+=r.Cartesian3.packedLength;const o=r.Ellipsoid.unpack(e,t,b);t+=r.Ellipsoid.packedLength;const s=e[t++],l=e[t++],u=e[t++],d=e[t++],c=e[t++],p=e[t++],f=e[t++],m=e[t];return a.defined(i)?(i._center=r.Cartesian3.clone(n,i._center),i._ellipsoid=r.Ellipsoid.clone(o,i._ellipsoid),i._semiMajorAxis=s,i._semiMinorAxis=l,i._rotation=u,i._height=d,i._granularity=c,i._extrudedHeight=p,i._numberOfVerticalLines=f,i._offsetAttribute=-1===m?void 0:m,i):(A.height=d,A.extrudedHeight=p,A.granularity=c,A.rotation=u,A.semiMajorAxis=s,A.semiMinorAxis=l,A.numberOfVerticalLines=f,A.offsetAttribute=-1===m?void 0:m,new h(A))},h.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;const o=e._height,h=e._extrudedHeight,y=!n.CesiumMath.equalsEpsilon(o,h,0,n.CesiumMath.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);const b={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:o,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines};let A;if(y)b.extrudedHeight=h,b.offsetAttribute=e._offsetAttribute,A=function(e){const o=e.center,p=e.ellipsoid,h=e.semiMajorAxis;let y=r.Cartesian3.multiplyByScalar(p.geodeticSurfaceNormal(o,c),e.height,c);f.center=r.Cartesian3.add(o,y,f.center),f.radius=h,y=r.Cartesian3.multiplyByScalar(p.geodeticSurfaceNormal(o,y),e.extrudedHeight,y),m.center=r.Cartesian3.add(o,y,m.center),m.radius=h;let b=s.EllipseGeometryLibrary.computeEllipsePositions(e,!1,!0).outerPositions;const A=new u.GeometryAttributes({position:new l.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:s.EllipseGeometryLibrary.raisePositionsToHeight(b,e,!0)})});b=A.position.values;const _=i.BoundingSphere.union(f,m);let g=b.length/3;if(a.defined(e.offsetAttribute)){let i=new Uint8Array(g);if(e.offsetAttribute===t.GeometryOffsetAttribute.TOP)i=t.arrayFill(i,1,0,g/2);else{const r=e.offsetAttribute===t.GeometryOffsetAttribute.NONE?0:1;i=t.arrayFill(i,r)}A.applyOffset=new l.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:i})}let x=a.defaultValue(e.numberOfVerticalLines,16);x=n.CesiumMath.clamp(x,0,g/2);const E=d.IndexDatatype.createTypedArray(g,2*g+2*x);g/=2;let M,C,G=0;for(M=0;M<g;++M)E[G++]=M,E[G++]=(M+1)%g,E[G++]=M+g,E[G++]=(M+1)%g+g;if(x>0){const e=Math.min(x,g);C=Math.round(g/e);const t=Math.min(C*x,g);for(M=0;M<t;M+=C)E[G++]=M,E[G++]=M+g}return{boundingSphere:_,attributes:A,indices:E}}(b);else if(A=function(e){const t=e.center;p=r.Cartesian3.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,p),e.height,p),p=r.Cartesian3.add(t,p,p);const a=new i.BoundingSphere(p,e.semiMajorAxis),o=s.EllipseGeometryLibrary.computeEllipsePositions(e,!1,!0).outerPositions,c=new u.GeometryAttributes({position:new l.GeometryAttribute({componentDatatype:n.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:s.EllipseGeometryLibrary.raisePositionsToHeight(o,e,!1)})}),f=o.length/3,m=d.IndexDatatype.createTypedArray(f,2*f);let h=0;for(let e=0;e<f;++e)m[h++]=e,m[h++]=(e+1)%f;return{boundingSphere:a,attributes:c,indices:m}}(b),a.defined(e._offsetAttribute)){const i=A.attributes.position.values.length,r=new Uint8Array(i/3),a=e._offsetAttribute===t.GeometryOffsetAttribute.NONE?0:1;t.arrayFill(r,a),A.attributes.applyOffset=new l.GeometryAttribute({componentDatatype:n.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r})}return new l.Geometry({attributes:A.attributes,indices:A.indices,primitiveType:l.PrimitiveType.LINES,boundingSphere:A.boundingSphere,offsetAttribute:e._offsetAttribute})},e.EllipseOutlineGeometry=h}));
|
package/dist/assets/cesium/Workers/{EllipsoidGeodesic-cc3bace8.js → EllipsoidGeodesic-19e75e11.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./Matrix2-
|
1
|
+
define(["exports","./Matrix2-47e98d76","./RuntimeError-8952249c","./defaultValue-81eec7ed","./ComponentDatatype-a15c9a19"],(function(t,a,i,n,e){"use strict";function s(t,a,i,n,e,s,o){const r=function(t,a){return t*a*(4+t*(4-3*a))/16}(t,i);return(1-r)*t*a*(n+r*e*(o+r*s*(2*o*o-1)))}const o=new a.Cartesian3,r=new a.Cartesian3;function h(t,i,n,h){a.Cartesian3.normalize(h.cartographicToCartesian(i,r),o),a.Cartesian3.normalize(h.cartographicToCartesian(n,r),r),function(t,a,i,n,o,r,h){const c=(a-i)/a,d=r-n,u=Math.atan((1-c)*Math.tan(o)),l=Math.atan((1-c)*Math.tan(h)),M=Math.cos(u),g=Math.sin(u),p=Math.cos(l),_=Math.sin(l),f=M*p,m=M*_,C=g*_,H=g*p;let v,O,S,q,U,A=d,R=e.CesiumMath.TWO_PI,w=Math.cos(A),b=Math.sin(A);do{w=Math.cos(A),b=Math.sin(A);const t=m-H*w;let a;S=Math.sqrt(p*p*b*b+t*t),O=C+f*w,v=Math.atan2(S,O),0===S?(a=0,q=1):(a=f*b/S,q=1-a*a),R=A,U=O-2*C/q,isFinite(U)||(U=0),A=d+s(c,a,q,v,S,O,U)}while(Math.abs(A-R)>e.CesiumMath.EPSILON12);const y=q*(a*a-i*i)/(i*i),E=y*(256+y*(y*(74-47*y)-128))/1024,x=U*U,D=i*(1+y*(4096+y*(y*(320-175*y)-768))/16384)*(v-E*S*(U+E*(O*(2*x-1)-E*U*(4*S*S-3)*(4*x-3)/6)/4)),P=Math.atan2(p*b,m-H*w),T=Math.atan2(M*b,m*w-H);t._distance=D,t._startHeading=P,t._endHeading=T,t._uSquared=y}(t,h.maximumRadius,h.minimumRadius,i.longitude,i.latitude,n.longitude,n.latitude),t._start=a.Cartographic.clone(i,t._start),t._end=a.Cartographic.clone(n,t._end),t._start.height=0,t._end.height=0,function(t){const a=t._uSquared,i=t._ellipsoid.maximumRadius,n=t._ellipsoid.minimumRadius,e=(i-n)/i,s=Math.cos(t._startHeading),o=Math.sin(t._startHeading),r=(1-e)*Math.tan(t._start.latitude),h=1/Math.sqrt(1+r*r),c=h*r,d=Math.atan2(r,s),u=h*o,l=u*u,M=1-l,g=Math.sqrt(M),p=a/4,_=p*p,f=_*p,m=_*_,C=1+p-3*_/4+5*f/4-175*m/64,H=1-p+15*_/8-35*f/8,v=1-3*p+35*_/4,O=1-5*p,S=C*d-H*Math.sin(2*d)*p/2-v*Math.sin(4*d)*_/16-O*Math.sin(6*d)*f/48-5*Math.sin(8*d)*m/512,q=t._constants;q.a=i,q.b=n,q.f=e,q.cosineHeading=s,q.sineHeading=o,q.tanU=r,q.cosineU=h,q.sineU=c,q.sigma=d,q.sineAlpha=u,q.sineSquaredAlpha=l,q.cosineSquaredAlpha=M,q.cosineAlpha=g,q.u2Over4=p,q.u4Over16=_,q.u6Over64=f,q.u8Over256=m,q.a0=C,q.a1=H,q.a2=v,q.a3=O,q.distanceRatio=S}(t)}function c(t,i,e){const s=n.defaultValue(e,a.Ellipsoid.WGS84);this._ellipsoid=s,this._start=new a.Cartographic,this._end=new a.Cartographic,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,n.defined(t)&&n.defined(i)&&h(this,t,i,s)}Object.defineProperties(c.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}}),c.prototype.setEndPoints=function(t,a){h(this,t,a,this._ellipsoid)},c.prototype.interpolateUsingFraction=function(t,a){return this.interpolateUsingSurfaceDistance(this._distance*t,a)},c.prototype.interpolateUsingSurfaceDistance=function(t,i){const e=this._constants,o=e.distanceRatio+t/e.b,r=Math.cos(2*o),h=Math.cos(4*o),c=Math.cos(6*o),d=Math.sin(2*o),u=Math.sin(4*o),l=Math.sin(6*o),M=Math.sin(8*o),g=o*o,p=o*g,_=e.u8Over256,f=e.u2Over4,m=e.u6Over64,C=e.u4Over16;let H=2*p*_*r/3+o*(1-f+7*C/4-15*m/4+579*_/64-(C-15*m/4+187*_/16)*r-(5*m/4-115*_/16)*h-29*_*c/16)+(f/2-C+71*m/32-85*_/16)*d+(5*C/16-5*m/4+383*_/96)*u-g*((m-11*_/2)*d+5*_*u/2)+(29*m/96-29*_/16)*l+539*_*M/1536;const v=Math.asin(Math.sin(H)*e.cosineAlpha),O=Math.atan(e.a/e.b*Math.tan(v));H-=e.sigma;const S=Math.cos(2*e.sigma+H),q=Math.sin(H),U=Math.cos(H),A=e.cosineU*U,R=e.sineU*q,w=Math.atan2(q*e.sineHeading,A-R*e.cosineHeading)-s(e.f,e.sineAlpha,e.cosineSquaredAlpha,H,q,U,S);return n.defined(i)?(i.longitude=this._start.longitude+w,i.latitude=O,i.height=0,i):new a.Cartographic(this._start.longitude+w,O,0)},t.EllipsoidGeodesic=c}));
|
package/dist/assets/cesium/Workers/{EllipsoidGeometry-8bfa24a9.js → EllipsoidGeometry-7c99fc81.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-
|
1
|
+
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-c8cb8f43","./Matrix2-47e98d76","./ComponentDatatype-a15c9a19","./defaultValue-81eec7ed","./RuntimeError-8952249c","./GeometryAttribute-89a520b9","./GeometryAttributes-32b29525","./IndexDatatype-f1dcdf35","./VertexFormat-a0b706b0"],(function(t,e,a,n,i,r,o,s,m,u,c){"use strict";const l=new n.Cartesian3,f=new n.Cartesian3,d=new n.Cartesian3,C=new n.Cartesian3,p=new n.Cartesian3,y=new n.Cartesian3(1,1,1),_=Math.cos,h=Math.sin;function x(t){t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT);const e=r.defaultValue(t.radii,y),a=r.defaultValue(t.innerRadii,e),o=r.defaultValue(t.minimumClock,0),s=r.defaultValue(t.maximumClock,i.CesiumMath.TWO_PI),m=r.defaultValue(t.minimumCone,0),u=r.defaultValue(t.maximumCone,i.CesiumMath.PI),l=Math.round(r.defaultValue(t.stackPartitions,64)),f=Math.round(r.defaultValue(t.slicePartitions,64)),d=r.defaultValue(t.vertexFormat,c.VertexFormat.DEFAULT);this._radii=n.Cartesian3.clone(e),this._innerRadii=n.Cartesian3.clone(a),this._minimumClock=o,this._maximumClock=s,this._minimumCone=m,this._maximumCone=u,this._stackPartitions=l,this._slicePartitions=f,this._vertexFormat=c.VertexFormat.clone(d),this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidGeometry"}x.packedLength=2*n.Cartesian3.packedLength+c.VertexFormat.packedLength+7,x.pack=function(t,e,a){return a=r.defaultValue(a,0),n.Cartesian3.pack(t._radii,e,a),a+=n.Cartesian3.packedLength,n.Cartesian3.pack(t._innerRadii,e,a),a+=n.Cartesian3.packedLength,c.VertexFormat.pack(t._vertexFormat,e,a),a+=c.VertexFormat.packedLength,e[a++]=t._minimumClock,e[a++]=t._maximumClock,e[a++]=t._minimumCone,e[a++]=t._maximumCone,e[a++]=t._stackPartitions,e[a++]=t._slicePartitions,e[a]=r.defaultValue(t._offsetAttribute,-1),e};const A=new n.Cartesian3,b=new n.Cartesian3,k=new c.VertexFormat,w={radii:A,innerRadii:b,vertexFormat:k,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};let F;x.unpack=function(t,e,a){e=r.defaultValue(e,0);const i=n.Cartesian3.unpack(t,e,A);e+=n.Cartesian3.packedLength;const o=n.Cartesian3.unpack(t,e,b);e+=n.Cartesian3.packedLength;const s=c.VertexFormat.unpack(t,e,k);e+=c.VertexFormat.packedLength;const m=t[e++],u=t[e++],l=t[e++],f=t[e++],d=t[e++],C=t[e++],p=t[e];return r.defined(a)?(a._radii=n.Cartesian3.clone(i,a._radii),a._innerRadii=n.Cartesian3.clone(o,a._innerRadii),a._vertexFormat=c.VertexFormat.clone(s,a._vertexFormat),a._minimumClock=m,a._maximumClock=u,a._minimumCone=l,a._maximumCone=f,a._stackPartitions=d,a._slicePartitions=C,a._offsetAttribute=-1===p?void 0:p,a):(w.minimumClock=m,w.maximumClock=u,w.minimumCone=l,w.maximumCone=f,w.stackPartitions=d,w.slicePartitions=C,w.offsetAttribute=-1===p?void 0:p,new x(w))},x.createGeometry=function(t){const o=t._radii;if(o.x<=0||o.y<=0||o.z<=0)return;const c=t._innerRadii;if(c.x<=0||c.y<=0||c.z<=0)return;const y=t._minimumClock,x=t._maximumClock,A=t._minimumCone,b=t._maximumCone,k=t._vertexFormat;let w,F,P=t._slicePartitions+1,g=t._stackPartitions+1;P=Math.round(P*Math.abs(x-y)/i.CesiumMath.TWO_PI),g=Math.round(g*Math.abs(b-A)/i.CesiumMath.PI),P<2&&(P=2),g<2&&(g=2);let v=0;const V=[A],M=[y];for(w=0;w<g;w++)V.push(A+w*(b-A)/(g-1));for(V.push(b),F=0;F<P;F++)M.push(y+F*(x-y)/(P-1));M.push(x);const T=V.length,D=M.length;let G=0,L=1;const O=c.x!==o.x||c.y!==o.y||c.z!==o.z;let I=!1,E=!1,z=!1;O&&(L=2,A>0&&(I=!0,G+=P-1),b<Math.PI&&(E=!0,G+=P-1),(x-y)%i.CesiumMath.TWO_PI?(z=!0,G+=2*(g-1)+1):G+=1);const N=D*T*L,R=new Float64Array(3*N),U=e.arrayFill(new Array(N),!1),S=e.arrayFill(new Array(N),!1),B=P*g*L,W=6*(B+G+1-(P+g)*L),Y=u.IndexDatatype.createTypedArray(B,W),J=k.normal?new Float32Array(3*N):void 0,X=k.tangent?new Float32Array(3*N):void 0,Z=k.bitangent?new Float32Array(3*N):void 0,j=k.st?new Float32Array(2*N):void 0,q=new Array(T),H=new Array(T);for(w=0;w<T;w++)q[w]=h(V[w]),H[w]=_(V[w]);const K=new Array(D),Q=new Array(D);for(F=0;F<D;F++)Q[F]=_(M[F]),K[F]=h(M[F]);for(w=0;w<T;w++)for(F=0;F<D;F++)R[v++]=o.x*q[w]*Q[F],R[v++]=o.y*q[w]*K[F],R[v++]=o.z*H[w];let $,tt,et,at,nt=N/2;if(O)for(w=0;w<T;w++)for(F=0;F<D;F++)R[v++]=c.x*q[w]*Q[F],R[v++]=c.y*q[w]*K[F],R[v++]=c.z*H[w],U[nt]=!0,w>0&&w!==T-1&&0!==F&&F!==D-1&&(S[nt]=!0),nt++;for(v=0,w=1;w<T-2;w++)for($=w*D,tt=(w+1)*D,F=1;F<D-2;F++)Y[v++]=tt+F,Y[v++]=tt+F+1,Y[v++]=$+F+1,Y[v++]=tt+F,Y[v++]=$+F+1,Y[v++]=$+F;if(O){const t=T*D;for(w=1;w<T-2;w++)for($=t+w*D,tt=t+(w+1)*D,F=1;F<D-2;F++)Y[v++]=tt+F,Y[v++]=$+F,Y[v++]=$+F+1,Y[v++]=tt+F,Y[v++]=$+F+1,Y[v++]=tt+F+1}if(O){if(I)for(at=T*D,w=1;w<D-2;w++)Y[v++]=w,Y[v++]=w+1,Y[v++]=at+w+1,Y[v++]=w,Y[v++]=at+w+1,Y[v++]=at+w;if(E)for(et=T*D-D,at=T*D*L-D,w=1;w<D-2;w++)Y[v++]=et+w+1,Y[v++]=et+w,Y[v++]=at+w,Y[v++]=et+w+1,Y[v++]=at+w,Y[v++]=at+w+1}if(z){for(w=1;w<T-2;w++)at=D*T+D*w,et=D*w,Y[v++]=at,Y[v++]=et+D,Y[v++]=et,Y[v++]=at,Y[v++]=at+D,Y[v++]=et+D;for(w=1;w<T-2;w++)at=D*T+D*(w+1)-1,et=D*(w+1)-1,Y[v++]=et+D,Y[v++]=at,Y[v++]=et,Y[v++]=et+D,Y[v++]=at+D,Y[v++]=at}const it=new m.GeometryAttributes;k.position&&(it.position=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:R}));let rt=0,ot=0,st=0,mt=0;const ut=N/2;let ct;const lt=n.Ellipsoid.fromCartesian3(o),ft=n.Ellipsoid.fromCartesian3(c);if(k.st||k.normal||k.tangent||k.bitangent){for(w=0;w<N;w++){ct=U[w]?ft:lt;const t=n.Cartesian3.fromArray(R,3*w,l),e=ct.geodeticSurfaceNormal(t,f);if(S[w]&&n.Cartesian3.negate(e,e),k.st){const t=n.Cartesian2.negate(e,p);j[rt++]=Math.atan2(t.y,t.x)/i.CesiumMath.TWO_PI+.5,j[rt++]=Math.asin(e.z)/Math.PI+.5}if(k.normal&&(J[ot++]=e.x,J[ot++]=e.y,J[ot++]=e.z),k.tangent||k.bitangent){const t=d;let a,i=0;if(U[w]&&(i=ut),a=!I&&w>=i&&w<i+2*D?n.Cartesian3.UNIT_X:n.Cartesian3.UNIT_Z,n.Cartesian3.cross(a,e,t),n.Cartesian3.normalize(t,t),k.tangent&&(X[st++]=t.x,X[st++]=t.y,X[st++]=t.z),k.bitangent){const a=n.Cartesian3.cross(e,t,C);n.Cartesian3.normalize(a,a),Z[mt++]=a.x,Z[mt++]=a.y,Z[mt++]=a.z}}}k.st&&(it.st=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:j})),k.normal&&(it.normal=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:J})),k.tangent&&(it.tangent=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:X})),k.bitangent&&(it.bitangent=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:Z}))}if(r.defined(t._offsetAttribute)){const a=R.length,n=new Uint8Array(a/3),r=t._offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;e.arrayFill(n,r),it.applyOffset=new s.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new s.Geometry({attributes:it,indices:Y,primitiveType:s.PrimitiveType.TRIANGLES,boundingSphere:a.BoundingSphere.fromEllipsoid(lt),offsetAttribute:t._offsetAttribute})},x.getUnitEllipsoid=function(){return r.defined(F)||(F=x.createGeometry(new x({radii:new n.Cartesian3(1,1,1),vertexFormat:c.VertexFormat.POSITION_ONLY}))),F},t.EllipsoidGeometry=x}));
|
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-
|
1
|
+
define(["exports","./GeometryOffsetAttribute-8c5e10db","./Transforms-c8cb8f43","./Matrix2-47e98d76","./ComponentDatatype-a15c9a19","./defaultValue-81eec7ed","./RuntimeError-8952249c","./GeometryAttribute-89a520b9","./GeometryAttributes-32b29525","./IndexDatatype-f1dcdf35"],(function(t,i,e,n,a,o,r,s,u,m){"use strict";const f=new n.Cartesian3(1,1,1),c=Math.cos,l=Math.sin;function d(t){t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT);const i=o.defaultValue(t.radii,f),e=o.defaultValue(t.innerRadii,i),r=o.defaultValue(t.minimumClock,0),s=o.defaultValue(t.maximumClock,a.CesiumMath.TWO_PI),u=o.defaultValue(t.minimumCone,0),m=o.defaultValue(t.maximumCone,a.CesiumMath.PI),c=Math.round(o.defaultValue(t.stackPartitions,10)),l=Math.round(o.defaultValue(t.slicePartitions,8)),d=Math.round(o.defaultValue(t.subdivisions,128));this._radii=n.Cartesian3.clone(i),this._innerRadii=n.Cartesian3.clone(e),this._minimumClock=r,this._maximumClock=s,this._minimumCone=u,this._maximumCone=m,this._stackPartitions=c,this._slicePartitions=l,this._subdivisions=d,this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}d.packedLength=2*n.Cartesian3.packedLength+8,d.pack=function(t,i,e){return e=o.defaultValue(e,0),n.Cartesian3.pack(t._radii,i,e),e+=n.Cartesian3.packedLength,n.Cartesian3.pack(t._innerRadii,i,e),e+=n.Cartesian3.packedLength,i[e++]=t._minimumClock,i[e++]=t._maximumClock,i[e++]=t._minimumCone,i[e++]=t._maximumCone,i[e++]=t._stackPartitions,i[e++]=t._slicePartitions,i[e++]=t._subdivisions,i[e]=o.defaultValue(t._offsetAttribute,-1),i};const C=new n.Cartesian3,_=new n.Cartesian3,p={radii:C,innerRadii:_,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};d.unpack=function(t,i,e){i=o.defaultValue(i,0);const a=n.Cartesian3.unpack(t,i,C);i+=n.Cartesian3.packedLength;const r=n.Cartesian3.unpack(t,i,_);i+=n.Cartesian3.packedLength;const s=t[i++],u=t[i++],m=t[i++],f=t[i++],c=t[i++],l=t[i++],h=t[i++],y=t[i];return o.defined(e)?(e._radii=n.Cartesian3.clone(a,e._radii),e._innerRadii=n.Cartesian3.clone(r,e._innerRadii),e._minimumClock=s,e._maximumClock=u,e._minimumCone=m,e._maximumCone=f,e._stackPartitions=c,e._slicePartitions=l,e._subdivisions=h,e._offsetAttribute=-1===y?void 0:y,e):(p.minimumClock=s,p.maximumClock=u,p.minimumCone=m,p.maximumCone=f,p.stackPartitions=c,p.slicePartitions=l,p.subdivisions=h,p.offsetAttribute=-1===y?void 0:y,new d(p))},d.createGeometry=function(t){const r=t._radii;if(r.x<=0||r.y<=0||r.z<=0)return;const f=t._innerRadii;if(f.x<=0||f.y<=0||f.z<=0)return;const d=t._minimumClock,C=t._maximumClock,_=t._minimumCone,p=t._maximumCone,h=t._subdivisions,y=n.Ellipsoid.fromCartesian3(r);let b=t._slicePartitions+1,k=t._stackPartitions+1;b=Math.round(b*Math.abs(C-d)/a.CesiumMath.TWO_PI),k=Math.round(k*Math.abs(p-_)/a.CesiumMath.PI),b<2&&(b=2),k<2&&(k=2);let x=0,A=1;const P=f.x!==r.x||f.y!==r.y||f.z!==r.z;let v=!1,M=!1;P&&(A=2,_>0&&(v=!0,x+=b),p<Math.PI&&(M=!0,x+=b));const w=h*A*(k+b),V=new Float64Array(3*w),g=2*(w+x-(b+k)*A),E=m.IndexDatatype.createTypedArray(w,g);let G,O,D,I,T=0;const z=new Array(k),L=new Array(k);for(G=0;G<k;G++)I=_+G*(p-_)/(k-1),z[G]=l(I),L[G]=c(I);const R=new Array(h),N=new Array(h);for(G=0;G<h;G++)D=d+G*(C-d)/(h-1),R[G]=l(D),N[G]=c(D);for(G=0;G<k;G++)for(O=0;O<h;O++)V[T++]=r.x*z[G]*N[O],V[T++]=r.y*z[G]*R[O],V[T++]=r.z*L[G];if(P)for(G=0;G<k;G++)for(O=0;O<h;O++)V[T++]=f.x*z[G]*N[O],V[T++]=f.y*z[G]*R[O],V[T++]=f.z*L[G];for(z.length=h,L.length=h,G=0;G<h;G++)I=_+G*(p-_)/(h-1),z[G]=l(I),L[G]=c(I);for(R.length=b,N.length=b,G=0;G<b;G++)D=d+G*(C-d)/(b-1),R[G]=l(D),N[G]=c(D);for(G=0;G<h;G++)for(O=0;O<b;O++)V[T++]=r.x*z[G]*N[O],V[T++]=r.y*z[G]*R[O],V[T++]=r.z*L[G];if(P)for(G=0;G<h;G++)for(O=0;O<b;O++)V[T++]=f.x*z[G]*N[O],V[T++]=f.y*z[G]*R[O],V[T++]=f.z*L[G];for(T=0,G=0;G<k*A;G++){const t=G*h;for(O=0;O<h-1;O++)E[T++]=t+O,E[T++]=t+O+1}let B=k*h*A;for(G=0;G<b;G++)for(O=0;O<h-1;O++)E[T++]=B+G+O*b,E[T++]=B+G+(O+1)*b;if(P)for(B=k*h*A+b*h,G=0;G<b;G++)for(O=0;O<h-1;O++)E[T++]=B+G+O*b,E[T++]=B+G+(O+1)*b;if(P){let t=k*h*A,i=t+h*b;if(v)for(G=0;G<b;G++)E[T++]=t+G,E[T++]=i+G;if(M)for(t+=h*b-b,i+=h*b-b,G=0;G<b;G++)E[T++]=t+G,E[T++]=i+G}const S=new u.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:V})});if(o.defined(t._offsetAttribute)){const e=V.length,n=new Uint8Array(e/3),o=t._offsetAttribute===i.GeometryOffsetAttribute.NONE?0:1;i.arrayFill(n,o),S.applyOffset=new s.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new s.Geometry({attributes:S,indices:E,primitiveType:s.PrimitiveType.LINES,boundingSphere:e.BoundingSphere.fromEllipsoid(y),offsetAttribute:t._offsetAttribute})},t.EllipsoidOutlineGeometry=d}));
|
package/dist/assets/cesium/Workers/{EllipsoidRhumbLine-125a8b72.js → EllipsoidRhumbLine-6145377b.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./Matrix2-
|
1
|
+
define(["exports","./Matrix2-47e98d76","./RuntimeError-8952249c","./defaultValue-81eec7ed","./ComponentDatatype-a15c9a19"],(function(t,i,e,a,n){"use strict";function s(t,i,e){if(0===t)return i*e;const a=t*t,n=a*a,s=n*a,u=s*a,h=u*a,o=h*a,l=e;return i*((1-a/4-3*n/64-5*s/256-175*u/16384-441*h/65536-4851*o/1048576)*l-(3*a/8+3*n/32+45*s/1024+105*u/4096+2205*h/131072+6237*o/524288)*Math.sin(2*l)+(15*n/256+45*s/1024+525*u/16384+1575*h/65536+155925*o/8388608)*Math.sin(4*l)-(35*s/3072+175*u/12288+3675*h/262144+13475*o/1048576)*Math.sin(6*l)+(315*u/131072+2205*h/524288+43659*o/8388608)*Math.sin(8*l)-(693*h/1310720+6237*o/5242880)*Math.sin(10*l)+1001*o/8388608*Math.sin(12*l))}function u(t,i){if(0===t)return Math.log(Math.tan(.5*(n.CesiumMath.PI_OVER_TWO+i)));const e=t*Math.sin(i);return Math.log(Math.tan(.5*(n.CesiumMath.PI_OVER_TWO+i)))-t/2*Math.log((1+e)/(1-e))}const h=new i.Cartesian3,o=new i.Cartesian3;function l(t,e,a,l){i.Cartesian3.normalize(l.cartographicToCartesian(e,o),h),i.Cartesian3.normalize(l.cartographicToCartesian(a,o),o);const r=l.maximumRadius,d=l.minimumRadius,c=r*r,M=d*d;t._ellipticitySquared=(c-M)/c,t._ellipticity=Math.sqrt(t._ellipticitySquared),t._start=i.Cartographic.clone(e,t._start),t._start.height=0,t._end=i.Cartographic.clone(a,t._end),t._end.height=0,t._heading=function(t,i,e,a,s){const h=u(t._ellipticity,e),o=u(t._ellipticity,s);return Math.atan2(n.CesiumMath.negativePiToPi(a-i),o-h)}(t,e.longitude,e.latitude,a.longitude,a.latitude),t._distance=function(t,i,e,a,u,h,o){const l=t._heading,r=h-a;let d=0;if(n.CesiumMath.equalsEpsilon(Math.abs(l),n.CesiumMath.PI_OVER_TWO,n.CesiumMath.EPSILON8))if(i===e)d=i*Math.cos(u)*n.CesiumMath.negativePiToPi(r);else{const e=Math.sin(u);d=i*Math.cos(u)*n.CesiumMath.negativePiToPi(r)/Math.sqrt(1-t._ellipticitySquared*e*e)}else{const e=s(t._ellipticity,i,u);d=(s(t._ellipticity,i,o)-e)/Math.cos(l)}return Math.abs(d)}(t,l.maximumRadius,l.minimumRadius,e.longitude,e.latitude,a.longitude,a.latitude)}function r(t,e,h,o,l,r){if(0===h)return i.Cartographic.clone(t,r);const d=l*l;let c,M,m;if(Math.abs(n.CesiumMath.PI_OVER_TWO-Math.abs(e))>n.CesiumMath.EPSILON8){M=function(t,i,e){const a=t/e;if(0===i)return a;const n=a*a,s=n*a,u=s*a,h=i*i,o=h*h,l=o*h,r=l*h,d=r*h,c=d*h,M=Math.sin(2*a),m=Math.cos(2*a),g=Math.sin(4*a),_=Math.cos(4*a),p=Math.sin(6*a),C=Math.cos(6*a),f=Math.sin(8*a),P=Math.cos(8*a),O=Math.sin(10*a);return a+a*h/4+7*a*o/64+15*a*l/256+579*a*r/16384+1515*a*d/65536+16837*a*c/1048576+(3*a*o/16+45*a*l/256-a*(32*n-561)*r/4096-a*(232*n-1677)*d/16384+a*(399985-90560*n+512*u)*c/5242880)*m+(21*a*l/256+483*a*r/4096-a*(224*n-1969)*d/16384-a*(33152*n-112599)*c/1048576)*_+(151*a*r/4096+4681*a*d/65536+1479*a*c/16384-453*s*c/32768)*C+(1097*a*d/65536+42783*a*c/1048576)*P+8011*a*c/1048576*Math.cos(10*a)+(3*h/8+3*o/16+213*l/2048-3*n*l/64+255*r/4096-33*n*r/512+20861*d/524288-33*n*d/512+u*d/1024+28273*c/1048576-471*n*c/8192+9*u*c/4096)*M+(21*o/256+21*l/256+533*r/8192-21*n*r/512+197*d/4096-315*n*d/4096+584039*c/16777216-12517*n*c/131072+7*u*c/2048)*g+(151*l/6144+151*r/4096+5019*d/131072-453*n*d/16384+26965*c/786432-8607*n*c/131072)*p+(1097*r/131072+1097*d/65536+225797*c/10485760-1097*n*c/65536)*f+(8011*d/2621440+8011*c/1048576)*O+293393*c/251658240*Math.sin(12*a)}(s(l,o,t.latitude)+h*Math.cos(e),l,o);const i=u(l,t.latitude),a=u(l,M);m=Math.tan(e)*(a-i),c=n.CesiumMath.negativePiToPi(t.longitude+m)}else{let i;if(M=t.latitude,0===l)i=o*Math.cos(t.latitude);else{const e=Math.sin(t.latitude);i=o*Math.cos(t.latitude)/Math.sqrt(1-d*e*e)}m=h/i,c=e>0?n.CesiumMath.negativePiToPi(t.longitude+m):n.CesiumMath.negativePiToPi(t.longitude-m)}return a.defined(r)?(r.longitude=c,r.latitude=M,r.height=0,r):new i.Cartographic(c,M,0)}function d(t,e,n){const s=a.defaultValue(n,i.Ellipsoid.WGS84);this._ellipsoid=s,this._start=new i.Cartographic,this._end=new i.Cartographic,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,a.defined(t)&&a.defined(e)&&l(this,t,e,s)}Object.defineProperties(d.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}}),d.fromStartHeadingDistance=function(t,e,s,u,h){const o=a.defaultValue(u,i.Ellipsoid.WGS84),l=o.maximumRadius,c=o.minimumRadius,M=l*l,m=c*c,g=Math.sqrt((M-m)/M),_=r(t,e=n.CesiumMath.negativePiToPi(e),s,o.maximumRadius,g);return!a.defined(h)||a.defined(u)&&!u.equals(h.ellipsoid)?new d(t,_,o):(h.setEndPoints(t,_),h)},d.prototype.setEndPoints=function(t,i){l(this,t,i,this._ellipsoid)},d.prototype.interpolateUsingFraction=function(t,i){return this.interpolateUsingSurfaceDistance(t*this._distance,i)},d.prototype.interpolateUsingSurfaceDistance=function(t,i){return r(this._start,this._heading,t,this._ellipsoid.maximumRadius,this._ellipticity,i)},d.prototype.findIntersectionWithLongitude=function(t,e){const s=this._ellipticity,u=this._heading,h=Math.abs(u),o=this._start;if(t=n.CesiumMath.negativePiToPi(t),n.CesiumMath.equalsEpsilon(Math.abs(t),Math.PI,n.CesiumMath.EPSILON14)&&(t=n.CesiumMath.sign(o.longitude)*Math.PI),a.defined(e)||(e=new i.Cartographic),Math.abs(n.CesiumMath.PI_OVER_TWO-h)<=n.CesiumMath.EPSILON8)return e.longitude=t,e.latitude=o.latitude,e.height=0,e;if(n.CesiumMath.equalsEpsilon(Math.abs(n.CesiumMath.PI_OVER_TWO-h),n.CesiumMath.PI_OVER_TWO,n.CesiumMath.EPSILON8)){if(n.CesiumMath.equalsEpsilon(t,o.longitude,n.CesiumMath.EPSILON12))return;return e.longitude=t,e.latitude=n.CesiumMath.PI_OVER_TWO*n.CesiumMath.sign(n.CesiumMath.PI_OVER_TWO-u),e.height=0,e}const l=o.latitude,r=s*Math.sin(l),d=Math.tan(.5*(n.CesiumMath.PI_OVER_TWO+l))*Math.exp((t-o.longitude)/Math.tan(u)),c=(1+r)/(1-r);let M,m=o.latitude;do{M=m;const t=s*Math.sin(M),i=(1+t)/(1-t);m=2*Math.atan(d*Math.pow(i/c,s/2))-n.CesiumMath.PI_OVER_TWO}while(!n.CesiumMath.equalsEpsilon(m,M,n.CesiumMath.EPSILON12));return e.longitude=t,e.latitude=m,e.height=0,e},d.prototype.findIntersectionWithLatitude=function(t,e){const s=this._ellipticity,h=this._heading,o=this._start;if(n.CesiumMath.equalsEpsilon(Math.abs(h),n.CesiumMath.PI_OVER_TWO,n.CesiumMath.EPSILON8))return;const l=u(s,o.latitude),r=u(s,t),d=Math.tan(h)*(r-l),c=n.CesiumMath.negativePiToPi(o.longitude+d);return a.defined(e)?(e.longitude=c,e.latitude=t,e.height=0,e):new i.Cartographic(c,t,0)},t.EllipsoidRhumbLine=d}));
|
@@ -0,0 +1 @@
|
|
1
|
+
define(["exports","./AxisAlignedBoundingBox-a655a4bc","./Matrix2-47e98d76","./RuntimeError-8952249c","./defaultValue-81eec7ed","./IntersectionTests-58aa8f80","./Plane-3f01019d","./Transforms-c8cb8f43"],(function(t,n,e,i,o,r,s,a){"use strict";const l=new e.Cartesian4;function c(t,n){t=(n=o.defaultValue(n,e.Ellipsoid.WGS84)).scaleToGeodeticSurface(t);const i=a.Transforms.eastNorthUpToFixedFrame(t,n);this._ellipsoid=n,this._origin=t,this._xAxis=e.Cartesian3.fromCartesian4(e.Matrix4.getColumn(i,0,l)),this._yAxis=e.Cartesian3.fromCartesian4(e.Matrix4.getColumn(i,1,l));const r=e.Cartesian3.fromCartesian4(e.Matrix4.getColumn(i,2,l));this._plane=s.Plane.fromPointNormal(t,r)}Object.defineProperties(c.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});const d=new n.AxisAlignedBoundingBox;c.fromPoints=function(t,e){return new c(n.AxisAlignedBoundingBox.fromPoints(t,d).center,e)};const f=new r.Ray,p=new e.Cartesian3;c.prototype.projectPointOntoPlane=function(t,n){const i=f;i.origin=t,e.Cartesian3.normalize(t,i.direction);let s=r.IntersectionTests.rayPlane(i,this._plane,p);if(o.defined(s)||(e.Cartesian3.negate(i.direction,i.direction),s=r.IntersectionTests.rayPlane(i,this._plane,p)),o.defined(s)){const t=e.Cartesian3.subtract(s,this._origin,s),i=e.Cartesian3.dot(this._xAxis,t),r=e.Cartesian3.dot(this._yAxis,t);return o.defined(n)?(n.x=i,n.y=r,n):new e.Cartesian2(i,r)}},c.prototype.projectPointsOntoPlane=function(t,n){o.defined(n)||(n=[]);let e=0;const i=t.length;for(let r=0;r<i;r++){const i=this.projectPointOntoPlane(t[r],n[e]);o.defined(i)&&(n[e]=i,e++)}return n.length=e,n},c.prototype.projectPointToNearestOnPlane=function(t,n){o.defined(n)||(n=new e.Cartesian2);const i=f;i.origin=t,e.Cartesian3.clone(this._plane.normal,i.direction);let s=r.IntersectionTests.rayPlane(i,this._plane,p);o.defined(s)||(e.Cartesian3.negate(i.direction,i.direction),s=r.IntersectionTests.rayPlane(i,this._plane,p));const a=e.Cartesian3.subtract(s,this._origin,s),l=e.Cartesian3.dot(this._xAxis,a),c=e.Cartesian3.dot(this._yAxis,a);return n.x=l,n.y=c,n},c.prototype.projectPointsToNearestOnPlane=function(t,n){o.defined(n)||(n=[]);const e=t.length;n.length=e;for(let i=0;i<e;i++)n[i]=this.projectPointToNearestOnPlane(t[i],n[i]);return n};const u=new e.Cartesian3;c.prototype.projectPointOntoEllipsoid=function(t,n){o.defined(n)||(n=new e.Cartesian3);const i=this._ellipsoid,r=this._origin,s=this._xAxis,a=this._yAxis,l=u;return e.Cartesian3.multiplyByScalar(s,t.x,l),n=e.Cartesian3.add(r,l,n),e.Cartesian3.multiplyByScalar(a,t.y,l),e.Cartesian3.add(n,l,n),i.scaleToGeocentricSurface(n,n),n},c.prototype.projectPointsOntoEllipsoid=function(t,n){const e=t.length;o.defined(n)?n.length=e:n=new Array(e);for(let i=0;i<e;++i)n[i]=this.projectPointOntoEllipsoid(t[i],n[i]);return n},t.EllipsoidTangentPlane=c}));
|
package/dist/assets/cesium/Workers/{EncodedCartesian3-96fdc0ef.js → EncodedCartesian3-d9f5c4a4.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
define(["exports","./Matrix2-
|
1
|
+
define(["exports","./Matrix2-47e98d76","./RuntimeError-8952249c","./defaultValue-81eec7ed"],(function(e,n,o,i){"use strict";function t(){this.high=n.Cartesian3.clone(n.Cartesian3.ZERO),this.low=n.Cartesian3.clone(n.Cartesian3.ZERO)}t.encode=function(e,n){let o;return i.defined(n)||(n={high:0,low:0}),e>=0?(o=65536*Math.floor(e/65536),n.high=o,n.low=e-o):(o=65536*Math.floor(-e/65536),n.high=-o,n.low=e+o),n};const h={high:0,low:0};t.fromCartesian=function(e,n){i.defined(n)||(n=new t);const o=n.high,r=n.low;return t.encode(e.x,h),o.x=h.high,r.x=h.low,t.encode(e.y,h),o.y=h.high,r.y=h.low,t.encode(e.z,h),o.z=h.high,r.z=h.low,n};const r=new t;t.writeElements=function(e,n,o){t.fromCartesian(e,r);const i=r.high,h=r.low;n[o]=i.x,n[o+1]=i.y,n[o+2]=i.z,n[o+3]=h.x,n[o+4]=h.y,n[o+5]=h.z},e.EncodedCartesian3=t}));
|