@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.119
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -25,33 +25,32 @@
|
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
27
|
createTaskProcessorWorker_default
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-QX5XS4LC.js";
|
|
29
29
|
import {
|
|
30
30
|
WebGLConstants_default
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-OOK53QUQ.js";
|
|
32
32
|
import {
|
|
33
33
|
RuntimeError_default
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-T77JILCU.js";
|
|
35
35
|
import {
|
|
36
36
|
defaultValue_default
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-VE7BFUIX.js";
|
|
38
38
|
import {
|
|
39
39
|
Check_default
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-S3PI2KFM.js";
|
|
41
41
|
import {
|
|
42
42
|
__commonJS,
|
|
43
43
|
__require,
|
|
44
44
|
__toESM,
|
|
45
45
|
defined_default
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-AA4GZKOT.js";
|
|
47
47
|
|
|
48
48
|
// packages/engine/Source/ThirdParty/Workers/basis_transcoder.js
|
|
49
49
|
var require_basis_transcoder = __commonJS({
|
|
50
50
|
"packages/engine/Source/ThirdParty/Workers/basis_transcoder.js"(exports, module) {
|
|
51
51
|
var BASIS = function() {
|
|
52
52
|
var _scriptDir = typeof document !== "undefined" && document.currentScript ? document.currentScript.src : void 0;
|
|
53
|
-
if (typeof __filename !== "undefined")
|
|
54
|
-
_scriptDir = _scriptDir || __filename;
|
|
53
|
+
if (typeof __filename !== "undefined") _scriptDir = _scriptDir || __filename;
|
|
55
54
|
return function(BASIS2) {
|
|
56
55
|
BASIS2 = BASIS2 || {};
|
|
57
56
|
var Module = typeof BASIS2 !== "undefined" ? BASIS2 : {};
|
|
@@ -97,10 +96,8 @@ var require_basis_transcoder = __commonJS({
|
|
|
97
96
|
scriptDirectory = __dirname + "/";
|
|
98
97
|
}
|
|
99
98
|
read_ = function shell_read(filename, binary) {
|
|
100
|
-
if (!nodeFS)
|
|
101
|
-
|
|
102
|
-
if (!nodePath)
|
|
103
|
-
nodePath = __require("path");
|
|
99
|
+
if (!nodeFS) nodeFS = __require("fs");
|
|
100
|
+
if (!nodePath) nodePath = __require("path");
|
|
104
101
|
filename = nodePath["normalize"](filename);
|
|
105
102
|
return nodeFS["readFileSync"](filename, binary ? null : "utf8");
|
|
106
103
|
};
|
|
@@ -154,8 +151,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
154
151
|
};
|
|
155
152
|
}
|
|
156
153
|
if (typeof print !== "undefined") {
|
|
157
|
-
if (typeof console === "undefined")
|
|
158
|
-
console = {};
|
|
154
|
+
if (typeof console === "undefined") console = {};
|
|
159
155
|
console.log = print;
|
|
160
156
|
console.warn = console.error = typeof printErr !== "undefined" ? printErr : print;
|
|
161
157
|
}
|
|
@@ -217,19 +213,15 @@ var require_basis_transcoder = __commonJS({
|
|
|
217
213
|
}
|
|
218
214
|
}
|
|
219
215
|
moduleOverrides = null;
|
|
220
|
-
if (Module["arguments"])
|
|
221
|
-
|
|
222
|
-
if (Module["
|
|
223
|
-
thisProgram = Module["thisProgram"];
|
|
224
|
-
if (Module["quit"])
|
|
225
|
-
quit_ = Module["quit"];
|
|
216
|
+
if (Module["arguments"]) arguments_ = Module["arguments"];
|
|
217
|
+
if (Module["thisProgram"]) thisProgram = Module["thisProgram"];
|
|
218
|
+
if (Module["quit"]) quit_ = Module["quit"];
|
|
226
219
|
var tempRet0 = 0;
|
|
227
220
|
var setTempRet0 = function(value) {
|
|
228
221
|
tempRet0 = value;
|
|
229
222
|
};
|
|
230
223
|
var wasmBinary;
|
|
231
|
-
if (Module["wasmBinary"])
|
|
232
|
-
wasmBinary = Module["wasmBinary"];
|
|
224
|
+
if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"];
|
|
233
225
|
var noExitRuntime = Module["noExitRuntime"] || true;
|
|
234
226
|
if (typeof WebAssembly !== "object") {
|
|
235
227
|
abort("no native wasm support detected");
|
|
@@ -246,8 +238,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
246
238
|
function UTF8ArrayToString(heap, idx, maxBytesToRead) {
|
|
247
239
|
var endIdx = idx + maxBytesToRead;
|
|
248
240
|
var endPtr = idx;
|
|
249
|
-
while (heap[endPtr] && !(endPtr >= endIdx))
|
|
250
|
-
++endPtr;
|
|
241
|
+
while (heap[endPtr] && !(endPtr >= endIdx)) ++endPtr;
|
|
251
242
|
if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) {
|
|
252
243
|
return UTF8Decoder.decode(heap.subarray(idx, endPtr));
|
|
253
244
|
} else {
|
|
@@ -283,8 +274,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
283
274
|
return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : "";
|
|
284
275
|
}
|
|
285
276
|
function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
|
|
286
|
-
if (!(maxBytesToWrite > 0))
|
|
287
|
-
return 0;
|
|
277
|
+
if (!(maxBytesToWrite > 0)) return 0;
|
|
288
278
|
var startIdx = outIdx;
|
|
289
279
|
var endIdx = outIdx + maxBytesToWrite - 1;
|
|
290
280
|
for (var i = 0; i < str.length; ++i) {
|
|
@@ -294,23 +284,19 @@ var require_basis_transcoder = __commonJS({
|
|
|
294
284
|
u = 65536 + ((u & 1023) << 10) | u1 & 1023;
|
|
295
285
|
}
|
|
296
286
|
if (u <= 127) {
|
|
297
|
-
if (outIdx >= endIdx)
|
|
298
|
-
break;
|
|
287
|
+
if (outIdx >= endIdx) break;
|
|
299
288
|
heap[outIdx++] = u;
|
|
300
289
|
} else if (u <= 2047) {
|
|
301
|
-
if (outIdx + 1 >= endIdx)
|
|
302
|
-
break;
|
|
290
|
+
if (outIdx + 1 >= endIdx) break;
|
|
303
291
|
heap[outIdx++] = 192 | u >> 6;
|
|
304
292
|
heap[outIdx++] = 128 | u & 63;
|
|
305
293
|
} else if (u <= 65535) {
|
|
306
|
-
if (outIdx + 2 >= endIdx)
|
|
307
|
-
break;
|
|
294
|
+
if (outIdx + 2 >= endIdx) break;
|
|
308
295
|
heap[outIdx++] = 224 | u >> 12;
|
|
309
296
|
heap[outIdx++] = 128 | u >> 6 & 63;
|
|
310
297
|
heap[outIdx++] = 128 | u & 63;
|
|
311
298
|
} else {
|
|
312
|
-
if (outIdx + 3 >= endIdx)
|
|
313
|
-
break;
|
|
299
|
+
if (outIdx + 3 >= endIdx) break;
|
|
314
300
|
heap[outIdx++] = 240 | u >> 18;
|
|
315
301
|
heap[outIdx++] = 128 | u >> 12 & 63;
|
|
316
302
|
heap[outIdx++] = 128 | u >> 6 & 63;
|
|
@@ -327,16 +313,11 @@ var require_basis_transcoder = __commonJS({
|
|
|
327
313
|
var len = 0;
|
|
328
314
|
for (var i = 0; i < str.length; ++i) {
|
|
329
315
|
var u = str.charCodeAt(i);
|
|
330
|
-
if (u >= 55296 && u <= 57343)
|
|
331
|
-
|
|
332
|
-
if (u <=
|
|
333
|
-
|
|
334
|
-
else
|
|
335
|
-
len += 2;
|
|
336
|
-
else if (u <= 65535)
|
|
337
|
-
len += 3;
|
|
338
|
-
else
|
|
339
|
-
len += 4;
|
|
316
|
+
if (u >= 55296 && u <= 57343) u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023;
|
|
317
|
+
if (u <= 127) ++len;
|
|
318
|
+
else if (u <= 2047) len += 2;
|
|
319
|
+
else if (u <= 65535) len += 3;
|
|
320
|
+
else len += 4;
|
|
340
321
|
}
|
|
341
322
|
return len;
|
|
342
323
|
}
|
|
@@ -345,8 +326,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
345
326
|
var endPtr = ptr;
|
|
346
327
|
var idx = endPtr >> 1;
|
|
347
328
|
var maxIdx = idx + maxBytesToRead / 2;
|
|
348
|
-
while (!(idx >= maxIdx) && HEAPU16[idx])
|
|
349
|
-
++idx;
|
|
329
|
+
while (!(idx >= maxIdx) && HEAPU16[idx]) ++idx;
|
|
350
330
|
endPtr = idx << 1;
|
|
351
331
|
if (endPtr - ptr > 32 && UTF16Decoder) {
|
|
352
332
|
return UTF16Decoder.decode(HEAPU8.subarray(ptr, endPtr));
|
|
@@ -354,8 +334,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
354
334
|
var str = "";
|
|
355
335
|
for (var i = 0; !(i >= maxBytesToRead / 2); ++i) {
|
|
356
336
|
var codeUnit = HEAP16[ptr + i * 2 >> 1];
|
|
357
|
-
if (codeUnit == 0)
|
|
358
|
-
break;
|
|
337
|
+
if (codeUnit == 0) break;
|
|
359
338
|
str += String.fromCharCode(codeUnit);
|
|
360
339
|
}
|
|
361
340
|
return str;
|
|
@@ -365,8 +344,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
365
344
|
if (maxBytesToWrite === void 0) {
|
|
366
345
|
maxBytesToWrite = 2147483647;
|
|
367
346
|
}
|
|
368
|
-
if (maxBytesToWrite < 2)
|
|
369
|
-
return 0;
|
|
347
|
+
if (maxBytesToWrite < 2) return 0;
|
|
370
348
|
maxBytesToWrite -= 2;
|
|
371
349
|
var startPtr = outPtr;
|
|
372
350
|
var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length;
|
|
@@ -386,8 +364,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
386
364
|
var str = "";
|
|
387
365
|
while (!(i >= maxBytesToRead / 4)) {
|
|
388
366
|
var utf32 = HEAP32[ptr + i * 4 >> 2];
|
|
389
|
-
if (utf32 == 0)
|
|
390
|
-
break;
|
|
367
|
+
if (utf32 == 0) break;
|
|
391
368
|
++i;
|
|
392
369
|
if (utf32 >= 65536) {
|
|
393
370
|
var ch = utf32 - 65536;
|
|
@@ -402,8 +379,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
402
379
|
if (maxBytesToWrite === void 0) {
|
|
403
380
|
maxBytesToWrite = 2147483647;
|
|
404
381
|
}
|
|
405
|
-
if (maxBytesToWrite < 4)
|
|
406
|
-
return 0;
|
|
382
|
+
if (maxBytesToWrite < 4) return 0;
|
|
407
383
|
var startPtr = outPtr;
|
|
408
384
|
var endPtr = startPtr + maxBytesToWrite - 4;
|
|
409
385
|
for (var i = 0; i < str.length; ++i) {
|
|
@@ -414,8 +390,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
414
390
|
}
|
|
415
391
|
HEAP32[outPtr >> 2] = codeUnit;
|
|
416
392
|
outPtr += 4;
|
|
417
|
-
if (outPtr + 4 > endPtr)
|
|
418
|
-
break;
|
|
393
|
+
if (outPtr + 4 > endPtr) break;
|
|
419
394
|
}
|
|
420
395
|
HEAP32[outPtr >> 2] = 0;
|
|
421
396
|
return outPtr - startPtr;
|
|
@@ -424,8 +399,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
424
399
|
var len = 0;
|
|
425
400
|
for (var i = 0; i < str.length; ++i) {
|
|
426
401
|
var codeUnit = str.charCodeAt(i);
|
|
427
|
-
if (codeUnit >= 55296 && codeUnit <= 57343)
|
|
428
|
-
++i;
|
|
402
|
+
if (codeUnit >= 55296 && codeUnit <= 57343) ++i;
|
|
429
403
|
len += 4;
|
|
430
404
|
}
|
|
431
405
|
return len;
|
|
@@ -457,8 +431,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
457
431
|
var runtimeInitialized = false;
|
|
458
432
|
function preRun() {
|
|
459
433
|
if (Module["preRun"]) {
|
|
460
|
-
if (typeof Module["preRun"] == "function")
|
|
461
|
-
Module["preRun"] = [Module["preRun"]];
|
|
434
|
+
if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]];
|
|
462
435
|
while (Module["preRun"].length) {
|
|
463
436
|
addOnPreRun(Module["preRun"].shift());
|
|
464
437
|
}
|
|
@@ -474,8 +447,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
474
447
|
}
|
|
475
448
|
function postRun() {
|
|
476
449
|
if (Module["postRun"]) {
|
|
477
|
-
if (typeof Module["postRun"] == "function")
|
|
478
|
-
Module["postRun"] = [Module["postRun"]];
|
|
450
|
+
if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]];
|
|
479
451
|
while (Module["postRun"].length) {
|
|
480
452
|
addOnPostRun(Module["postRun"].shift());
|
|
481
453
|
}
|
|
@@ -2220,10 +2192,8 @@ var require_basis_transcoder = __commonJS({
|
|
|
2220
2192
|
this.status = status;
|
|
2221
2193
|
}
|
|
2222
2194
|
dependenciesFulfilled = function runCaller() {
|
|
2223
|
-
if (!calledRun)
|
|
2224
|
-
|
|
2225
|
-
if (!calledRun)
|
|
2226
|
-
dependenciesFulfilled = runCaller;
|
|
2195
|
+
if (!calledRun) run();
|
|
2196
|
+
if (!calledRun) dependenciesFulfilled = runCaller;
|
|
2227
2197
|
};
|
|
2228
2198
|
function run(args) {
|
|
2229
2199
|
args = args || arguments_;
|
|
@@ -2235,17 +2205,14 @@ var require_basis_transcoder = __commonJS({
|
|
|
2235
2205
|
return;
|
|
2236
2206
|
}
|
|
2237
2207
|
function doRun() {
|
|
2238
|
-
if (calledRun)
|
|
2239
|
-
return;
|
|
2208
|
+
if (calledRun) return;
|
|
2240
2209
|
calledRun = true;
|
|
2241
2210
|
Module["calledRun"] = true;
|
|
2242
|
-
if (ABORT)
|
|
2243
|
-
return;
|
|
2211
|
+
if (ABORT) return;
|
|
2244
2212
|
initRuntime();
|
|
2245
2213
|
preMain();
|
|
2246
2214
|
readyPromiseResolve(Module);
|
|
2247
|
-
if (Module["onRuntimeInitialized"])
|
|
2248
|
-
Module["onRuntimeInitialized"]();
|
|
2215
|
+
if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"]();
|
|
2249
2216
|
postRun();
|
|
2250
2217
|
}
|
|
2251
2218
|
if (Module["setStatus"]) {
|
|
@@ -2262,8 +2229,7 @@ var require_basis_transcoder = __commonJS({
|
|
|
2262
2229
|
}
|
|
2263
2230
|
Module["run"] = run;
|
|
2264
2231
|
if (Module["preInit"]) {
|
|
2265
|
-
if (typeof Module["preInit"] == "function")
|
|
2266
|
-
Module["preInit"] = [Module["preInit"]];
|
|
2232
|
+
if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]];
|
|
2267
2233
|
while (Module["preInit"].length > 0) {
|
|
2268
2234
|
Module["preInit"].pop()();
|
|
2269
2235
|
}
|
|
@@ -3031,8 +2997,7 @@ var BufferReader = class {
|
|
|
3031
2997
|
byteLength++;
|
|
3032
2998
|
this._offset++;
|
|
3033
2999
|
}
|
|
3034
|
-
if (byteLength < maxByteLength)
|
|
3035
|
-
this._offset++;
|
|
3000
|
+
if (byteLength < maxByteLength) this._offset++;
|
|
3036
3001
|
return new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + byteOffset, byteLength);
|
|
3037
3002
|
}
|
|
3038
3003
|
};
|
|
@@ -3153,8 +3118,7 @@ function read2(data) {
|
|
|
3153
3118
|
const kvPadding = keyValueByteLength % 4 ? 4 - keyValueByteLength % 4 : 0;
|
|
3154
3119
|
kvdReader._skip(kvPadding);
|
|
3155
3120
|
}
|
|
3156
|
-
if (sgdByteLength <= 0)
|
|
3157
|
-
return container;
|
|
3121
|
+
if (sgdByteLength <= 0) return container;
|
|
3158
3122
|
const sgdReader = new BufferReader(data, sgdByteOffset, sgdByteLength, true);
|
|
3159
3123
|
const endpointCount = sgdReader._nextUint16();
|
|
3160
3124
|
const selectorCount = sgdReader._nextUint16();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.119
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -26,49 +26,49 @@
|
|
|
26
26
|
import {
|
|
27
27
|
EllipsoidalOccluder_default,
|
|
28
28
|
TerrainEncoding_default
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-BCL4PHHT.js";
|
|
30
30
|
import {
|
|
31
31
|
createTaskProcessorWorker_default
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-QX5XS4LC.js";
|
|
33
33
|
import {
|
|
34
34
|
OrientedBoundingBox_default
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-AVI4IUWC.js";
|
|
36
36
|
import {
|
|
37
37
|
AttributeCompression_default
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-OORVMGDU.js";
|
|
39
|
+
import "./chunk-SYCPRK3D.js";
|
|
40
|
+
import "./chunk-STBBMQGG.js";
|
|
41
|
+
import "./chunk-XD445VDH.js";
|
|
42
|
+
import "./chunk-4BAE4PWO.js";
|
|
43
43
|
import {
|
|
44
44
|
IndexDatatype_default
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-QD4KM3GO.js";
|
|
46
46
|
import {
|
|
47
47
|
BoundingSphere_default
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-DOXCPOG4.js";
|
|
49
49
|
import {
|
|
50
50
|
Rectangle_default
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-O3JCMSS3.js";
|
|
52
|
+
import "./chunk-2J3JKXCP.js";
|
|
53
53
|
import {
|
|
54
54
|
Cartesian2_default,
|
|
55
55
|
Cartesian3_default,
|
|
56
56
|
Cartographic_default,
|
|
57
57
|
Ellipsoid_default
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-PYHLO636.js";
|
|
59
59
|
import {
|
|
60
60
|
Math_default
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
61
|
+
} from "./chunk-MSKXMXJI.js";
|
|
62
|
+
import "./chunk-OOK53QUQ.js";
|
|
63
|
+
import "./chunk-T77JILCU.js";
|
|
64
|
+
import "./chunk-VE7BFUIX.js";
|
|
65
65
|
import {
|
|
66
66
|
Check_default,
|
|
67
67
|
DeveloperError_default
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-S3PI2KFM.js";
|
|
69
69
|
import {
|
|
70
70
|
defined_default
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-AA4GZKOT.js";
|
|
72
72
|
|
|
73
73
|
// packages/engine/Source/Core/Intersections2D.js
|
|
74
74
|
var Intersections2D = {};
|
|
@@ -56,7 +56,7 @@ ApproximateTerrainHeights.initialize = function () {
|
|
|
56
56
|
/**
|
|
57
57
|
* Computes the minimum and maximum terrain heights for a given rectangle
|
|
58
58
|
* @param {Rectangle} rectangle The bounding rectangle
|
|
59
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
59
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid
|
|
60
60
|
* @return {{minimumTerrainHeight: number, maximumTerrainHeight: number}}
|
|
61
61
|
*/
|
|
62
62
|
ApproximateTerrainHeights.getMinimumMaximumHeights = function (
|
|
@@ -71,7 +71,7 @@ ApproximateTerrainHeights.getMinimumMaximumHeights = function (
|
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
73
|
//>>includeEnd('debug');
|
|
74
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
74
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
75
75
|
|
|
76
76
|
const xyLevel = getTileXYLevel(rectangle);
|
|
77
77
|
|
|
@@ -130,7 +130,7 @@ ApproximateTerrainHeights.getMinimumMaximumHeights = function (
|
|
|
130
130
|
/**
|
|
131
131
|
* Computes the bounding sphere based on the tile heights in the rectangle
|
|
132
132
|
* @param {Rectangle} rectangle The bounding rectangle
|
|
133
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
133
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid
|
|
134
134
|
* @return {BoundingSphere} The result bounding sphere
|
|
135
135
|
*/
|
|
136
136
|
ApproximateTerrainHeights.getBoundingSphere = function (rectangle, ellipsoid) {
|
|
@@ -142,7 +142,7 @@ ApproximateTerrainHeights.getBoundingSphere = function (rectangle, ellipsoid) {
|
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
144
|
//>>includeEnd('debug');
|
|
145
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
145
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
146
146
|
|
|
147
147
|
const xyLevel = getTileXYLevel(rectangle);
|
|
148
148
|
|
|
@@ -27,9 +27,9 @@ const ALL_CHILDREN = 15;
|
|
|
27
27
|
* Initialization options for the ArcGISTiledElevationTerrainProvider constructor
|
|
28
28
|
*
|
|
29
29
|
* @property {string} [token] The authorization token to use to connect to the service.
|
|
30
|
-
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
|
|
30
|
+
* @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If the tilingScheme is specified,
|
|
31
31
|
* this parameter is ignored and the tiling scheme's ellipsoid is used instead.
|
|
32
|
-
* If neither parameter is specified, the
|
|
32
|
+
* If neither parameter is specified, the default ellipsoid is used.
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -41,7 +41,7 @@ const ALL_CHILDREN = 15;
|
|
|
41
41
|
* @param {ArcGISTiledElevationTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
|
|
42
42
|
*/
|
|
43
43
|
function TerrainProviderBuilder(options) {
|
|
44
|
-
this.ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
44
|
+
this.ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
45
45
|
|
|
46
46
|
this.credit = undefined;
|
|
47
47
|
this.tilingScheme = undefined;
|
|
@@ -446,7 +446,7 @@ ArcGISTiledElevationTerrainProvider.prototype.requestTileGeometry = function (
|
|
|
446
446
|
encoding: that._encoding,
|
|
447
447
|
});
|
|
448
448
|
})
|
|
449
|
-
.catch(function (error) {
|
|
449
|
+
.catch(async function (error) {
|
|
450
450
|
if (
|
|
451
451
|
defined(availabilityRequest) &&
|
|
452
452
|
availabilityRequest.state === RequestState.CANCELLED
|
|
@@ -455,10 +455,14 @@ ArcGISTiledElevationTerrainProvider.prototype.requestTileGeometry = function (
|
|
|
455
455
|
|
|
456
456
|
// Don't reject the promise till the request is actually cancelled
|
|
457
457
|
// Otherwise it will think the request failed, but it didn't.
|
|
458
|
-
|
|
459
|
-
request.
|
|
460
|
-
|
|
461
|
-
|
|
458
|
+
try {
|
|
459
|
+
await request.deferred?.promise;
|
|
460
|
+
} catch {
|
|
461
|
+
// Eat this error
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
request.state = RequestState.CANCELLED;
|
|
465
|
+
return Promise.reject(error);
|
|
462
466
|
}
|
|
463
467
|
return Promise.reject(error);
|
|
464
468
|
});
|
|
@@ -3,6 +3,7 @@ import Cartographic from "./Cartographic.js";
|
|
|
3
3
|
import Check from "./Check.js";
|
|
4
4
|
import defaultValue from "./defaultValue.js";
|
|
5
5
|
import defined from "./defined.js";
|
|
6
|
+
import Ellipsoid from "./Ellipsoid.js";
|
|
6
7
|
import GeographicProjection from "./GeographicProjection.js";
|
|
7
8
|
import Intersect from "./Intersect.js";
|
|
8
9
|
import Rectangle from "./Rectangle.js";
|
|
@@ -177,6 +178,7 @@ BoundingRectangle.fromRectangle = function (rectangle, projection, result) {
|
|
|
177
178
|
return result;
|
|
178
179
|
}
|
|
179
180
|
|
|
181
|
+
defaultProjection._ellipsoid = Ellipsoid.default;
|
|
180
182
|
projection = defaultValue(projection, defaultProjection);
|
|
181
183
|
|
|
182
184
|
const lowerLeft = projection.project(
|
|
@@ -275,6 +275,7 @@ BoundingSphere.fromRectangleWithHeights2D = function (
|
|
|
275
275
|
return result;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
+
defaultProjection._ellipsoid = Ellipsoid.default;
|
|
278
279
|
projection = defaultValue(projection, defaultProjection);
|
|
279
280
|
|
|
280
281
|
Rectangle.southwest(rectangle, fromRectangle2DSouthwest);
|
|
@@ -311,7 +312,7 @@ const fromRectangle3DScratch = [];
|
|
|
311
312
|
* on the ellipsoid and contained in the rectangle. It may not be accurate for all rectangles on all types of ellipsoids.
|
|
312
313
|
*
|
|
313
314
|
* @param {Rectangle} [rectangle] The valid rectangle used to create a bounding sphere.
|
|
314
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
315
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid used to determine positions of the rectangle.
|
|
315
316
|
* @param {number} [surfaceHeight=0.0] The height above the surface of the ellipsoid.
|
|
316
317
|
* @param {BoundingSphere} [result] The object onto which to store the result.
|
|
317
318
|
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
|
|
@@ -322,7 +323,7 @@ BoundingSphere.fromRectangle3D = function (
|
|
|
322
323
|
surfaceHeight,
|
|
323
324
|
result
|
|
324
325
|
) {
|
|
325
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
326
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
326
327
|
surfaceHeight = defaultValue(surfaceHeight, 0.0);
|
|
327
328
|
|
|
328
329
|
if (!defined(result)) {
|
|
@@ -1277,6 +1278,7 @@ BoundingSphere.projectTo2D = function (sphere, projection, result) {
|
|
|
1277
1278
|
Check.typeOf.object("sphere", sphere);
|
|
1278
1279
|
//>>includeEnd('debug');
|
|
1279
1280
|
|
|
1281
|
+
projectTo2DProjection._ellipsoid = Ellipsoid.default;
|
|
1280
1282
|
projection = defaultValue(projection, projectTo2DProjection);
|
|
1281
1283
|
|
|
1282
1284
|
const ellipsoid = projection.ellipsoid;
|
|
@@ -866,7 +866,7 @@ Cartesian3.midpoint = function (left, right, result) {
|
|
|
866
866
|
* @param {number} longitude The longitude, in degrees
|
|
867
867
|
* @param {number} latitude The latitude, in degrees
|
|
868
868
|
* @param {number} [height=0.0] The height, in meters, above the ellipsoid.
|
|
869
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
869
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.
|
|
870
870
|
* @param {Cartesian3} [result] The object onto which to store the result.
|
|
871
871
|
* @returns {Cartesian3} The position
|
|
872
872
|
*
|
|
@@ -892,7 +892,9 @@ Cartesian3.fromDegrees = function (
|
|
|
892
892
|
|
|
893
893
|
let scratchN = new Cartesian3();
|
|
894
894
|
let scratchK = new Cartesian3();
|
|
895
|
-
|
|
895
|
+
|
|
896
|
+
// To prevent a circular dependency, this value is overridden by Ellipsoid when Ellipsoid.default is set
|
|
897
|
+
Cartesian3._ellipsoidRadiiSquared = new Cartesian3(
|
|
896
898
|
6378137.0 * 6378137.0,
|
|
897
899
|
6378137.0 * 6378137.0,
|
|
898
900
|
6356752.3142451793 * 6356752.3142451793
|
|
@@ -904,7 +906,7 @@ const wgs84RadiiSquared = new Cartesian3(
|
|
|
904
906
|
* @param {number} longitude The longitude, in radians
|
|
905
907
|
* @param {number} latitude The latitude, in radians
|
|
906
908
|
* @param {number} [height=0.0] The height, in meters, above the ellipsoid.
|
|
907
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
909
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.
|
|
908
910
|
* @param {Cartesian3} [result] The object onto which to store the result.
|
|
909
911
|
* @returns {Cartesian3} The position
|
|
910
912
|
*
|
|
@@ -924,9 +926,10 @@ Cartesian3.fromRadians = function (
|
|
|
924
926
|
//>>includeEnd('debug');
|
|
925
927
|
|
|
926
928
|
height = defaultValue(height, 0.0);
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
929
|
+
|
|
930
|
+
const radiiSquared = !defined(ellipsoid)
|
|
931
|
+
? Cartesian3._ellipsoidRadiiSquared
|
|
932
|
+
: ellipsoid.radiiSquared;
|
|
930
933
|
|
|
931
934
|
const cosLatitude = Math.cos(latitude);
|
|
932
935
|
scratchN.x = cosLatitude * Math.cos(longitude);
|
|
@@ -949,7 +952,7 @@ Cartesian3.fromRadians = function (
|
|
|
949
952
|
* Returns an array of Cartesian3 positions given an array of longitude and latitude values given in degrees.
|
|
950
953
|
*
|
|
951
954
|
* @param {number[]} coordinates A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].
|
|
952
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
955
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the coordinates lie.
|
|
953
956
|
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
|
|
954
957
|
* @returns {Cartesian3[]} The array of positions.
|
|
955
958
|
*
|
|
@@ -993,7 +996,7 @@ Cartesian3.fromDegreesArray = function (coordinates, ellipsoid, result) {
|
|
|
993
996
|
* Returns an array of Cartesian3 positions given an array of longitude and latitude values given in radians.
|
|
994
997
|
*
|
|
995
998
|
* @param {number[]} coordinates A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].
|
|
996
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
999
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the coordinates lie.
|
|
997
1000
|
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
|
|
998
1001
|
* @returns {Cartesian3[]} The array of positions.
|
|
999
1002
|
*
|
|
@@ -1037,7 +1040,7 @@ Cartesian3.fromRadiansArray = function (coordinates, ellipsoid, result) {
|
|
|
1037
1040
|
* Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in degrees.
|
|
1038
1041
|
*
|
|
1039
1042
|
* @param {number[]} coordinates A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].
|
|
1040
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
1043
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.
|
|
1041
1044
|
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
|
|
1042
1045
|
* @returns {Cartesian3[]} The array of positions.
|
|
1043
1046
|
*
|
|
@@ -1082,7 +1085,7 @@ Cartesian3.fromDegreesArrayHeights = function (coordinates, ellipsoid, result) {
|
|
|
1082
1085
|
* Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in radians.
|
|
1083
1086
|
*
|
|
1084
1087
|
* @param {number[]} coordinates A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].
|
|
1085
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
1088
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.
|
|
1086
1089
|
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
|
|
1087
1090
|
* @returns {Cartesian3[]} The array of positions.
|
|
1088
1091
|
*
|