@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
|
@@ -83,6 +83,7 @@ Cartographic.fromDegrees = function (longitude, latitude, height, result) {
|
|
|
83
83
|
Check.typeOf.number("longitude", longitude);
|
|
84
84
|
Check.typeOf.number("latitude", latitude);
|
|
85
85
|
//>>includeEnd('debug');
|
|
86
|
+
|
|
86
87
|
longitude = CesiumMath.toRadians(longitude);
|
|
87
88
|
latitude = CesiumMath.toRadians(latitude);
|
|
88
89
|
|
|
@@ -92,37 +93,39 @@ Cartographic.fromDegrees = function (longitude, latitude, height, result) {
|
|
|
92
93
|
const cartesianToCartographicN = new Cartesian3();
|
|
93
94
|
const cartesianToCartographicP = new Cartesian3();
|
|
94
95
|
const cartesianToCartographicH = new Cartesian3();
|
|
95
|
-
|
|
96
|
+
|
|
97
|
+
// To avoid circular dependencies, these are set by Ellipsoid when Ellipsoid.default is set.
|
|
98
|
+
Cartographic._ellipsoidOneOverRadii = new Cartesian3(
|
|
96
99
|
1.0 / 6378137.0,
|
|
97
100
|
1.0 / 6378137.0,
|
|
98
101
|
1.0 / 6356752.3142451793
|
|
99
102
|
);
|
|
100
|
-
|
|
103
|
+
Cartographic._ellipsoidOneOverRadiiSquared = new Cartesian3(
|
|
101
104
|
1.0 / (6378137.0 * 6378137.0),
|
|
102
105
|
1.0 / (6378137.0 * 6378137.0),
|
|
103
106
|
1.0 / (6356752.3142451793 * 6356752.3142451793)
|
|
104
107
|
);
|
|
105
|
-
|
|
108
|
+
Cartographic._ellipsoidCenterToleranceSquared = CesiumMath.EPSILON1;
|
|
106
109
|
|
|
107
110
|
/**
|
|
108
111
|
* Creates a new Cartographic instance from a Cartesian position. The values in the
|
|
109
112
|
* resulting object will be in radians.
|
|
110
113
|
*
|
|
111
114
|
* @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.
|
|
112
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
115
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.
|
|
113
116
|
* @param {Cartographic} [result] The object onto which to store the result.
|
|
114
117
|
* @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
|
|
115
118
|
*/
|
|
116
119
|
Cartographic.fromCartesian = function (cartesian, ellipsoid, result) {
|
|
117
120
|
const oneOverRadii = defined(ellipsoid)
|
|
118
121
|
? ellipsoid.oneOverRadii
|
|
119
|
-
:
|
|
122
|
+
: Cartographic._ellipsoidOneOverRadii;
|
|
120
123
|
const oneOverRadiiSquared = defined(ellipsoid)
|
|
121
124
|
? ellipsoid.oneOverRadiiSquared
|
|
122
|
-
:
|
|
125
|
+
: Cartographic._ellipsoidOneOverRadiiSquared;
|
|
123
126
|
const centerToleranceSquared = defined(ellipsoid)
|
|
124
127
|
? ellipsoid._centerToleranceSquared
|
|
125
|
-
:
|
|
128
|
+
: Cartographic._ellipsoidCenterToleranceSquared;
|
|
126
129
|
|
|
127
130
|
//`cartesian is required.` is thrown from scaleToGeodeticSurface
|
|
128
131
|
const p = scaleToGeodeticSurface(
|
|
@@ -165,7 +168,7 @@ Cartographic.fromCartesian = function (cartesian, ellipsoid, result) {
|
|
|
165
168
|
* object should be in radians.
|
|
166
169
|
*
|
|
167
170
|
* @param {Cartographic} cartographic Input to be converted into a Cartesian3 output.
|
|
168
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
171
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.
|
|
169
172
|
* @param {Cartesian3} [result] The object onto which to store the result.
|
|
170
173
|
* @returns {Cartesian3} The position
|
|
171
174
|
*/
|
|
@@ -5,6 +5,7 @@ import Check from "./Check.js";
|
|
|
5
5
|
import Credit from "./Credit.js";
|
|
6
6
|
import defaultValue from "./defaultValue.js";
|
|
7
7
|
import defined from "./defined.js";
|
|
8
|
+
import Ellipsoid from "./Ellipsoid.js";
|
|
8
9
|
import Event from "./Event.js";
|
|
9
10
|
import GeographicTilingScheme from "./GeographicTilingScheme.js";
|
|
10
11
|
import WebMercatorTilingScheme from "./WebMercatorTilingScheme.js";
|
|
@@ -45,7 +46,7 @@ function LayerInformation(layer) {
|
|
|
45
46
|
* @property {boolean} [requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server, in the form of per vertex normals if available.
|
|
46
47
|
* @property {boolean} [requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server, if available.
|
|
47
48
|
* @property {boolean} [requestMetadata=true] Flag that indicates if the client should request per tile metadata from the server, if available.
|
|
48
|
-
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the
|
|
49
|
+
* @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
49
50
|
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
|
|
50
51
|
*/
|
|
51
52
|
|
|
@@ -61,7 +62,7 @@ function TerrainProviderBuilder(options) {
|
|
|
61
62
|
this.requestVertexNormals = defaultValue(options.requestVertexNormals, false);
|
|
62
63
|
this.requestWaterMask = defaultValue(options.requestWaterMask, false);
|
|
63
64
|
this.requestMetadata = defaultValue(options.requestMetadata, true);
|
|
64
|
-
this.ellipsoid = options.ellipsoid;
|
|
65
|
+
this.ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
65
66
|
|
|
66
67
|
this.heightmapWidth = 65;
|
|
67
68
|
this.heightmapStructure = undefined;
|
|
@@ -15,7 +15,7 @@ import VertexFormat from "./VertexFormat.js";
|
|
|
15
15
|
* @param {object} options Object with the following properties:
|
|
16
16
|
* @param {Cartesian3} options.center The circle's center point in the fixed frame.
|
|
17
17
|
* @param {number} options.radius The radius in meters.
|
|
18
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
18
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid the circle will be on.
|
|
19
19
|
* @param {number} [options.height=0.0] The distance in meters between the circle and the ellipsoid surface.
|
|
20
20
|
* @param {number} [options.granularity=0.02] The angular distance between points on the circle in radians.
|
|
21
21
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
@@ -90,7 +90,7 @@ const scratchEllipseGeometry = new EllipseGeometry({
|
|
|
90
90
|
const scratchOptions = {
|
|
91
91
|
center: new Cartesian3(),
|
|
92
92
|
radius: undefined,
|
|
93
|
-
ellipsoid: Ellipsoid.clone(Ellipsoid.
|
|
93
|
+
ellipsoid: Ellipsoid.clone(Ellipsoid.default),
|
|
94
94
|
height: undefined,
|
|
95
95
|
extrudedHeight: undefined,
|
|
96
96
|
granularity: undefined,
|
|
@@ -123,6 +123,10 @@ CircleGeometry.unpack = function (array, startingIndex, result) {
|
|
|
123
123
|
ellipseGeometry._ellipsoid,
|
|
124
124
|
scratchOptions.ellipsoid
|
|
125
125
|
);
|
|
126
|
+
scratchOptions.ellipsoid = Ellipsoid.clone(
|
|
127
|
+
ellipseGeometry._ellipsoid,
|
|
128
|
+
scratchEllipseGeometry._ellipsoid
|
|
129
|
+
);
|
|
126
130
|
scratchOptions.height = ellipseGeometry._height;
|
|
127
131
|
scratchOptions.extrudedHeight = ellipseGeometry._extrudedHeight;
|
|
128
132
|
scratchOptions.granularity = ellipseGeometry._granularity;
|
|
@@ -14,7 +14,7 @@ import Ellipsoid from "./Ellipsoid.js";
|
|
|
14
14
|
* @param {object} options Object with the following properties:
|
|
15
15
|
* @param {Cartesian3} options.center The circle's center point in the fixed frame.
|
|
16
16
|
* @param {number} options.radius The radius in meters.
|
|
17
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
17
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid the circle will be on.
|
|
18
18
|
* @param {number} [options.height=0.0] The distance in meters between the circle and the ellipsoid surface.
|
|
19
19
|
* @param {number} [options.granularity=0.02] The angular distance between points on the circle in radians.
|
|
20
20
|
* @param {number} [options.extrudedHeight=0.0] The distance in meters between the circle's extruded face and the ellipsoid surface.
|
|
@@ -231,7 +231,7 @@ function createGeometryFromPolygon(
|
|
|
231
231
|
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
|
|
232
232
|
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
|
|
233
233
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
234
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
234
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
235
235
|
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points.
|
|
236
236
|
*
|
|
237
237
|
* @example
|
|
@@ -259,7 +259,7 @@ function CoplanarPolygonGeometry(options) {
|
|
|
259
259
|
this._polygonHierarchy = polygonHierarchy;
|
|
260
260
|
this._stRotation = defaultValue(options.stRotation, 0.0);
|
|
261
261
|
this._ellipsoid = Ellipsoid.clone(
|
|
262
|
-
defaultValue(options.ellipsoid, Ellipsoid.
|
|
262
|
+
defaultValue(options.ellipsoid, Ellipsoid.default)
|
|
263
263
|
);
|
|
264
264
|
this._workerName = "createCoplanarPolygonGeometry";
|
|
265
265
|
this._textureCoordinates = textureCoordinates;
|
|
@@ -291,7 +291,7 @@ function CoplanarPolygonGeometry(options) {
|
|
|
291
291
|
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
|
|
292
292
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
293
293
|
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
|
|
294
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
294
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
295
295
|
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points.
|
|
296
296
|
* @returns {CoplanarPolygonGeometry}
|
|
297
297
|
*
|
|
@@ -1050,7 +1050,7 @@ function computeRectangle(positions, ellipsoid, width, cornerType, result) {
|
|
|
1050
1050
|
* @param {object} options Object with the following properties:
|
|
1051
1051
|
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor.
|
|
1052
1052
|
* @param {number} options.width The distance between the edges of the corridor in meters.
|
|
1053
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
1053
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
1054
1054
|
* @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.
|
|
1055
1055
|
* @param {number} [options.height=0] The distance in meters between the ellipsoid surface and the positions.
|
|
1056
1056
|
* @param {number} [options.extrudedHeight] The distance in meters between the ellipsoid surface and the extruded face.
|
|
@@ -1084,7 +1084,7 @@ function CorridorGeometry(options) {
|
|
|
1084
1084
|
|
|
1085
1085
|
this._positions = positions;
|
|
1086
1086
|
this._ellipsoid = Ellipsoid.clone(
|
|
1087
|
-
defaultValue(options.ellipsoid, Ellipsoid.
|
|
1087
|
+
defaultValue(options.ellipsoid, Ellipsoid.default)
|
|
1088
1088
|
);
|
|
1089
1089
|
this._vertexFormat = VertexFormat.clone(
|
|
1090
1090
|
defaultValue(options.vertexFormat, VertexFormat.DEFAULT)
|
|
@@ -1246,7 +1246,7 @@ CorridorGeometry.unpack = function (array, startingIndex, result) {
|
|
|
1246
1246
|
* @param {object} options Object with the following properties:
|
|
1247
1247
|
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor.
|
|
1248
1248
|
* @param {number} options.width The distance between the edges of the corridor in meters.
|
|
1249
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
1249
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
1250
1250
|
* @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
|
|
1251
1251
|
* @param {Rectangle} [result] An object in which to store the result.
|
|
1252
1252
|
*
|
|
@@ -1262,7 +1262,7 @@ CorridorGeometry.computeRectangle = function (options, result) {
|
|
|
1262
1262
|
Check.defined("options.width", width);
|
|
1263
1263
|
//>>includeEnd('debug');
|
|
1264
1264
|
|
|
1265
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
1265
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
1266
1266
|
const cornerType = defaultValue(options.cornerType, CornerType.ROUNDED);
|
|
1267
1267
|
|
|
1268
1268
|
return computeRectangle(positions, ellipsoid, width, cornerType, result);
|
|
@@ -361,7 +361,7 @@ function computePositionsExtruded(params) {
|
|
|
361
361
|
* @param {object} options Object with the following properties:
|
|
362
362
|
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor outline.
|
|
363
363
|
* @param {number} options.width The distance between the edges of the corridor outline.
|
|
364
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
364
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
365
365
|
* @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.
|
|
366
366
|
* @param {number} [options.height=0] The distance in meters between the positions and the ellipsoid surface.
|
|
367
367
|
* @param {number} [options.extrudedHeight] The distance in meters between the extruded face and the ellipsoid surface.
|
|
@@ -390,7 +390,7 @@ function CorridorOutlineGeometry(options) {
|
|
|
390
390
|
|
|
391
391
|
this._positions = positions;
|
|
392
392
|
this._ellipsoid = Ellipsoid.clone(
|
|
393
|
-
defaultValue(options.ellipsoid, Ellipsoid.
|
|
393
|
+
defaultValue(options.ellipsoid, Ellipsoid.default)
|
|
394
394
|
);
|
|
395
395
|
this._width = width;
|
|
396
396
|
this._height = Math.max(height, extrudedHeight);
|
package/Source/Core/Credit.js
CHANGED
|
@@ -9,7 +9,7 @@ const creditToId = {};
|
|
|
9
9
|
/**
|
|
10
10
|
* A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
|
|
11
11
|
* @param {string} html An string representing an html code snippet
|
|
12
|
-
* @param {boolean} [showOnScreen=false] If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover
|
|
12
|
+
* @param {boolean} [showOnScreen=false] If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover. All credits are displayed `inline`, if you have an image we recommend sizing it correctly to match the text or use css to `vertical-align` it.
|
|
13
13
|
*
|
|
14
14
|
* @alias Credit
|
|
15
15
|
* @constructor
|
|
@@ -18,7 +18,7 @@ const creditToId = {};
|
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* // Create a credit with a tooltip, image and link
|
|
21
|
-
* const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>');
|
|
21
|
+
* const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" style="vertical-align: -7px" title="Cesium"/></a>');
|
|
22
22
|
*/
|
|
23
23
|
function Credit(html, showOnScreen) {
|
|
24
24
|
//>>includeStart('debug', pragmas.debug);
|
|
@@ -95,6 +95,7 @@ Object.defineProperties(Credit.prototype, {
|
|
|
95
95
|
const html = DOMPurify.sanitize(this._html);
|
|
96
96
|
|
|
97
97
|
const div = document.createElement("div");
|
|
98
|
+
div.className = "cesium-credit-wrapper";
|
|
98
99
|
div._creditId = this._id;
|
|
99
100
|
div.style.display = "inline";
|
|
100
101
|
div.innerHTML = html;
|
|
@@ -35,9 +35,9 @@ import TerrainProvider from "./TerrainProvider.js";
|
|
|
35
35
|
* @param {TilingScheme} [options.tilingScheme] The tiling scheme specifying how the ellipsoidal
|
|
36
36
|
* surface is broken into tiles. If this parameter is not provided, a {@link GeographicTilingScheme}
|
|
37
37
|
* is used.
|
|
38
|
-
* @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
|
|
38
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid. If the tilingScheme is specified,
|
|
39
39
|
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
|
|
40
|
-
* parameter is specified, the
|
|
40
|
+
* parameter is specified, the default ellipsoid is used.
|
|
41
41
|
* @param {Credit|string} [options.credit] A credit for the data source, which is displayed on the canvas.
|
|
42
42
|
*
|
|
43
43
|
* @example
|
|
@@ -67,7 +67,7 @@ function CustomHeightmapTerrainProvider(options) {
|
|
|
67
67
|
this._tilingScheme = options.tilingScheme;
|
|
68
68
|
if (!defined(this._tilingScheme)) {
|
|
69
69
|
this._tilingScheme = new GeographicTilingScheme({
|
|
70
|
-
ellipsoid: defaultValue(options.ellipsoid, Ellipsoid.
|
|
70
|
+
ellipsoid: defaultValue(options.ellipsoid, Ellipsoid.default),
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -160,6 +160,20 @@ Object.defineProperties(CustomHeightmapTerrainProvider.prototype, {
|
|
|
160
160
|
},
|
|
161
161
|
},
|
|
162
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Gets an object that can be used to determine availability of terrain from this provider, such as
|
|
165
|
+
* at points and in rectangles. This property may be undefined if availability
|
|
166
|
+
* information is not available.
|
|
167
|
+
* @memberof CustomHeightmapTerrainProvider.prototype
|
|
168
|
+
* @type {TileAvailability}
|
|
169
|
+
* @readonly
|
|
170
|
+
*/
|
|
171
|
+
availability: {
|
|
172
|
+
get: function () {
|
|
173
|
+
return undefined;
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
|
|
163
177
|
/**
|
|
164
178
|
* Gets the number of columns per heightmap tile.
|
|
165
179
|
* @memberof CustomHeightmapTerrainProvider.prototype
|
|
@@ -892,7 +892,7 @@ function computeRectangle(
|
|
|
892
892
|
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
|
|
893
893
|
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
|
|
894
894
|
* @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
|
|
895
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
895
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid the ellipse will be on.
|
|
896
896
|
* @param {number} [options.height=0.0] The distance in meters between the ellipse and the ellipsoid surface.
|
|
897
897
|
* @param {number} [options.extrudedHeight] The distance in meters between the ellipse's extruded face and the ellipsoid surface.
|
|
898
898
|
* @param {number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
|
|
@@ -921,7 +921,7 @@ function EllipseGeometry(options) {
|
|
|
921
921
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
922
922
|
|
|
923
923
|
const center = options.center;
|
|
924
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
924
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
925
925
|
const semiMajorAxis = options.semiMajorAxis;
|
|
926
926
|
const semiMinorAxis = options.semiMinorAxis;
|
|
927
927
|
const granularity = defaultValue(
|
|
@@ -1109,7 +1109,7 @@ EllipseGeometry.unpack = function (array, startingIndex, result) {
|
|
|
1109
1109
|
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
|
|
1110
1110
|
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
|
|
1111
1111
|
* @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
|
|
1112
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
1112
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid the ellipse will be on.
|
|
1113
1113
|
* @param {number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
|
|
1114
1114
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The angular distance between points on the ellipse in radians.
|
|
1115
1115
|
* @param {Rectangle} [result] An object in which to store the result
|
|
@@ -1120,7 +1120,7 @@ EllipseGeometry.computeRectangle = function (options, result) {
|
|
|
1120
1120
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
1121
1121
|
|
|
1122
1122
|
const center = options.center;
|
|
1123
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
1123
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
1124
1124
|
const semiMajorAxis = options.semiMajorAxis;
|
|
1125
1125
|
const semiMinorAxis = options.semiMinorAxis;
|
|
1126
1126
|
const granularity = defaultValue(
|
|
@@ -188,7 +188,7 @@ function computeExtrudedEllipse(options) {
|
|
|
188
188
|
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
|
|
189
189
|
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
|
|
190
190
|
* @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
|
|
191
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
191
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid the ellipse will be on.
|
|
192
192
|
* @param {number} [options.height=0.0] The distance in meters between the ellipse and the ellipsoid surface.
|
|
193
193
|
* @param {number} [options.extrudedHeight] The distance in meters between the ellipse's extruded face and the ellipsoid surface.
|
|
194
194
|
* @param {number} [options.rotation=0.0] The angle from north (counter-clockwise) in radians.
|
|
@@ -214,7 +214,7 @@ function EllipseOutlineGeometry(options) {
|
|
|
214
214
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
215
215
|
|
|
216
216
|
const center = options.center;
|
|
217
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
217
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
218
218
|
const semiMajorAxis = options.semiMajorAxis;
|
|
219
219
|
const semiMinorAxis = options.semiMinorAxis;
|
|
220
220
|
const granularity = defaultValue(
|
package/Source/Core/Ellipsoid.js
CHANGED
|
@@ -255,6 +255,40 @@ Ellipsoid.MOON = Object.freeze(
|
|
|
255
255
|
)
|
|
256
256
|
);
|
|
257
257
|
|
|
258
|
+
Ellipsoid._default = Ellipsoid.WGS84;
|
|
259
|
+
Object.defineProperties(Ellipsoid, {
|
|
260
|
+
/**
|
|
261
|
+
* The default ellipsoid used when not otherwise specified.
|
|
262
|
+
* @memberof Ellipsoid
|
|
263
|
+
* @type {Ellipsoid}
|
|
264
|
+
* @example
|
|
265
|
+
* Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON;
|
|
266
|
+
*
|
|
267
|
+
* // Apollo 11 landing site
|
|
268
|
+
* const position = Cesium.Cartesian3.fromRadians(
|
|
269
|
+
* 0.67416,
|
|
270
|
+
* 23.47315,
|
|
271
|
+
* );
|
|
272
|
+
*/
|
|
273
|
+
default: {
|
|
274
|
+
get: function () {
|
|
275
|
+
return Ellipsoid._default;
|
|
276
|
+
},
|
|
277
|
+
set: function (value) {
|
|
278
|
+
//>>includeStart('debug', pragmas.debug);
|
|
279
|
+
Check.typeOf.object("value", value);
|
|
280
|
+
//>>includeEnd('debug');
|
|
281
|
+
|
|
282
|
+
Ellipsoid._default = value;
|
|
283
|
+
Cartesian3._ellipsoidRadiiSquared = value.radiiSquared;
|
|
284
|
+
Cartographic._ellipsoidOneOverRadii = value.oneOverRadii;
|
|
285
|
+
Cartographic._ellipsoidOneOverRadiiSquared = value.oneOverRadiiSquared;
|
|
286
|
+
Cartographic._ellipsoidCenterToleranceSquared =
|
|
287
|
+
value._centerToleranceSquared;
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
});
|
|
291
|
+
|
|
258
292
|
/**
|
|
259
293
|
* Duplicates an Ellipsoid instance.
|
|
260
294
|
*
|
|
@@ -280,10 +280,10 @@ function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
|
|
|
280
280
|
*
|
|
281
281
|
* @param {Cartographic} [start] The initial planetodetic point on the path.
|
|
282
282
|
* @param {Cartographic} [end] The final planetodetic point on the path.
|
|
283
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
283
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the geodesic lies.
|
|
284
284
|
*/
|
|
285
285
|
function EllipsoidGeodesic(start, end, ellipsoid) {
|
|
286
|
-
const e = defaultValue(ellipsoid, Ellipsoid.
|
|
286
|
+
const e = defaultValue(ellipsoid, Ellipsoid.default);
|
|
287
287
|
this._ellipsoid = e;
|
|
288
288
|
this._start = new Cartographic();
|
|
289
289
|
this._end = new Cartographic();
|
|
@@ -385,12 +385,12 @@ function interpolateUsingSurfaceDistance(
|
|
|
385
385
|
*
|
|
386
386
|
* @param {Cartographic} [start] The initial planetodetic point on the path.
|
|
387
387
|
* @param {Cartographic} [end] The final planetodetic point on the path.
|
|
388
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
388
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the rhumb line lies.
|
|
389
389
|
*
|
|
390
390
|
* @exception {DeveloperError} angle between start and end must be at least 0.0125 radians.
|
|
391
391
|
*/
|
|
392
392
|
function EllipsoidRhumbLine(start, end, ellipsoid) {
|
|
393
|
-
const e = defaultValue(ellipsoid, Ellipsoid.
|
|
393
|
+
const e = defaultValue(ellipsoid, Ellipsoid.default);
|
|
394
394
|
this._ellipsoid = e;
|
|
395
395
|
this._start = new Cartographic();
|
|
396
396
|
this._end = new Cartographic();
|
|
@@ -481,7 +481,7 @@ Object.defineProperties(EllipsoidRhumbLine.prototype, {
|
|
|
481
481
|
* @param {Cartographic} start The initial planetodetic point on the path.
|
|
482
482
|
* @param {number} heading The heading in radians.
|
|
483
483
|
* @param {number} distance The rhumb line distance between the start and end point.
|
|
484
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
484
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the rhumb line lies.
|
|
485
485
|
* @param {EllipsoidRhumbLine} [result] The object in which to store the result.
|
|
486
486
|
* @returns {EllipsoidRhumbLine} The EllipsoidRhumbLine object.
|
|
487
487
|
*/
|
|
@@ -499,7 +499,7 @@ EllipsoidRhumbLine.fromStartHeadingDistance = function (
|
|
|
499
499
|
Check.typeOf.number.greaterThan("distance", distance, 0.0);
|
|
500
500
|
//>>includeEnd('debug');
|
|
501
501
|
|
|
502
|
-
const e = defaultValue(ellipsoid, Ellipsoid.
|
|
502
|
+
const e = defaultValue(ellipsoid, Ellipsoid.default);
|
|
503
503
|
const major = e.maximumRadius;
|
|
504
504
|
const minor = e.minimumRadius;
|
|
505
505
|
const majorSquared = major * major;
|
|
@@ -22,7 +22,7 @@ const scratchCart4 = new Cartesian4();
|
|
|
22
22
|
* @constructor
|
|
23
23
|
*
|
|
24
24
|
* @param {Cartesian3} origin The point on the surface of the ellipsoid where the tangent plane touches.
|
|
25
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
25
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to use.
|
|
26
26
|
*
|
|
27
27
|
* @exception {DeveloperError} origin must not be at the center of the ellipsoid.
|
|
28
28
|
*/
|
|
@@ -31,7 +31,7 @@ function EllipsoidTangentPlane(origin, ellipsoid) {
|
|
|
31
31
|
Check.defined("origin", origin);
|
|
32
32
|
//>>includeEnd('debug');
|
|
33
33
|
|
|
34
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
34
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
35
35
|
origin = ellipsoid.scaleToGeodeticSurface(origin);
|
|
36
36
|
|
|
37
37
|
//>>includeStart('debug', pragmas.debug);
|
|
@@ -136,7 +136,7 @@ const tmp = new AxisAlignedBoundingBox();
|
|
|
136
136
|
* point of the provided Cartesians.
|
|
137
137
|
*
|
|
138
138
|
* @param {Cartesian3[]} cartesians The list of positions surrounding the center point.
|
|
139
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
139
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to use.
|
|
140
140
|
* @returns {EllipsoidTangentPlane} The new instance of EllipsoidTangentPlane.
|
|
141
141
|
*/
|
|
142
142
|
EllipsoidTangentPlane.fromPoints = function (cartesians, ellipsoid) {
|
|
@@ -17,9 +17,9 @@ import TerrainProvider from "./TerrainProvider.js";
|
|
|
17
17
|
* @param {TilingScheme} [options.tilingScheme] The tiling scheme specifying how the ellipsoidal
|
|
18
18
|
* surface is broken into tiles. If this parameter is not provided, a {@link GeographicTilingScheme}
|
|
19
19
|
* is used.
|
|
20
|
-
* @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
|
|
20
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid. If the tilingScheme is specified,
|
|
21
21
|
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
|
|
22
|
-
* parameter is specified, the
|
|
22
|
+
* parameter is specified, the default ellipsoid is used.
|
|
23
23
|
*
|
|
24
24
|
* @see TerrainProvider
|
|
25
25
|
*/
|
|
@@ -29,7 +29,7 @@ function EllipsoidTerrainProvider(options) {
|
|
|
29
29
|
this._tilingScheme = options.tilingScheme;
|
|
30
30
|
if (!defined(this._tilingScheme)) {
|
|
31
31
|
this._tilingScheme = new GeographicTilingScheme({
|
|
32
|
-
ellipsoid: defaultValue(options.ellipsoid, Ellipsoid.
|
|
32
|
+
ellipsoid: defaultValue(options.ellipsoid, Ellipsoid.default),
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -8,18 +8,18 @@ import Ellipsoid from "./Ellipsoid.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* A simple map projection where longitude and latitude are linearly mapped to X and Y by multiplying
|
|
10
10
|
* them by the {@link Ellipsoid#maximumRadius}. This projection
|
|
11
|
-
* is commonly known as geographic, equirectangular, equidistant cylindrical, or plate carrée.
|
|
11
|
+
* is commonly known as geographic, equirectangular, equidistant cylindrical, or plate carrée. When using the WGS84 ellipsoid, it
|
|
12
12
|
* is also known as EPSG:4326.
|
|
13
13
|
*
|
|
14
14
|
* @alias GeographicProjection
|
|
15
15
|
* @constructor
|
|
16
16
|
*
|
|
17
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
17
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid.
|
|
18
18
|
*
|
|
19
19
|
* @see WebMercatorProjection
|
|
20
20
|
*/
|
|
21
21
|
function GeographicProjection(ellipsoid) {
|
|
22
|
-
this._ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
22
|
+
this._ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
23
23
|
this._semimajorAxis = this._ellipsoid.maximumRadius;
|
|
24
24
|
this._oneOverSemimajorAxis = 1.0 / this._semimajorAxis;
|
|
25
25
|
}
|
|
@@ -102,4 +102,5 @@ GeographicProjection.prototype.unproject = function (cartesian, result) {
|
|
|
102
102
|
result.height = height;
|
|
103
103
|
return result;
|
|
104
104
|
};
|
|
105
|
+
|
|
105
106
|
export default GeographicProjection;
|
|
@@ -16,8 +16,8 @@ import Rectangle from "./Rectangle.js";
|
|
|
16
16
|
* @constructor
|
|
17
17
|
*
|
|
18
18
|
* @param {object} [options] Object with the following properties:
|
|
19
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
20
|
-
* the
|
|
19
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid whose surface is being tiled. Defaults to
|
|
20
|
+
* the default ellipsoid.
|
|
21
21
|
* @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the tiling scheme.
|
|
22
22
|
* @param {number} [options.numberOfLevelZeroTilesX=2] The number of tiles in the X direction at level zero of
|
|
23
23
|
* the tile tree.
|
|
@@ -27,7 +27,7 @@ import Rectangle from "./Rectangle.js";
|
|
|
27
27
|
function GeographicTilingScheme(options) {
|
|
28
28
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
29
29
|
|
|
30
|
-
this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
30
|
+
this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
31
31
|
this._rectangle = defaultValue(options.rectangle, Rectangle.MAX_VALUE);
|
|
32
32
|
this._projection = new GeographicProjection(this._ellipsoid);
|
|
33
33
|
this._numberOfLevelZeroTilesX = defaultValue(
|
|
@@ -687,7 +687,7 @@ GeometryPipeline.projectTo2D = function (
|
|
|
687
687
|
projectedValues[index++] = projectedLonLat.z;
|
|
688
688
|
}
|
|
689
689
|
|
|
690
|
-
// Rename original cartesians to
|
|
690
|
+
// Rename original cartesians to ellipsoid cartesians.
|
|
691
691
|
geometry.attributes[attributeName3D] = attribute;
|
|
692
692
|
|
|
693
693
|
// Replace original cartesians with 2D projected cartesians
|
|
@@ -1902,7 +1902,7 @@ const splitTriangleResult = {
|
|
|
1902
1902
|
};
|
|
1903
1903
|
|
|
1904
1904
|
function splitTriangle(p0, p1, p2) {
|
|
1905
|
-
// In
|
|
1905
|
+
// In ellipsoid coordinates, for a triangle approximately on the
|
|
1906
1906
|
// ellipsoid to cross the IDL, first it needs to be on the
|
|
1907
1907
|
// negative side of the plane x = 0.
|
|
1908
1908
|
if (p0.x >= 0.0 || p1.x >= 0.0 || p2.x >= 0.0) {
|
|
@@ -69,7 +69,7 @@ TerrainCache.prototype.tidy = function () {
|
|
|
69
69
|
*
|
|
70
70
|
* Initialization options for GoogleEarthEnterpriseTerrainProvider constructor
|
|
71
71
|
*
|
|
72
|
-
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the
|
|
72
|
+
* @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
73
73
|
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
|
|
74
74
|
*/
|
|
75
75
|
|
|
@@ -33,7 +33,7 @@ GoogleMaps.mapTilesApiEndpoint = new Resource({
|
|
|
33
33
|
|
|
34
34
|
GoogleMaps.getDefaultCredit = function () {
|
|
35
35
|
return new Credit(
|
|
36
|
-
`<img src="https://assets.ion
|
|
36
|
+
`<img src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align: -5px" alt="Google">`,
|
|
37
37
|
true
|
|
38
38
|
);
|
|
39
39
|
};
|
|
@@ -121,7 +121,7 @@ function GroundPolylineGeometry(options) {
|
|
|
121
121
|
*/
|
|
122
122
|
this.arcType = defaultValue(options.arcType, ArcType.GEODESIC);
|
|
123
123
|
|
|
124
|
-
this._ellipsoid = Ellipsoid.
|
|
124
|
+
this._ellipsoid = Ellipsoid.default;
|
|
125
125
|
|
|
126
126
|
// MapProjections can't be packed, so store the index to a known MapProjection.
|
|
127
127
|
this._projectionIndex = 0;
|
|
@@ -62,7 +62,7 @@ const maximumScratch = new Cartesian3();
|
|
|
62
62
|
* @param {boolean} [options.isGeographic=true] True if the heightmap uses a {@link GeographicProjection}, or false if it uses
|
|
63
63
|
* a {@link WebMercatorProjection}.
|
|
64
64
|
* @param {Cartesian3} [options.relativeToCenter=Cartesian3.ZERO] The positions will be computed as <code>Cartesian3.subtract(worldPosition, relativeToCenter)</code>.
|
|
65
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
65
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to which the heightmap applies.
|
|
66
66
|
* @param {object} [options.structure] An object describing the structure of the height data.
|
|
67
67
|
* @param {number} [options.structure.heightScale=1.0] The factor by which to multiply height samples in order to obtain
|
|
68
68
|
* the height above the heightOffset, in meters. The heightOffset is added to the resulting
|
|
@@ -149,7 +149,7 @@ HeightmapTessellator.computeVertices = function (options) {
|
|
|
149
149
|
const hasSkirts = skirtHeight > 0.0;
|
|
150
150
|
|
|
151
151
|
const isGeographic = defaultValue(options.isGeographic, true);
|
|
152
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
152
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
153
153
|
|
|
154
154
|
const oneOverGlobeSemimajorAxis = 1.0 / ellipsoid.maximumRadius;
|
|
155
155
|
|
package/Source/Core/Ion.js
CHANGED
|
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
7
|
+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyYTI3ZDMxOS1mODc4LTQ5NzktOGUzNy04OTA0ZGI5MmM1NGIiLCJpZCI6MjU5LCJpYXQiOjE3MTk4NDM5OTN9.FDHD-mZOIAzA9J_kzOz6AkKK2PHzl2yoMbFqbpsfH6Q";
|
|
8
8
|
/**
|
|
9
9
|
* Default settings for accessing the Cesium ion API.
|
|
10
10
|
*
|
package/Source/Core/Math.js
CHANGED
|
@@ -205,7 +205,6 @@ CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024;
|
|
|
205
205
|
* @param {number} value The value to return the sign of.
|
|
206
206
|
* @returns {number} The sign of value.
|
|
207
207
|
*/
|
|
208
|
-
// eslint-disable-next-line es/no-math-sign
|
|
209
208
|
CesiumMath.sign = defaultValue(Math.sign, function sign(value) {
|
|
210
209
|
value = +value; // coerce to number
|
|
211
210
|
if (value === 0 || value !== value) {
|
|
@@ -292,7 +291,6 @@ CesiumMath.normalize = function (value, rangeMinimum, rangeMaximum) {
|
|
|
292
291
|
* @param {number} value The number whose hyperbolic sine is to be returned.
|
|
293
292
|
* @returns {number} The hyperbolic sine of <code>value</code>.
|
|
294
293
|
*/
|
|
295
|
-
// eslint-disable-next-line es/no-math-sinh
|
|
296
294
|
CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) {
|
|
297
295
|
return (Math.exp(value) - Math.exp(-value)) / 2.0;
|
|
298
296
|
});
|
|
@@ -317,7 +315,6 @@ CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) {
|
|
|
317
315
|
* @param {number} value The number whose hyperbolic cosine is to be returned.
|
|
318
316
|
* @returns {number} The hyperbolic cosine of <code>value</code>.
|
|
319
317
|
*/
|
|
320
|
-
// eslint-disable-next-line es/no-math-cosh
|
|
321
318
|
CesiumMath.cosh = defaultValue(Math.cosh, function cosh(value) {
|
|
322
319
|
return (Math.exp(value) + Math.exp(-value)) / 2.0;
|
|
323
320
|
});
|
|
@@ -1034,7 +1031,6 @@ CesiumMath.logBase = function (number, base) {
|
|
|
1034
1031
|
* @param {number} [number] The number.
|
|
1035
1032
|
* @returns {number} The result.
|
|
1036
1033
|
*/
|
|
1037
|
-
// eslint-disable-next-line es/no-math-cbrt
|
|
1038
1034
|
CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) {
|
|
1039
1035
|
const result = Math.pow(Math.abs(number), 1.0 / 3.0);
|
|
1040
1036
|
return number < 0.0 ? -result : result;
|
|
@@ -1047,7 +1043,6 @@ CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) {
|
|
|
1047
1043
|
* @param {number} number The number.
|
|
1048
1044
|
* @returns {number} The result.
|
|
1049
1045
|
*/
|
|
1050
|
-
// eslint-disable-next-line es/no-math-log2
|
|
1051
1046
|
CesiumMath.log2 = defaultValue(Math.log2, function log2(number) {
|
|
1052
1047
|
return Math.log(number) * Math.LOG2E;
|
|
1053
1048
|
});
|