@cesium/engine 9.1.0 → 10.0.0
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/Build/ThirdParty/Workers/pako_deflate.min.js +108 -210
- package/Build/ThirdParty/Workers/pako_inflate.min.js +466 -568
- package/Build/ThirdParty/Workers/z-worker-pako.js +54 -104
- package/Build/Workers/{chunk-TMMOULW3.js → chunk-2J3JKXCP.js} +5 -5
- package/Build/Workers/{chunk-ZDP32RQI.js → chunk-3WUV74WM.js} +95 -155
- package/Build/Workers/{chunk-FOZQIHZK.js → chunk-4BAE4PWO.js} +6 -6
- package/Build/Workers/{chunk-CYAJYEKW.js → chunk-4MSUJ4I7.js} +8 -8
- package/Build/Workers/{chunk-KPY4F4BW.js → chunk-4YSNMHZ4.js} +6 -6
- package/Build/Workers/{chunk-66E3H2KU.js → chunk-5S7OLEPK.js} +12 -12
- package/Build/Workers/{chunk-4AJGCQFX.js → chunk-7XGC6YB2.js} +14 -14
- package/Build/Workers/{chunk-BDUJXBVF.js → chunk-AA4GZKOT.js} +3 -5
- package/Build/Workers/{chunk-7LPEGKOF.js → chunk-AD5HBJ2F.js} +11 -8
- package/Build/Workers/{chunk-XHLDDE65.js → chunk-AVI4IUWC.js} +11 -11
- package/Build/Workers/{chunk-MWYZ64MH.js → chunk-BCL4PHHT.js} +10 -10
- package/Build/Workers/{chunk-PWF3YJJ5.js → chunk-BDFNKFOE.js} +13 -13
- package/Build/Workers/{chunk-7VZNXIKG.js → chunk-BJF5LOWE.js} +7 -7
- package/Build/Workers/{chunk-3S2MFY4B.js → chunk-C2CGMAIU.js} +13 -13
- package/Build/Workers/{chunk-UAJEGIWA.js → chunk-COYFZ5VA.js} +6 -6
- package/Build/Workers/{chunk-ZWPIM77Q.js → chunk-DGS5QNIO.js} +13 -13
- package/Build/Workers/{chunk-V7JB576Q.js → chunk-DKVHRNFY.js} +5 -5
- package/Build/Workers/{chunk-NI2R52QD.js → chunk-DOXCPOG4.js} +11 -9
- package/Build/Workers/{chunk-XWML5Y7N.js → chunk-FXIHSF7O.js} +9 -9
- package/Build/Workers/{chunk-LW7WGHEU.js → chunk-G3YR53LY.js} +13 -13
- package/Build/Workers/{chunk-34DGOKCO.js → chunk-GR3CDLCP.js} +7 -7
- package/Build/Workers/{chunk-AOIKO5Y7.js → chunk-GRAT5GE7.js} +5 -5
- package/Build/Workers/{chunk-AOFMPKUB.js → chunk-I2RC4XVN.js} +4 -4
- package/Build/Workers/{chunk-PK7TEP3J.js → chunk-JYAHOGGL.js} +15 -15
- package/Build/Workers/{chunk-4KIUON73.js → chunk-KUN2ZA5X.js} +4 -4
- package/Build/Workers/{chunk-POLFRINT.js → chunk-L6RTJ3RE.js} +14 -14
- package/Build/Workers/{chunk-LVJCR7DH.js → chunk-LCLJJ2MZ.js} +18 -18
- package/Build/Workers/{chunk-3RZK5NNV.js → chunk-LEABCTLP.js} +4 -4
- package/Build/Workers/{chunk-QKF7XXEQ.js → chunk-MDHQR3ZS.js} +10 -8
- package/Build/Workers/{chunk-4PHPQRSH.js → chunk-MSKXMXJI.js} +5 -6
- package/Build/Workers/{chunk-GIFJ77E4.js → chunk-NTXTUNEF.js} +4 -4
- package/Build/Workers/{chunk-I5TDPPC4.js → chunk-O3JCMSS3.js} +17 -17
- package/Build/Workers/{chunk-PEABJLCK.js → chunk-OOK53QUQ.js} +1 -1
- package/Build/Workers/{chunk-PS6AEMBR.js → chunk-OORVMGDU.js} +7 -7
- package/Build/Workers/{chunk-JI2445T5.js → chunk-PCP4YQST.js} +11 -11
- package/Build/Workers/{chunk-C5CE4OG6.js → chunk-PYHLO636.js} +42 -13
- package/Build/Workers/{chunk-S4XDCPKD.js → chunk-Q55ECN3Y.js} +1 -1
- package/Build/Workers/{chunk-WWP3I7R5.js → chunk-QD4KM3GO.js} +5 -5
- package/Build/Workers/{chunk-YLZTCEBJ.js → chunk-QMLTCCYG.js} +1 -1
- package/Build/Workers/{chunk-IBXGK4WV.js → chunk-QX5XS4LC.js} +2 -2
- package/Build/Workers/{chunk-RL73GOEF.js → chunk-R6B7UCQB.js} +2 -2
- package/Build/Workers/{chunk-RR7EOKGZ.js → chunk-RJYML24O.js} +48 -85
- package/Build/Workers/{chunk-U4IMCOF5.js → chunk-S3PI2KFM.js} +2 -2
- package/Build/Workers/{chunk-6HCAQOVK.js → chunk-STBBMQGG.js} +6 -6
- package/Build/Workers/{chunk-CE6GTZ4I.js → chunk-SYCPRK3D.js} +10 -10
- package/Build/Workers/{chunk-WFICTTOE.js → chunk-T77JILCU.js} +2 -2
- package/Build/Workers/{chunk-ZC4AGBZK.js → chunk-TO2PVHKI.js} +2 -2
- package/Build/Workers/{chunk-UCPPWV64.js → chunk-VE7BFUIX.js} +1 -1
- package/Build/Workers/{chunk-2CSEEWHN.js → chunk-VFBNELXB.js} +7 -7
- package/Build/Workers/{chunk-A6NCZSL3.js → chunk-VO3ACQB2.js} +19 -19
- package/Build/Workers/{chunk-WEGCQ5DY.js → chunk-X23FRWHJ.js} +6 -6
- package/Build/Workers/{chunk-G7CJQKKD.js → chunk-XD445VDH.js} +7 -7
- package/Build/Workers/combineGeometry.js +22 -22
- package/Build/Workers/createBoxGeometry.js +16 -16
- package/Build/Workers/createBoxOutlineGeometry.js +14 -14
- package/Build/Workers/createCircleGeometry.js +29 -25
- package/Build/Workers/createCircleOutlineGeometry.js +17 -17
- package/Build/Workers/createCoplanarPolygonGeometry.js +32 -32
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +27 -27
- package/Build/Workers/createCylinderGeometry.js +18 -18
- package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
- package/Build/Workers/createEllipseGeometry.js +24 -24
- package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
- package/Build/Workers/createEllipsoidGeometry.js +17 -17
- package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
- package/Build/Workers/createFrustumGeometry.js +16 -16
- package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
- package/Build/Workers/createGeometry.js +22 -22
- package/Build/Workers/createGroundPolylineGeometry.js +24 -24
- package/Build/Workers/createPlaneGeometry.js +14 -14
- package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createPolylineGeometry.js +24 -24
- package/Build/Workers/createPolylineVolumeGeometry.js +30 -30
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +26 -26
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +19 -19
- package/Build/Workers/createSimplePolylineGeometry.js +22 -22
- package/Build/Workers/createSphereGeometry.js +17 -17
- package/Build/Workers/createSphereOutlineGeometry.js +16 -16
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
- package/Build/Workers/createVectorTileGeometries.js +22 -22
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +20 -20
- package/Build/Workers/createVectorTilePolylines.js +13 -13
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
- package/Build/Workers/createVerticesFromHeightmap.js +21 -21
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
- package/Build/Workers/createWallGeometry.js +23 -23
- package/Build/Workers/createWallOutlineGeometry.js +22 -22
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +12 -19
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/transcodeKTX2.js +43 -79
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/Source/Core/ApproximateTerrainHeights.js +4 -4
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +12 -8
- package/Source/Core/BoundingRectangle.js +2 -0
- package/Source/Core/BoundingSphere.js +4 -2
- package/Source/Core/Cartesian3.js +13 -10
- package/Source/Core/Cartographic.js +11 -8
- package/Source/Core/CesiumTerrainProvider.js +3 -2
- package/Source/Core/CircleGeometry.js +6 -2
- package/Source/Core/CircleOutlineGeometry.js +1 -1
- package/Source/Core/CoplanarPolygonGeometry.js +3 -3
- package/Source/Core/CorridorGeometry.js +4 -4
- package/Source/Core/CorridorOutlineGeometry.js +2 -2
- package/Source/Core/Credit.js +3 -2
- package/Source/Core/CustomHeightmapTerrainProvider.js +17 -3
- package/Source/Core/EllipseGeometry.js +4 -4
- package/Source/Core/EllipseOutlineGeometry.js +2 -2
- package/Source/Core/Ellipsoid.js +34 -0
- package/Source/Core/EllipsoidGeodesic.js +2 -2
- package/Source/Core/EllipsoidRhumbLine.js +4 -4
- package/Source/Core/EllipsoidTangentPlane.js +3 -3
- package/Source/Core/EllipsoidTerrainProvider.js +3 -3
- package/Source/Core/GeographicProjection.js +4 -3
- package/Source/Core/GeographicTilingScheme.js +3 -3
- package/Source/Core/GeometryPipeline.js +2 -2
- package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
- package/Source/Core/GoogleMaps.js +1 -1
- package/Source/Core/GroundPolylineGeometry.js +1 -1
- package/Source/Core/HeightmapTessellator.js +2 -2
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/Math.js +0 -5
- package/Source/Core/Occluder.js +3 -3
- package/Source/Core/OrientedBoundingBox.js +2 -2
- package/Source/Core/PolygonGeometry.js +4 -4
- package/Source/Core/PolygonGeometryLibrary.js +1 -1
- package/Source/Core/PolygonOutlineGeometry.js +3 -3
- package/Source/Core/PolygonPipeline.js +2 -2
- package/Source/Core/PolylineGeometry.js +2 -2
- package/Source/Core/PolylinePipeline.js +6 -6
- package/Source/Core/PolylineVolumeGeometry.js +2 -2
- package/Source/Core/PolylineVolumeOutlineGeometry.js +2 -2
- package/Source/Core/Rectangle.js +6 -6
- package/Source/Core/RectangleGeometry.js +6 -6
- package/Source/Core/RectangleGeometryLibrary.js +3 -0
- package/Source/Core/RectangleOutlineGeometry.js +2 -2
- package/Source/Core/Simon1994PlanetaryPositions.js +3 -2
- package/Source/Core/SimplePolylineGeometry.js +2 -2
- package/Source/Core/Stereographic.js +2 -2
- package/Source/Core/TaskProcessor.js +19 -3
- package/Source/Core/Transforms.js +17 -17
- package/Source/Core/VRTheWorldTerrainProvider.js +2 -2
- package/Source/Core/WallGeometry.js +3 -3
- package/Source/Core/WallOutlineGeometry.js +3 -3
- package/Source/Core/WebMercatorTilingScheme.js +3 -3
- package/Source/Core/createWorldTerrainAsync.js +2 -0
- package/Source/Core/sampleTerrain.js +3 -3
- package/Source/DataSources/BoxGeometryUpdater.js +2 -2
- package/Source/DataSources/CylinderGeometryUpdater.js +2 -2
- package/Source/DataSources/CzmlDataSource.js +8 -8
- package/Source/DataSources/EllipsoidGeometryUpdater.js +3 -3
- package/Source/DataSources/EntityCluster.js +1 -1
- package/Source/DataSources/EntityView.js +2 -2
- package/Source/DataSources/KmlDataSource.js +4 -4
- package/Source/DataSources/ModelVisualizer.js +1 -2
- package/Source/DataSources/PolygonGeometryUpdater.js +1 -1
- package/Source/DataSources/PolylineGeometryUpdater.js +3 -2
- package/Source/DataSources/RectangleGeometryUpdater.js +1 -1
- package/Source/DataSources/ScaledPositionProperty.js +2 -2
- package/Source/DataSources/TerrainOffsetProperty.js +3 -7
- package/Source/DataSources/VelocityOrientationProperty.js +2 -2
- package/Source/DataSources/exportKml.js +2 -2
- package/Source/Renderer/UniformState.js +1 -1
- package/Source/Scene/ArcGisMapServerImageryProvider.js +2 -2
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +8 -6
- package/Source/Scene/BingMapsImageryProvider.js +1 -1
- package/Source/Scene/Camera.js +16 -10
- package/Source/Scene/Cesium3DTileset.js +1 -1
- package/Source/Scene/ClippingPolygon.js +2 -2
- package/Source/Scene/ClippingPolygonCollection.js +1 -1
- package/Source/Scene/CreditDisplay.js +94 -104
- package/Source/Scene/Globe.js +16 -13
- package/Source/Scene/GltfLoader.js +458 -435
- package/Source/Scene/GltfLoaderUtil.js +5 -16
- package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +23 -7
- package/Source/Scene/GltfStructuralMetadataLoader.js +11 -9
- package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +1 -1
- package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +1 -1
- package/Source/Scene/GridImageryProvider.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +2 -2
- package/Source/Scene/Label.js +1 -1
- package/Source/Scene/MapboxImageryProvider.js +1 -1
- package/Source/Scene/MapboxStyleImageryProvider.js +1 -1
- package/Source/Scene/MetadataSemantic.js +4 -4
- package/Source/Scene/Model/AlphaPipelineStage.js +1 -1
- package/Source/Scene/Model/GeometryPipelineStage.js +15 -43
- package/Source/Scene/Model/ImageBasedLightingPipelineStage.js +7 -0
- package/Source/Scene/Model/InstancingPipelineStage.js +3 -3
- package/Source/Scene/Model/LightingPipelineStage.js +2 -4
- package/Source/Scene/Model/MaterialPipelineStage.js +395 -29
- package/Source/Scene/Model/Model.js +15 -7
- package/Source/Scene/Model/ModelSceneGraph.js +1 -1
- package/Source/Scene/Model/ModelUtility.js +3 -0
- package/Source/Scene/Model/SceneMode2DPipelineStage.js +3 -3
- package/Source/Scene/Model/VerticalExaggerationPipelineStage.js +4 -6
- package/Source/Scene/Model/pickModel.js +2 -2
- package/Source/Scene/ModelComponents.js +178 -1
- package/Source/Scene/PickDepth.js +23 -15
- package/Source/Scene/Picking.js +4 -13
- package/Source/Scene/PointPrimitive.js +5 -2
- package/Source/Scene/ResourceCache.js +41 -50
- package/Source/Scene/ResourceCacheKey.js +41 -53
- package/Source/Scene/Scene.js +39 -31
- package/Source/Scene/SceneTransforms.js +78 -20
- package/Source/Scene/SceneTransitioner.js +2 -2
- package/Source/Scene/ScreenSpaceCameraController.js +29 -19
- package/Source/Scene/SkyBox.js +26 -0
- package/Source/Scene/Sun.js +1 -1
- package/Source/Shaders/Builtin/CzmBuiltins.js +4 -10
- package/Source/Shaders/Builtin/Functions/ellipsoidTextureCoordinates.glsl +10 -0
- package/Source/Shaders/Builtin/Functions/{ellipsoidWgs84TextureCoordinates.js → ellipsoidTextureCoordinates.js} +3 -3
- package/Source/Shaders/Builtin/Functions/maximumComponent.glsl +21 -0
- package/Source/Shaders/Builtin/Functions/maximumComponent.js +23 -0
- package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +108 -44
- package/Source/Shaders/Builtin/Functions/pbrLighting.js +108 -44
- package/Source/Shaders/Builtin/Structs/materialInput.glsl +1 -1
- package/Source/Shaders/Builtin/Structs/materialInput.js +1 -1
- package/Source/Shaders/Builtin/Structs/modelMaterial.glsl +16 -0
- package/Source/Shaders/Builtin/Structs/modelMaterial.js +16 -0
- package/Source/Shaders/EllipsoidFS.glsl +1 -1
- package/Source/Shaders/EllipsoidFS.js +1 -1
- package/Source/Shaders/GlobeFS.glsl +3 -3
- package/Source/Shaders/GlobeFS.js +3 -3
- package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +211 -133
- package/Source/Shaders/Model/ImageBasedLightingStageFS.js +212 -133
- package/Source/Shaders/Model/LightingStageFS.glsl +113 -48
- package/Source/Shaders/Model/LightingStageFS.js +113 -48
- package/Source/Shaders/Model/MaterialStageFS.glsl +407 -136
- package/Source/Shaders/Model/MaterialStageFS.js +407 -136
- package/Source/Widget/CesiumWidget.css +0 -5
- package/Source/Widget/CesiumWidget.js +29 -28
- package/index.d.ts +184 -116
- package/index.js +92 -95
- package/package.json +2 -2
- package/Source/Shaders/Builtin/Functions/defaultPbrMaterial.glsl +0 -16
- package/Source/Shaders/Builtin/Functions/defaultPbrMaterial.js +0 -18
- package/Source/Shaders/Builtin/Functions/ellipsoidWgs84TextureCoordinates.glsl +0 -10
- package/Source/Shaders/Builtin/Functions/pbrMetallicRoughnessMaterial.glsl +0 -37
- package/Source/Shaders/Builtin/Functions/pbrMetallicRoughnessMaterial.js +0 -39
- package/Source/Shaders/Builtin/Functions/pbrSpecularGlossinessMaterial.glsl +0 -30
- package/Source/Shaders/Builtin/Functions/pbrSpecularGlossinessMaterial.js +0 -32
- package/Source/Shaders/Builtin/Structs/pbrParameters.glsl +0 -16
- package/Source/Shaders/Builtin/Structs/pbrParameters.js +0 -18
package/Source/Core/Occluder.js
CHANGED
|
@@ -499,7 +499,7 @@ const computeOccludeePointFromRectangleScratch = [];
|
|
|
499
499
|
* Computes a point that can be used as the occludee position to the visibility functions from a rectangle.
|
|
500
500
|
*
|
|
501
501
|
* @param {Rectangle} rectangle The rectangle used to create a bounding sphere.
|
|
502
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
502
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid used to determine positions of the rectangle.
|
|
503
503
|
* @returns {object} An object containing two attributes: <code>occludeePoint</code> and <code>valid</code>
|
|
504
504
|
* which is a boolean value.
|
|
505
505
|
*/
|
|
@@ -510,7 +510,7 @@ Occluder.computeOccludeePointFromRectangle = function (rectangle, ellipsoid) {
|
|
|
510
510
|
}
|
|
511
511
|
//>>includeEnd('debug');
|
|
512
512
|
|
|
513
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
513
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
514
514
|
const positions = Rectangle.subsample(
|
|
515
515
|
rectangle,
|
|
516
516
|
ellipsoid,
|
|
@@ -519,7 +519,7 @@ Occluder.computeOccludeePointFromRectangle = function (rectangle, ellipsoid) {
|
|
|
519
519
|
);
|
|
520
520
|
const bs = BoundingSphere.fromPoints(positions);
|
|
521
521
|
|
|
522
|
-
//
|
|
522
|
+
// Assumes the ellipsoid is centered at the origin
|
|
523
523
|
const ellipsoidCenter = Cartesian3.ZERO;
|
|
524
524
|
if (!Cartesian3.equals(ellipsoidCenter, bs.center)) {
|
|
525
525
|
return Occluder.computeOccludeePoint(
|
|
@@ -332,7 +332,7 @@ const scratchPlane = new Plane(Cartesian3.UNIT_X, 0.0);
|
|
|
332
332
|
* @param {Rectangle} rectangle The cartographic rectangle on the surface of the ellipsoid.
|
|
333
333
|
* @param {number} [minimumHeight=0.0] The minimum height (elevation) within the tile.
|
|
334
334
|
* @param {number} [maximumHeight=0.0] The maximum height (elevation) within the tile.
|
|
335
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
335
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the rectangle is defined.
|
|
336
336
|
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
|
|
337
337
|
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided.
|
|
338
338
|
*
|
|
@@ -373,7 +373,7 @@ OrientedBoundingBox.fromRectangle = function (
|
|
|
373
373
|
|
|
374
374
|
minimumHeight = defaultValue(minimumHeight, 0.0);
|
|
375
375
|
maximumHeight = defaultValue(maximumHeight, 0.0);
|
|
376
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
376
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
377
377
|
|
|
378
378
|
let minX, maxX, minY, maxY, minZ, maxZ, plane;
|
|
379
379
|
|
|
@@ -585,7 +585,7 @@ function createGeometryFromPositionsExtruded(
|
|
|
585
585
|
* @param {number} [options.extrudedHeight] The distance in meters between the polygon's extruded face and the ellipsoid surface.
|
|
586
586
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
587
587
|
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
|
|
588
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
588
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
589
589
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
590
590
|
* @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
|
|
591
591
|
* @param {boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open.
|
|
@@ -691,7 +691,7 @@ function PolygonGeometry(options) {
|
|
|
691
691
|
|
|
692
692
|
const polygonHierarchy = options.polygonHierarchy;
|
|
693
693
|
const vertexFormat = defaultValue(options.vertexFormat, VertexFormat.DEFAULT);
|
|
694
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
694
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
695
695
|
const granularity = defaultValue(
|
|
696
696
|
options.granularity,
|
|
697
697
|
CesiumMath.RADIANS_PER_DEGREE
|
|
@@ -759,7 +759,7 @@ function PolygonGeometry(options) {
|
|
|
759
759
|
* @param {number} [options.extrudedHeight] The height of the polygon extrusion.
|
|
760
760
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
761
761
|
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
|
|
762
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
762
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
763
763
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
764
764
|
* @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
|
|
765
765
|
* @param {boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open.
|
|
@@ -1040,7 +1040,7 @@ const polygon = {
|
|
|
1040
1040
|
* Computes a rectangle which encloses the polygon defined by the list of positions, including cases over the international date line and the poles.
|
|
1041
1041
|
*
|
|
1042
1042
|
* @param {Cartesian3[]} positions A linear ring defining the outer boundary of the polygon.
|
|
1043
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
1043
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
1044
1044
|
* @param {ArcType} [arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
|
|
1045
1045
|
* @param {Rectangle} [result] An object in which to store the result.
|
|
1046
1046
|
*
|
|
@@ -362,7 +362,7 @@ PolygonGeometryLibrary.scaleToGeodeticHeightExtruded = function (
|
|
|
362
362
|
ellipsoid,
|
|
363
363
|
perPositionHeight
|
|
364
364
|
) {
|
|
365
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
365
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
366
366
|
|
|
367
367
|
const n1 = scaleToGeodeticHeightN1;
|
|
368
368
|
let n2 = scaleToGeodeticHeightN2;
|
|
@@ -273,7 +273,7 @@ function createGeometryFromPositionsExtruded(
|
|
|
273
273
|
* @param {number} [options.height=0.0] The distance in meters between the polygon and the ellipsoid surface.
|
|
274
274
|
* @param {number} [options.extrudedHeight] The distance in meters between the polygon's extruded face and the ellipsoid surface.
|
|
275
275
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
276
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
276
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
277
277
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
278
278
|
* @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
|
|
279
279
|
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of path the outline must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
|
|
@@ -370,7 +370,7 @@ function PolygonOutlineGeometry(options) {
|
|
|
370
370
|
//>>includeEnd('debug');
|
|
371
371
|
|
|
372
372
|
const polygonHierarchy = options.polygonHierarchy;
|
|
373
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
373
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
374
374
|
const granularity = defaultValue(
|
|
375
375
|
options.granularity,
|
|
376
376
|
CesiumMath.RADIANS_PER_DEGREE
|
|
@@ -518,7 +518,7 @@ PolygonOutlineGeometry.unpack = function (array, startingIndex, result) {
|
|
|
518
518
|
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
|
|
519
519
|
* @param {number} [options.height=0.0] The height of the polygon.
|
|
520
520
|
* @param {number} [options.extrudedHeight] The height of the polygon extrusion.
|
|
521
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
521
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
522
522
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
523
523
|
* @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
|
|
524
524
|
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of path the outline must follow. Valid options are {@link LinkType.GEODESIC} and {@link ArcType.RHUMB}.
|
|
@@ -587,7 +587,7 @@ PolygonPipeline.computeRhumbLineSubdivision = function (
|
|
|
587
587
|
*
|
|
588
588
|
* @param {number[]} positions The array of numbers representing the positions to be scaled
|
|
589
589
|
* @param {number} [height=0.0] The desired height to add to the positions
|
|
590
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
590
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the positions lie.
|
|
591
591
|
* @param {boolean} [scaleToSurface=true] <code>true</code> if the positions need to be scaled to the surface before the height is added.
|
|
592
592
|
* @returns {number[]} The input array of positions, scaled to height
|
|
593
593
|
*/
|
|
@@ -597,7 +597,7 @@ PolygonPipeline.scaleToGeodeticHeight = function (
|
|
|
597
597
|
ellipsoid,
|
|
598
598
|
scaleToSurface
|
|
599
599
|
) {
|
|
600
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
600
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
601
601
|
|
|
602
602
|
let n = scaleToGeodeticHeightN;
|
|
603
603
|
let p = scaleToGeodeticHeightP;
|
|
@@ -75,7 +75,7 @@ function interpolateColors(p0, p1, color0, color1, numPoints) {
|
|
|
75
75
|
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
|
|
76
76
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
|
|
77
77
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
78
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
78
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
79
79
|
*
|
|
80
80
|
* @exception {DeveloperError} At least two positions are required.
|
|
81
81
|
* @exception {DeveloperError} width must be greater than or equal to one.
|
|
@@ -134,7 +134,7 @@ function PolylineGeometry(options) {
|
|
|
134
134
|
CesiumMath.RADIANS_PER_DEGREE
|
|
135
135
|
);
|
|
136
136
|
this._ellipsoid = Ellipsoid.clone(
|
|
137
|
-
defaultValue(options.ellipsoid, Ellipsoid.
|
|
137
|
+
defaultValue(options.ellipsoid, Ellipsoid.default)
|
|
138
138
|
);
|
|
139
139
|
this._workerName = "createPolylineGeometry";
|
|
140
140
|
|
|
@@ -311,7 +311,7 @@ PolylinePipeline.wrapLongitude = function (positions, modelMatrix) {
|
|
|
311
311
|
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
|
|
312
312
|
* @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
|
|
313
313
|
* @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
314
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
314
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the positions lie.
|
|
315
315
|
* @returns {number[]} A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
|
|
316
316
|
*
|
|
317
317
|
* @example
|
|
@@ -337,7 +337,7 @@ PolylinePipeline.generateArc = function (options) {
|
|
|
337
337
|
//>>includeEnd('debug');
|
|
338
338
|
|
|
339
339
|
const length = positions.length;
|
|
340
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
340
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
341
341
|
let height = defaultValue(options.height, 0);
|
|
342
342
|
const hasHeightArray = Array.isArray(height);
|
|
343
343
|
|
|
@@ -418,7 +418,7 @@ const scratchCartographic1 = new Cartographic();
|
|
|
418
418
|
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
|
|
419
419
|
* @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
|
|
420
420
|
* @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
421
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
421
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the positions lie.
|
|
422
422
|
* @returns {number[]} A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
|
|
423
423
|
*
|
|
424
424
|
* @example
|
|
@@ -444,7 +444,7 @@ PolylinePipeline.generateRhumbArc = function (options) {
|
|
|
444
444
|
//>>includeEnd('debug');
|
|
445
445
|
|
|
446
446
|
const length = positions.length;
|
|
447
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
447
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
448
448
|
let height = defaultValue(options.height, 0);
|
|
449
449
|
const hasHeightArray = Array.isArray(height);
|
|
450
450
|
|
|
@@ -524,7 +524,7 @@ PolylinePipeline.generateRhumbArc = function (options) {
|
|
|
524
524
|
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
|
|
525
525
|
* @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
|
|
526
526
|
* @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
527
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
527
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the positions lie.
|
|
528
528
|
* @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
|
|
529
529
|
*
|
|
530
530
|
* @example
|
|
@@ -554,7 +554,7 @@ PolylinePipeline.generateCartesianArc = function (options) {
|
|
|
554
554
|
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
|
|
555
555
|
* @param {number|number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
|
|
556
556
|
* @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
557
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
557
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the positions lie.
|
|
558
558
|
* @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
|
|
559
559
|
*
|
|
560
560
|
* @example
|
|
@@ -178,7 +178,7 @@ function computeAttributes(
|
|
|
178
178
|
* @param {object} options Object with the following properties:
|
|
179
179
|
* @param {Cartesian3[]} options.polylinePositions An array of {@link Cartesian3} positions that define the center of the polyline volume.
|
|
180
180
|
* @param {Cartesian2[]} options.shapePositions An array of {@link Cartesian2} positions that define the shape to be extruded along the polyline
|
|
181
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
181
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
182
182
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
183
183
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
184
184
|
* @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
|
|
@@ -223,7 +223,7 @@ function PolylineVolumeGeometry(options) {
|
|
|
223
223
|
this._positions = positions;
|
|
224
224
|
this._shape = shape;
|
|
225
225
|
this._ellipsoid = Ellipsoid.clone(
|
|
226
|
-
defaultValue(options.ellipsoid, Ellipsoid.
|
|
226
|
+
defaultValue(options.ellipsoid, Ellipsoid.default)
|
|
227
227
|
);
|
|
228
228
|
this._cornerType = defaultValue(options.cornerType, CornerType.ROUNDED);
|
|
229
229
|
this._vertexFormat = VertexFormat.clone(
|
|
@@ -83,7 +83,7 @@ function computeAttributes(positions, shape) {
|
|
|
83
83
|
* @param {object} options Object with the following properties:
|
|
84
84
|
* @param {Cartesian3[]} options.polylinePositions An array of positions that define the center of the polyline volume.
|
|
85
85
|
* @param {Cartesian2[]} options.shapePositions An array of positions that define the shape to be extruded along the polyline
|
|
86
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
86
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
87
87
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
88
88
|
* @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
|
|
89
89
|
*
|
|
@@ -124,7 +124,7 @@ function PolylineVolumeOutlineGeometry(options) {
|
|
|
124
124
|
this._positions = positions;
|
|
125
125
|
this._shape = shape;
|
|
126
126
|
this._ellipsoid = Ellipsoid.clone(
|
|
127
|
-
defaultValue(options.ellipsoid, Ellipsoid.
|
|
127
|
+
defaultValue(options.ellipsoid, Ellipsoid.default)
|
|
128
128
|
);
|
|
129
129
|
this._cornerType = defaultValue(options.cornerType, CornerType.ROUNDED);
|
|
130
130
|
this._granularity = defaultValue(
|
package/Source/Core/Rectangle.js
CHANGED
|
@@ -285,7 +285,7 @@ Rectangle.fromCartographicArray = function (cartographics, result) {
|
|
|
285
285
|
* Creates the smallest possible Rectangle that encloses all positions in the provided array.
|
|
286
286
|
*
|
|
287
287
|
* @param {Cartesian3[]} cartesians The list of Cartesian instances.
|
|
288
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
288
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid the cartesians are on.
|
|
289
289
|
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
|
|
290
290
|
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
|
|
291
291
|
*/
|
|
@@ -293,7 +293,7 @@ Rectangle.fromCartesianArray = function (cartesians, ellipsoid, result) {
|
|
|
293
293
|
//>>includeStart('debug', pragmas.debug);
|
|
294
294
|
Check.defined("cartesians", cartesians);
|
|
295
295
|
//>>includeEnd('debug');
|
|
296
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
296
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
297
297
|
|
|
298
298
|
let west = Number.MAX_VALUE;
|
|
299
299
|
let east = -Number.MAX_VALUE;
|
|
@@ -354,7 +354,7 @@ for (let n = 0; n < fromBoundingSpherePositionsScratch.length; ++n) {
|
|
|
354
354
|
*
|
|
355
355
|
*
|
|
356
356
|
* @param {BoundingSphere} boundingSphere The bounding sphere.
|
|
357
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
357
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid.
|
|
358
358
|
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
|
|
359
359
|
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
|
|
360
360
|
*/
|
|
@@ -367,7 +367,7 @@ Rectangle.fromBoundingSphere = function (boundingSphere, ellipsoid, result) {
|
|
|
367
367
|
const radius = boundingSphere.radius;
|
|
368
368
|
|
|
369
369
|
if (!defined(ellipsoid)) {
|
|
370
|
-
ellipsoid = Ellipsoid.
|
|
370
|
+
ellipsoid = Ellipsoid.default;
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
if (!defined(result)) {
|
|
@@ -912,7 +912,7 @@ const subsampleLlaScratch = new Cartographic();
|
|
|
912
912
|
* for rectangles that cover the poles or cross the equator.
|
|
913
913
|
*
|
|
914
914
|
* @param {Rectangle} rectangle The rectangle to subsample.
|
|
915
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
915
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to use.
|
|
916
916
|
* @param {number} [surfaceHeight=0.0] The height of the rectangle above the ellipsoid.
|
|
917
917
|
* @param {Cartesian3[]} [result] The array of Cartesians onto which to store the result.
|
|
918
918
|
* @returns {Cartesian3[]} The modified result parameter or a new Array of Cartesians instances if none was provided.
|
|
@@ -922,7 +922,7 @@ Rectangle.subsample = function (rectangle, ellipsoid, surfaceHeight, result) {
|
|
|
922
922
|
Check.typeOf.object("rectangle", rectangle);
|
|
923
923
|
//>>includeEnd('debug');
|
|
924
924
|
|
|
925
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
925
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
926
926
|
surfaceHeight = defaultValue(surfaceHeight, 0.0);
|
|
927
927
|
|
|
928
928
|
if (!defined(result)) {
|
|
@@ -978,7 +978,7 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
|
|
|
978
978
|
* @param {object} options Object with the following properties:
|
|
979
979
|
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
|
|
980
980
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
981
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
981
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the rectangle lies.
|
|
982
982
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
983
983
|
* @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
|
|
984
984
|
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
|
|
@@ -998,7 +998,7 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
|
|
|
998
998
|
* @example
|
|
999
999
|
* // 1. create a rectangle
|
|
1000
1000
|
* const rectangle = new Cesium.RectangleGeometry({
|
|
1001
|
-
* ellipsoid : Cesium.Ellipsoid.
|
|
1001
|
+
* ellipsoid : Cesium.Ellipsoid.default,
|
|
1002
1002
|
* rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0),
|
|
1003
1003
|
* height : 10000.0
|
|
1004
1004
|
* });
|
|
@@ -1006,7 +1006,7 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
|
|
|
1006
1006
|
*
|
|
1007
1007
|
* // 2. create an extruded rectangle without a top
|
|
1008
1008
|
* const rectangle = new Cesium.RectangleGeometry({
|
|
1009
|
-
* ellipsoid : Cesium.Ellipsoid.
|
|
1009
|
+
* ellipsoid : Cesium.Ellipsoid.default,
|
|
1010
1010
|
* rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0),
|
|
1011
1011
|
* height : 10000.0,
|
|
1012
1012
|
* extrudedHeight: 300000
|
|
@@ -1037,7 +1037,7 @@ function RectangleGeometry(options) {
|
|
|
1037
1037
|
CesiumMath.RADIANS_PER_DEGREE
|
|
1038
1038
|
);
|
|
1039
1039
|
this._ellipsoid = Ellipsoid.clone(
|
|
1040
|
-
defaultValue(options.ellipsoid, Ellipsoid.
|
|
1040
|
+
defaultValue(options.ellipsoid, Ellipsoid.default)
|
|
1041
1041
|
);
|
|
1042
1042
|
this._surfaceHeight = Math.max(height, extrudedHeight);
|
|
1043
1043
|
this._rotation = defaultValue(options.rotation, 0.0);
|
|
@@ -1185,7 +1185,7 @@ RectangleGeometry.unpack = function (array, startingIndex, result) {
|
|
|
1185
1185
|
*
|
|
1186
1186
|
* @param {object} options Object with the following properties:
|
|
1187
1187
|
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
|
|
1188
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
1188
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the rectangle lies.
|
|
1189
1189
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
1190
1190
|
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
|
|
1191
1191
|
* @param {Rectangle} [result] An object in which to store the result.
|
|
@@ -1211,7 +1211,7 @@ RectangleGeometry.computeRectangle = function (options, result) {
|
|
|
1211
1211
|
options.granularity,
|
|
1212
1212
|
CesiumMath.RADIANS_PER_DEGREE
|
|
1213
1213
|
);
|
|
1214
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
1214
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
1215
1215
|
const rotation = defaultValue(options.rotation, 0.0);
|
|
1216
1216
|
|
|
1217
1217
|
return computeRectangle(rectangle, granularity, rotation, ellipsoid, result);
|
|
@@ -2,6 +2,7 @@ import Cartesian3 from "./Cartesian3.js";
|
|
|
2
2
|
import Cartographic from "./Cartographic.js";
|
|
3
3
|
import defined from "./defined.js";
|
|
4
4
|
import DeveloperError from "./DeveloperError.js";
|
|
5
|
+
import Ellipsoid from "./Ellipsoid.js";
|
|
5
6
|
import GeographicProjection from "./GeographicProjection.js";
|
|
6
7
|
import CesiumMath from "./Math.js";
|
|
7
8
|
import Matrix2 from "./Matrix2.js";
|
|
@@ -100,6 +101,7 @@ function getRotationOptions(
|
|
|
100
101
|
const granYSin = granularityY * sinRotation;
|
|
101
102
|
const granXSin = granularityX * sinRotation;
|
|
102
103
|
|
|
104
|
+
proj._ellipsoid = Ellipsoid.default;
|
|
103
105
|
nwCartesian = proj.project(nwCorner, nwCartesian);
|
|
104
106
|
|
|
105
107
|
nwCartesian = Cartesian3.subtract(nwCartesian, centerCartesian, nwCartesian);
|
|
@@ -190,6 +192,7 @@ RectangleGeometryLibrary.computeOptions = function (
|
|
|
190
192
|
if (center.longitude < nwCorner.longitude) {
|
|
191
193
|
center.longitude += CesiumMath.TWO_PI;
|
|
192
194
|
}
|
|
195
|
+
proj._ellipsoid = Ellipsoid.default;
|
|
193
196
|
centerCartesian = proj.project(center, centerCartesian);
|
|
194
197
|
}
|
|
195
198
|
|
|
@@ -247,7 +247,7 @@ function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
|
|
|
247
247
|
*
|
|
248
248
|
* @param {object} options Object with the following properties:
|
|
249
249
|
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
|
|
250
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
250
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the rectangle lies.
|
|
251
251
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
252
252
|
* @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
|
|
253
253
|
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
|
|
@@ -277,7 +277,7 @@ function RectangleOutlineGeometry(options) {
|
|
|
277
277
|
options.granularity,
|
|
278
278
|
CesiumMath.RADIANS_PER_DEGREE
|
|
279
279
|
);
|
|
280
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
280
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
281
281
|
const rotation = defaultValue(options.rotation, 0.0);
|
|
282
282
|
|
|
283
283
|
//>>includeStart('debug', pragmas.debug);
|
|
@@ -613,7 +613,7 @@ function computeSimonEarth(date, result) {
|
|
|
613
613
|
}
|
|
614
614
|
|
|
615
615
|
// Values for the <code>axesTransformation</code> needed for the rotation were found using the STK Components
|
|
616
|
-
//
|
|
616
|
+
// GeographicTransformer on the position of the sun center of mass point and the earth J2000 frame.
|
|
617
617
|
|
|
618
618
|
const axesTransformation = new Matrix3(
|
|
619
619
|
1.0000000000000002,
|
|
@@ -662,7 +662,7 @@ Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame = function (
|
|
|
662
662
|
/**
|
|
663
663
|
* Computes the position of the Moon in the Earth-centered inertial frame
|
|
664
664
|
*
|
|
665
|
-
* @param {JulianDate} [julianDate] The time at which to compute the
|
|
665
|
+
* @param {JulianDate} [julianDate] The time at which to compute the moon's position, if not provided the current system time is used.
|
|
666
666
|
* @param {Cartesian3} [result] The object onto which to store the result.
|
|
667
667
|
* @returns {Cartesian3} Calculated moon position
|
|
668
668
|
*/
|
|
@@ -679,4 +679,5 @@ Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame = function (
|
|
|
679
679
|
|
|
680
680
|
return result;
|
|
681
681
|
};
|
|
682
|
+
|
|
682
683
|
export default Simon1994PlanetaryPositions;
|
|
@@ -68,7 +68,7 @@ function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
|
|
|
68
68
|
* @param {boolean} [options.colorsPerVertex=false] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
|
|
69
69
|
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
|
|
70
70
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
|
|
71
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
71
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
72
72
|
*
|
|
73
73
|
* @exception {DeveloperError} At least two positions are required.
|
|
74
74
|
* @exception {DeveloperError} colors has an invalid length.
|
|
@@ -114,7 +114,7 @@ function SimplePolylineGeometry(options) {
|
|
|
114
114
|
options.granularity,
|
|
115
115
|
CesiumMath.RADIANS_PER_DEGREE
|
|
116
116
|
);
|
|
117
|
-
this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
117
|
+
this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
118
118
|
this._workerName = "createSimplePolylineGeometry";
|
|
119
119
|
|
|
120
120
|
let numComponents = 1 + positions.length * Cartesian3.packedLength;
|
|
@@ -99,12 +99,12 @@ const scratchCartesian = new Cartesian3();
|
|
|
99
99
|
/**
|
|
100
100
|
* Computes the latitude based on an ellipsoid.
|
|
101
101
|
*
|
|
102
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
102
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which to compute the longitude.
|
|
103
103
|
* @returns {number} The latitude
|
|
104
104
|
*/
|
|
105
105
|
Stereographic.prototype.getLatitude = function (ellipsoid) {
|
|
106
106
|
if (!defined(ellipsoid)) {
|
|
107
|
-
ellipsoid = Ellipsoid.
|
|
107
|
+
ellipsoid = Ellipsoid.default;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
scratchCartographic.latitude = this.conformalLatitude;
|
|
@@ -81,18 +81,34 @@ function urlFromScript(script) {
|
|
|
81
81
|
function createWorker(url) {
|
|
82
82
|
const uri = new Uri(url);
|
|
83
83
|
const isUri = uri.scheme().length !== 0 && uri.fragment().length === 0;
|
|
84
|
+
const moduleID = url.replace(/\.js$/, "");
|
|
84
85
|
|
|
85
86
|
const options = {};
|
|
86
87
|
let workerPath;
|
|
88
|
+
let crossOriginUrl;
|
|
89
|
+
|
|
90
|
+
// If we are provided a fully resolved URL, check it is cross-origin
|
|
91
|
+
// Or if provided a module ID, check the full absolute URL instead.
|
|
87
92
|
if (isCrossOriginUrl(url)) {
|
|
93
|
+
crossOriginUrl = url;
|
|
94
|
+
} else if (!isUri) {
|
|
95
|
+
const moduleAbsoluteUrl = buildModuleUrl(
|
|
96
|
+
`${TaskProcessor._workerModulePrefix}/${moduleID}.js`
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
if (isCrossOriginUrl(moduleAbsoluteUrl)) {
|
|
100
|
+
crossOriginUrl = moduleAbsoluteUrl;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (crossOriginUrl) {
|
|
88
105
|
// To load cross-origin, create a shim worker from a blob URL
|
|
89
|
-
const script = `
|
|
106
|
+
const script = `import "${crossOriginUrl}";`;
|
|
90
107
|
workerPath = urlFromScript(script);
|
|
108
|
+
options.type = "module";
|
|
91
109
|
return new Worker(workerPath, options);
|
|
92
110
|
}
|
|
93
111
|
|
|
94
|
-
const moduleID = url.replace(/\.js$/, "");
|
|
95
|
-
|
|
96
112
|
/* global CESIUM_WORKERS */
|
|
97
113
|
if (!isUri && typeof CESIUM_WORKERS !== "undefined") {
|
|
98
114
|
// If the workers are embedded, create a shim worker from the embedded script data
|
|
@@ -113,7 +113,7 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
|
|
|
113
113
|
* centered at the provided origin to the provided ellipsoid's fixed reference frame.
|
|
114
114
|
* @callback Transforms.LocalFrameToFixedFrame
|
|
115
115
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
116
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
116
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
117
117
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
118
118
|
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
|
|
119
119
|
*/
|
|
@@ -199,7 +199,7 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
|
|
|
199
199
|
);
|
|
200
200
|
}
|
|
201
201
|
} else {
|
|
202
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
202
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
203
203
|
ellipsoid.geodeticSurfaceNormal(origin, scratchCalculateCartesian.up);
|
|
204
204
|
|
|
205
205
|
const up = scratchCalculateCartesian.up;
|
|
@@ -265,7 +265,7 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
|
|
|
265
265
|
*
|
|
266
266
|
* @function
|
|
267
267
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
268
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
268
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
269
269
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
270
270
|
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
|
|
271
271
|
*
|
|
@@ -291,7 +291,7 @@ Transforms.eastNorthUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
|
|
|
291
291
|
*
|
|
292
292
|
* @function
|
|
293
293
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
294
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
294
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
295
295
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
296
296
|
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
|
|
297
297
|
*
|
|
@@ -317,7 +317,7 @@ Transforms.northEastDownToFixedFrame = Transforms.localFrameToFixedFrameGenerato
|
|
|
317
317
|
*
|
|
318
318
|
* @function
|
|
319
319
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
320
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
320
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
321
321
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
322
322
|
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
|
|
323
323
|
*
|
|
@@ -343,7 +343,7 @@ Transforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
|
|
|
343
343
|
*
|
|
344
344
|
* @function
|
|
345
345
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
346
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
346
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
347
347
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
348
348
|
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
|
|
349
349
|
*
|
|
@@ -369,7 +369,7 @@ const scratchHPRMatrix4 = new Matrix4();
|
|
|
369
369
|
*
|
|
370
370
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
371
371
|
* @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.
|
|
372
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
372
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
373
373
|
* @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
|
|
374
374
|
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
|
|
375
375
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
@@ -424,7 +424,7 @@ const scratchHPRMatrix3 = new Matrix3();
|
|
|
424
424
|
*
|
|
425
425
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
426
426
|
* @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.
|
|
427
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
427
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
428
428
|
* @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
|
|
429
429
|
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
|
|
430
430
|
* @param {Quaternion} [result] The object onto which to store the result.
|
|
@@ -473,7 +473,7 @@ const hprQuaternionScratch = new Quaternion();
|
|
|
473
473
|
* are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.
|
|
474
474
|
*
|
|
475
475
|
* @param {Matrix4} transform The transform
|
|
476
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
476
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
477
477
|
* @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
|
|
478
478
|
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
|
|
479
479
|
* @param {HeadingPitchRoll} [result] The object onto which to store the result.
|
|
@@ -489,7 +489,7 @@ Transforms.fixedFrameToHeadingPitchRoll = function (
|
|
|
489
489
|
Check.defined("transform", transform);
|
|
490
490
|
//>>includeEnd('debug');
|
|
491
491
|
|
|
492
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
492
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
493
493
|
fixedFrameTransform = defaultValue(
|
|
494
494
|
fixedFrameTransform,
|
|
495
495
|
Transforms.eastNorthUpToFixedFrame
|
|
@@ -950,7 +950,7 @@ const upScratch = new Cartesian3();
|
|
|
950
950
|
*
|
|
951
951
|
* @param {Cartesian3} position The position to transform.
|
|
952
952
|
* @param {Cartesian3} velocity The velocity vector to transform.
|
|
953
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
953
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
954
954
|
* @param {Matrix3} [result] The object onto which to store the result.
|
|
955
955
|
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.
|
|
956
956
|
*/
|
|
@@ -970,10 +970,10 @@ Transforms.rotationMatrixFromPositionVelocity = function (
|
|
|
970
970
|
}
|
|
971
971
|
//>>includeEnd('debug');
|
|
972
972
|
|
|
973
|
-
const normal = defaultValue(
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
);
|
|
973
|
+
const normal = defaultValue(
|
|
974
|
+
ellipsoid,
|
|
975
|
+
Ellipsoid.default
|
|
976
|
+
).geodeticSurfaceNormal(position, normalScratch);
|
|
977
977
|
let right = Cartesian3.cross(velocity, normal, rightScratch);
|
|
978
978
|
|
|
979
979
|
if (Cartesian3.equalsEpsilon(right, Cartesian3.ZERO, CesiumMath.EPSILON6)) {
|
|
@@ -1073,7 +1073,7 @@ Transforms.basisTo2D = function (projection, matrix, result) {
|
|
|
1073
1073
|
);
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
|
-
// Assuming the instance are positioned
|
|
1076
|
+
// Assuming the instance are positioned on the ellipsoid, invert the ellipsoidal transform to get the local transform and then convert to 2D
|
|
1077
1077
|
const fromENU = Transforms.eastNorthUpToFixedFrame(
|
|
1078
1078
|
rtcCenter,
|
|
1079
1079
|
ellipsoid,
|
|
@@ -1091,7 +1091,7 @@ Transforms.basisTo2D = function (projection, matrix, result) {
|
|
|
1091
1091
|
/**
|
|
1092
1092
|
* @private
|
|
1093
1093
|
*/
|
|
1094
|
-
Transforms.
|
|
1094
|
+
Transforms.ellipsoidTo2DModelMatrix = function (projection, center, result) {
|
|
1095
1095
|
//>>includeStart('debug', pragmas.debug);
|
|
1096
1096
|
if (!defined(projection)) {
|
|
1097
1097
|
throw new DeveloperError("projection is required.");
|