@rtzh/engine 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Workers/chunk-243UEBJF.js +1045 -0
- package/Build/Workers/chunk-2UNHFFAZ.js +352 -0
- package/Build/Workers/chunk-2Y2KA6PM.js +387 -0
- package/Build/Workers/chunk-2ZXYLPPT.js +163 -0
- package/Build/Workers/chunk-32ZGDYJY.js +3514 -0
- package/Build/Workers/chunk-3NSMZ3XW.js +1067 -0
- package/Build/Workers/chunk-3WT5VKYM.js +101 -0
- package/Build/Workers/chunk-4DIL24GG.js +1460 -0
- package/Build/Workers/chunk-4FEDW3WT.js +299 -0
- package/Build/Workers/chunk-4IXXMXPJ.js +682 -0
- package/Build/Workers/chunk-4SC4KVID.js +692 -0
- package/Build/Workers/chunk-52UUGJQ6.js +288 -0
- package/Build/Workers/chunk-53AFSDGM.js +37 -0
- package/Build/Workers/chunk-54LZ6OUD.js +1067 -0
- package/Build/Workers/chunk-54SSO7NS.js +352 -0
- package/Build/Workers/chunk-565HBO3F.js +352 -0
- package/Build/Workers/chunk-5L3PEFKO.js +629 -0
- package/Build/Workers/chunk-5RMI6LFO.js +692 -0
- package/Build/Workers/chunk-5SVTAJRH.js +837 -0
- package/Build/Workers/chunk-5VDZEVQX.js +788 -0
- package/Build/Workers/chunk-5VWFNSLF.js +44 -0
- package/Build/Workers/chunk-5W4ISZGQ.js +1483 -0
- package/Build/Workers/chunk-5ZMMQ7HE.js +37 -0
- package/Build/Workers/chunk-64VDO4BW.js +114 -0
- package/Build/Workers/chunk-6AUSOZOL.js +476 -0
- package/Build/Workers/chunk-6BIU5AL4.js +692 -0
- package/Build/Workers/chunk-6KA3AJM6.js +455 -0
- package/Build/Workers/chunk-6MYDYE24.js +280 -0
- package/Build/Workers/chunk-6RUDXAFC.js +2719 -0
- package/Build/Workers/chunk-6YSUD2OH.js +219 -0
- package/Build/Workers/chunk-6YT2LZ3Z.js +1443 -0
- package/Build/Workers/chunk-73EGVDOC.js +398 -0
- package/Build/Workers/chunk-7BOVULMD.js +44 -0
- package/Build/Workers/chunk-7KOMCIWI.js +8366 -0
- package/Build/Workers/chunk-7MMYV5PM.js +288 -0
- package/Build/Workers/chunk-7QPQGSS3.js +57 -0
- package/Build/Workers/chunk-AEURJQ3B.js +73 -0
- package/Build/Workers/chunk-AMJRLIO3.js +414 -0
- package/Build/Workers/chunk-APOATHFZ.js +138 -0
- package/Build/Workers/chunk-AVNHAFMV.js +114 -0
- package/Build/Workers/chunk-AWMYTHW4.js +101 -0
- package/Build/Workers/chunk-BCYABDWF.js +3514 -0
- package/Build/Workers/chunk-BJHSYHOQ.js +97 -0
- package/Build/Workers/chunk-BM6ZG63T.js +171 -0
- package/Build/Workers/chunk-C3G2NDXM.js +162 -0
- package/Build/Workers/chunk-CTARL7CY.js +511 -0
- package/Build/Workers/chunk-DIA4J2DB.js +497 -0
- package/Build/Workers/chunk-E3NHG3TR.js +1460 -0
- package/Build/Workers/chunk-E5BSDIGY.js +139 -0
- package/Build/Workers/chunk-EDVAQGDJ.js +2719 -0
- package/Build/Workers/chunk-EFHDO3L2.js +102 -0
- package/Build/Workers/chunk-EJVGOIOW.js +1317 -0
- package/Build/Workers/chunk-EPVJ5OOH.js +8366 -0
- package/Build/Workers/chunk-ERYOZBVC.js +171 -0
- package/Build/Workers/chunk-ET7LWDHA.js +58 -0
- package/Build/Workers/chunk-EWDHM5NC.js +37 -0
- package/Build/Workers/chunk-F4Q3VOCC.js +1317 -0
- package/Build/Workers/chunk-FCSN7XOU.js +55 -0
- package/Build/Workers/chunk-FD62YGTB.js +219 -0
- package/Build/Workers/chunk-FHM3HFYM.js +1045 -0
- package/Build/Workers/chunk-FNI64UKI.js +57 -0
- package/Build/Workers/chunk-FRUZKVBP.js +352 -0
- package/Build/Workers/chunk-FSYQE5XE.js +55 -0
- package/Build/Workers/chunk-FYW5UQ24.js +837 -0
- package/Build/Workers/chunk-FYZVCB32.js +75 -0
- package/Build/Workers/chunk-G7PGTG3P.js +387 -0
- package/Build/Workers/chunk-GAQXLBFJ.js +1483 -0
- package/Build/Workers/chunk-GEH53ULL.js +299 -0
- package/Build/Workers/chunk-GLA2PT5T.js +476 -0
- package/Build/Workers/chunk-GWLEBUVI.js +2058 -0
- package/Build/Workers/chunk-GYIGOBV2.js +439 -0
- package/Build/Workers/chunk-GZMTBQM2.js +1443 -0
- package/Build/Workers/chunk-H2MM7FMU.js +1054 -0
- package/Build/Workers/chunk-H33FCT5U.js +940 -0
- package/Build/Workers/chunk-HAR6Y2HP.js +1800 -0
- package/Build/Workers/chunk-HBL3QZ2L.js +642 -0
- package/Build/Workers/chunk-HEKLTOOR.js +1443 -0
- package/Build/Workers/chunk-HM4MH5IG.js +138 -0
- package/Build/Workers/chunk-I5JHYEIE.js +241 -0
- package/Build/Workers/chunk-IB2XQV6U.js +101 -0
- package/Build/Workers/chunk-IC2JHDCI.js +114 -0
- package/Build/Workers/chunk-IEEHNZ36.js +241 -0
- package/Build/Workers/chunk-IRG63TBY.js +55 -0
- package/Build/Workers/chunk-IXM65GBF.js +256 -0
- package/Build/Workers/chunk-IY53MZW2.js +58 -0
- package/Build/Workers/chunk-IYAZCFAC.js +642 -0
- package/Build/Workers/chunk-J2CUNLQP.js +940 -0
- package/Build/Workers/chunk-J766O3PA.js +256 -0
- package/Build/Workers/chunk-JRPAFYGJ.js +1054 -0
- package/Build/Workers/chunk-JWEZXKBE.js +73 -0
- package/Build/Workers/chunk-KFOT2YV5.js +138 -0
- package/Build/Workers/chunk-KGQGZ7PF.js +778 -0
- package/Build/Workers/chunk-KMZXZUA7.js +1460 -0
- package/Build/Workers/chunk-KOVKY3HB.js +198 -0
- package/Build/Workers/chunk-KQ4ET526.js +163 -0
- package/Build/Workers/chunk-L2QIVAZV.js +3514 -0
- package/Build/Workers/chunk-LGMONS4O.js +1317 -0
- package/Build/Workers/chunk-LJHG4PJQ.js +305 -0
- package/Build/Workers/chunk-LNS36LUZ.js +2058 -0
- package/Build/Workers/chunk-LPJHTJDQ.js +305 -0
- package/Build/Workers/chunk-LRW2QXMW.js +352 -0
- package/Build/Workers/chunk-LUUEGFLT.js +305 -0
- package/Build/Workers/chunk-LW2VGHDM.js +1800 -0
- package/Build/Workers/chunk-LXM2ZC4V.js +288 -0
- package/Build/Workers/chunk-LXMLERGC.js +1067 -0
- package/Build/Workers/chunk-MEFWVMG6.js +788 -0
- package/Build/Workers/chunk-MJVNNURF.js +368 -0
- package/Build/Workers/chunk-MWN26ZEM.js +280 -0
- package/Build/Workers/chunk-NIWB6UMY.js +198 -0
- package/Build/Workers/chunk-NJEG7WRW.js +387 -0
- package/Build/Workers/chunk-O224ZEA5.js +58 -0
- package/Build/Workers/chunk-O5ICO3AS.js +682 -0
- package/Build/Workers/chunk-O5QH7XD5.js +629 -0
- package/Build/Workers/chunk-O6T3T3V3.js +97 -0
- package/Build/Workers/chunk-OBM2JYMG.js +75 -0
- package/Build/Workers/chunk-ODZZZGXK.js +219 -0
- package/Build/Workers/chunk-OFTWEOW2.js +1483 -0
- package/Build/Workers/chunk-OIJH6LAY.js +497 -0
- package/Build/Workers/chunk-OJFVD5ZS.js +778 -0
- package/Build/Workers/chunk-OJNPKCEL.js +73 -0
- package/Build/Workers/chunk-PQLZOYZE.js +642 -0
- package/Build/Workers/chunk-PU44PXY2.js +75 -0
- package/Build/Workers/chunk-Q36VXWGP.js +57 -0
- package/Build/Workers/chunk-Q4XPVYXJ.js +476 -0
- package/Build/Workers/chunk-QGXE4VZ3.js +55 -0
- package/Build/Workers/chunk-QIEHP7O4.js +280 -0
- package/Build/Workers/chunk-QY55DT53.js +97 -0
- package/Build/Workers/chunk-R3PTQZ6H.js +44 -0
- package/Build/Workers/chunk-RJVB3K2X.js +511 -0
- package/Build/Workers/chunk-RORZNBGJ.js +299 -0
- package/Build/Workers/chunk-RRBGLANL.js +55 -0
- package/Build/Workers/chunk-RT7PY6BH.js +2719 -0
- package/Build/Workers/chunk-SAD42JSM.js +102 -0
- package/Build/Workers/chunk-SBR7MW44.js +139 -0
- package/Build/Workers/chunk-SFM3GNS2.js +682 -0
- package/Build/Workers/chunk-SKXE77AM.js +139 -0
- package/Build/Workers/chunk-SLYUIIFB.js +455 -0
- package/Build/Workers/chunk-SQSWONTJ.js +241 -0
- package/Build/Workers/chunk-SRLJWNU2.js +368 -0
- package/Build/Workers/chunk-SZELHE7Q.js +163 -0
- package/Build/Workers/chunk-T4LDJBKR.js +124 -0
- package/Build/Workers/chunk-TBASKFFL.js +124 -0
- package/Build/Workers/chunk-TDGGEIZE.js +398 -0
- package/Build/Workers/chunk-TQ63SH2Z.js +352 -0
- package/Build/Workers/chunk-U3VI26GL.js +162 -0
- package/Build/Workers/chunk-U77FLUQF.js +368 -0
- package/Build/Workers/chunk-UIYQEJ5H.js +1054 -0
- package/Build/Workers/chunk-UJ72JOGF.js +511 -0
- package/Build/Workers/chunk-UY7I27VQ.js +1800 -0
- package/Build/Workers/chunk-VLB25GGE.js +439 -0
- package/Build/Workers/chunk-VVKDT4J7.js +837 -0
- package/Build/Workers/chunk-VXDOONLH.js +162 -0
- package/Build/Workers/chunk-W4DV7TAL.js +8366 -0
- package/Build/Workers/chunk-WFTPZ3ZX.js +788 -0
- package/Build/Workers/chunk-WLIQ26XU.js +455 -0
- package/Build/Workers/chunk-WOEPS2UA.js +171 -0
- package/Build/Workers/chunk-WWLWTSMV.js +55 -0
- package/Build/Workers/chunk-WX2ZANQC.js +940 -0
- package/Build/Workers/chunk-XEB4GEXW.js +629 -0
- package/Build/Workers/chunk-XFKTM6GN.js +2058 -0
- package/Build/Workers/chunk-XKBR7TJB.js +398 -0
- package/Build/Workers/chunk-XYRT4RDI.js +1045 -0
- package/Build/Workers/chunk-XZINQPR6.js +124 -0
- package/Build/Workers/chunk-YLKTSY65.js +414 -0
- package/Build/Workers/chunk-YLSZYTTO.js +102 -0
- package/Build/Workers/chunk-YQXKIGXX.js +414 -0
- package/Build/Workers/chunk-YR3LX3PR.js +497 -0
- package/Build/Workers/chunk-Z5MHVJGN.js +778 -0
- package/Build/Workers/chunk-ZBRVFEGF.js +256 -0
- package/Build/Workers/chunk-ZCPCQJBX.js +198 -0
- package/Build/Workers/chunk-ZS7KQSEM.js +439 -0
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipseGeometry.js +26 -26
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
- package/Build/Workers/createEllipsoidGeometry.js +19 -19
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
- package/Build/Workers/createFrustumGeometry.js +18 -18
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
- package/Build/Workers/createGeometry.js +24 -24
- package/Build/Workers/createGroundPolylineGeometry.js +22 -22
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +13 -13
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- package/Build/Workers/createWallGeometry.js +24 -24
- package/Build/Workers/createWallOutlineGeometry.js +23 -23
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
- package/Build/Workers/transcodeKTX2.js +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Scene/Cesium3DTileset.js +4163 -4105
- package/Source/Scene/Model/BarycentricWireframePipelineStage.js +327 -73
- package/Source/Scene/Model/Model.js +3631 -3512
- package/Source/Scene/Model/Model3DTileContent.js +585 -568
- package/Source/Scene/Model/ModelRuntimePrimitive.js +391 -391
- package/Source/Scene/Model/WireframePipelineStage.js +122 -122
- package/Source/Shaders/Model/ModelFS.glsl +38 -2
- package/Source/Shaders/Model/ModelFS.js +38 -2
- package/Source/Shaders/Model/ModelVS.glsl +3 -0
- package/Source/Shaders/Model/ModelVS.js +3 -0
- package/index.d.ts +801 -773
- package/index.js +145 -145
- package/package.json +1 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.6
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
Frozen_default
|
|
28
|
+
} from "./chunk-GZMTBQM2.js";
|
|
29
|
+
import {
|
|
30
|
+
DeveloperError_default
|
|
31
|
+
} from "./chunk-SZELHE7Q.js";
|
|
32
|
+
import {
|
|
33
|
+
defined_default
|
|
34
|
+
} from "./chunk-OBM2JYMG.js";
|
|
35
|
+
|
|
36
|
+
// packages/engine/Source/Core/VertexFormat.js
|
|
37
|
+
function VertexFormat(options) {
|
|
38
|
+
options = options ?? Frozen_default.EMPTY_OBJECT;
|
|
39
|
+
this.position = options.position ?? false;
|
|
40
|
+
this.normal = options.normal ?? false;
|
|
41
|
+
this.st = options.st ?? false;
|
|
42
|
+
this.bitangent = options.bitangent ?? false;
|
|
43
|
+
this.tangent = options.tangent ?? false;
|
|
44
|
+
this.color = options.color ?? false;
|
|
45
|
+
}
|
|
46
|
+
VertexFormat.POSITION_ONLY = Object.freeze(
|
|
47
|
+
new VertexFormat({
|
|
48
|
+
position: true
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
VertexFormat.POSITION_AND_NORMAL = Object.freeze(
|
|
52
|
+
new VertexFormat({
|
|
53
|
+
position: true,
|
|
54
|
+
normal: true
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
VertexFormat.POSITION_NORMAL_AND_ST = Object.freeze(
|
|
58
|
+
new VertexFormat({
|
|
59
|
+
position: true,
|
|
60
|
+
normal: true,
|
|
61
|
+
st: true
|
|
62
|
+
})
|
|
63
|
+
);
|
|
64
|
+
VertexFormat.POSITION_AND_ST = Object.freeze(
|
|
65
|
+
new VertexFormat({
|
|
66
|
+
position: true,
|
|
67
|
+
st: true
|
|
68
|
+
})
|
|
69
|
+
);
|
|
70
|
+
VertexFormat.POSITION_AND_COLOR = Object.freeze(
|
|
71
|
+
new VertexFormat({
|
|
72
|
+
position: true,
|
|
73
|
+
color: true
|
|
74
|
+
})
|
|
75
|
+
);
|
|
76
|
+
VertexFormat.ALL = Object.freeze(
|
|
77
|
+
new VertexFormat({
|
|
78
|
+
position: true,
|
|
79
|
+
normal: true,
|
|
80
|
+
st: true,
|
|
81
|
+
tangent: true,
|
|
82
|
+
bitangent: true
|
|
83
|
+
})
|
|
84
|
+
);
|
|
85
|
+
VertexFormat.DEFAULT = VertexFormat.POSITION_NORMAL_AND_ST;
|
|
86
|
+
VertexFormat.packedLength = 6;
|
|
87
|
+
VertexFormat.pack = function(value, array, startingIndex) {
|
|
88
|
+
if (!defined_default(value)) {
|
|
89
|
+
throw new DeveloperError_default("value is required");
|
|
90
|
+
}
|
|
91
|
+
if (!defined_default(array)) {
|
|
92
|
+
throw new DeveloperError_default("array is required");
|
|
93
|
+
}
|
|
94
|
+
startingIndex = startingIndex ?? 0;
|
|
95
|
+
array[startingIndex++] = value.position ? 1 : 0;
|
|
96
|
+
array[startingIndex++] = value.normal ? 1 : 0;
|
|
97
|
+
array[startingIndex++] = value.st ? 1 : 0;
|
|
98
|
+
array[startingIndex++] = value.tangent ? 1 : 0;
|
|
99
|
+
array[startingIndex++] = value.bitangent ? 1 : 0;
|
|
100
|
+
array[startingIndex] = value.color ? 1 : 0;
|
|
101
|
+
return array;
|
|
102
|
+
};
|
|
103
|
+
VertexFormat.unpack = function(array, startingIndex, result) {
|
|
104
|
+
if (!defined_default(array)) {
|
|
105
|
+
throw new DeveloperError_default("array is required");
|
|
106
|
+
}
|
|
107
|
+
startingIndex = startingIndex ?? 0;
|
|
108
|
+
if (!defined_default(result)) {
|
|
109
|
+
result = new VertexFormat();
|
|
110
|
+
}
|
|
111
|
+
result.position = array[startingIndex++] === 1;
|
|
112
|
+
result.normal = array[startingIndex++] === 1;
|
|
113
|
+
result.st = array[startingIndex++] === 1;
|
|
114
|
+
result.tangent = array[startingIndex++] === 1;
|
|
115
|
+
result.bitangent = array[startingIndex++] === 1;
|
|
116
|
+
result.color = array[startingIndex] === 1;
|
|
117
|
+
return result;
|
|
118
|
+
};
|
|
119
|
+
VertexFormat.clone = function(vertexFormat, result) {
|
|
120
|
+
if (!defined_default(vertexFormat)) {
|
|
121
|
+
return void 0;
|
|
122
|
+
}
|
|
123
|
+
if (!defined_default(result)) {
|
|
124
|
+
result = new VertexFormat();
|
|
125
|
+
}
|
|
126
|
+
result.position = vertexFormat.position;
|
|
127
|
+
result.normal = vertexFormat.normal;
|
|
128
|
+
result.st = vertexFormat.st;
|
|
129
|
+
result.tangent = vertexFormat.tangent;
|
|
130
|
+
result.bitangent = vertexFormat.bitangent;
|
|
131
|
+
result.color = vertexFormat.color;
|
|
132
|
+
return result;
|
|
133
|
+
};
|
|
134
|
+
var VertexFormat_default = VertexFormat;
|
|
135
|
+
|
|
136
|
+
export {
|
|
137
|
+
VertexFormat_default
|
|
138
|
+
};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.8
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
GeographicProjection_default
|
|
28
|
+
} from "./chunk-H33FCT5U.js";
|
|
29
|
+
import {
|
|
30
|
+
Matrix2_default,
|
|
31
|
+
Rectangle_default
|
|
32
|
+
} from "./chunk-EPVJ5OOH.js";
|
|
33
|
+
import {
|
|
34
|
+
Cartographic_default,
|
|
35
|
+
Ellipsoid_default
|
|
36
|
+
} from "./chunk-KMZXZUA7.js";
|
|
37
|
+
import {
|
|
38
|
+
Cartesian3_default
|
|
39
|
+
} from "./chunk-HEKLTOOR.js";
|
|
40
|
+
import {
|
|
41
|
+
Math_default
|
|
42
|
+
} from "./chunk-YR3LX3PR.js";
|
|
43
|
+
import {
|
|
44
|
+
DeveloperError_default
|
|
45
|
+
} from "./chunk-2ZXYLPPT.js";
|
|
46
|
+
import {
|
|
47
|
+
defined_default
|
|
48
|
+
} from "./chunk-PU44PXY2.js";
|
|
49
|
+
|
|
50
|
+
// packages/engine/Source/Core/RectangleGeometryLibrary.js
|
|
51
|
+
var cos = Math.cos;
|
|
52
|
+
var sin = Math.sin;
|
|
53
|
+
var sqrt = Math.sqrt;
|
|
54
|
+
var RectangleGeometryLibrary = {};
|
|
55
|
+
RectangleGeometryLibrary.computePosition = function(computedOptions, ellipsoid, computeST, row, col, position, st) {
|
|
56
|
+
const radiiSquared = ellipsoid.radiiSquared;
|
|
57
|
+
const nwCorner = computedOptions.nwCorner;
|
|
58
|
+
const rectangle = computedOptions.boundingRectangle;
|
|
59
|
+
let stLatitude = nwCorner.latitude - computedOptions.granYCos * row + col * computedOptions.granXSin;
|
|
60
|
+
const cosLatitude = cos(stLatitude);
|
|
61
|
+
const nZ = sin(stLatitude);
|
|
62
|
+
const kZ = radiiSquared.z * nZ;
|
|
63
|
+
let stLongitude = nwCorner.longitude + row * computedOptions.granYSin + col * computedOptions.granXCos;
|
|
64
|
+
const nX = cosLatitude * cos(stLongitude);
|
|
65
|
+
const nY = cosLatitude * sin(stLongitude);
|
|
66
|
+
const kX = radiiSquared.x * nX;
|
|
67
|
+
const kY = radiiSquared.y * nY;
|
|
68
|
+
const gamma = sqrt(kX * nX + kY * nY + kZ * nZ);
|
|
69
|
+
position.x = kX / gamma;
|
|
70
|
+
position.y = kY / gamma;
|
|
71
|
+
position.z = kZ / gamma;
|
|
72
|
+
if (computeST) {
|
|
73
|
+
const stNwCorner = computedOptions.stNwCorner;
|
|
74
|
+
if (defined_default(stNwCorner)) {
|
|
75
|
+
stLatitude = stNwCorner.latitude - computedOptions.stGranYCos * row + col * computedOptions.stGranXSin;
|
|
76
|
+
stLongitude = stNwCorner.longitude + row * computedOptions.stGranYSin + col * computedOptions.stGranXCos;
|
|
77
|
+
st.x = (stLongitude - computedOptions.stWest) * computedOptions.lonScalar;
|
|
78
|
+
st.y = (stLatitude - computedOptions.stSouth) * computedOptions.latScalar;
|
|
79
|
+
} else {
|
|
80
|
+
st.x = (stLongitude - rectangle.west) * computedOptions.lonScalar;
|
|
81
|
+
st.y = (stLatitude - rectangle.south) * computedOptions.latScalar;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var rotationMatrixScratch = new Matrix2_default();
|
|
86
|
+
var nwCartesian = new Cartesian3_default();
|
|
87
|
+
var centerScratch = new Cartographic_default();
|
|
88
|
+
var centerCartesian = new Cartesian3_default();
|
|
89
|
+
var proj = new GeographicProjection_default();
|
|
90
|
+
function getRotationOptions(nwCorner, rotation, granularityX, granularityY, center, width, height) {
|
|
91
|
+
const cosRotation = Math.cos(rotation);
|
|
92
|
+
const granYCos = granularityY * cosRotation;
|
|
93
|
+
const granXCos = granularityX * cosRotation;
|
|
94
|
+
const sinRotation = Math.sin(rotation);
|
|
95
|
+
const granYSin = granularityY * sinRotation;
|
|
96
|
+
const granXSin = granularityX * sinRotation;
|
|
97
|
+
proj._ellipsoid = Ellipsoid_default.default;
|
|
98
|
+
nwCartesian = proj.project(nwCorner, nwCartesian);
|
|
99
|
+
nwCartesian = Cartesian3_default.subtract(nwCartesian, centerCartesian, nwCartesian);
|
|
100
|
+
const rotationMatrix = Matrix2_default.fromRotation(rotation, rotationMatrixScratch);
|
|
101
|
+
nwCartesian = Matrix2_default.multiplyByVector(
|
|
102
|
+
rotationMatrix,
|
|
103
|
+
nwCartesian,
|
|
104
|
+
nwCartesian
|
|
105
|
+
);
|
|
106
|
+
nwCartesian = Cartesian3_default.add(nwCartesian, centerCartesian, nwCartesian);
|
|
107
|
+
nwCorner = proj.unproject(nwCartesian, nwCorner);
|
|
108
|
+
width -= 1;
|
|
109
|
+
height -= 1;
|
|
110
|
+
const latitude = nwCorner.latitude;
|
|
111
|
+
const latitude0 = latitude + width * granXSin;
|
|
112
|
+
const latitude1 = latitude - granYCos * height;
|
|
113
|
+
const latitude2 = latitude - granYCos * height + width * granXSin;
|
|
114
|
+
const north = Math.max(latitude, latitude0, latitude1, latitude2);
|
|
115
|
+
const south = Math.min(latitude, latitude0, latitude1, latitude2);
|
|
116
|
+
const longitude = nwCorner.longitude;
|
|
117
|
+
const longitude0 = longitude + width * granXCos;
|
|
118
|
+
const longitude1 = longitude + height * granYSin;
|
|
119
|
+
const longitude2 = longitude + height * granYSin + width * granXCos;
|
|
120
|
+
const east = Math.max(longitude, longitude0, longitude1, longitude2);
|
|
121
|
+
const west = Math.min(longitude, longitude0, longitude1, longitude2);
|
|
122
|
+
return {
|
|
123
|
+
north,
|
|
124
|
+
south,
|
|
125
|
+
east,
|
|
126
|
+
west,
|
|
127
|
+
granYCos,
|
|
128
|
+
granYSin,
|
|
129
|
+
granXCos,
|
|
130
|
+
granXSin,
|
|
131
|
+
nwCorner
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
RectangleGeometryLibrary.computeOptions = function(rectangle, granularity, rotation, stRotation, boundingRectangleScratch, nwCornerResult, stNwCornerResult) {
|
|
135
|
+
let east = rectangle.east;
|
|
136
|
+
let west = rectangle.west;
|
|
137
|
+
let north = rectangle.north;
|
|
138
|
+
let south = rectangle.south;
|
|
139
|
+
let northCap = false;
|
|
140
|
+
let southCap = false;
|
|
141
|
+
if (north === Math_default.PI_OVER_TWO) {
|
|
142
|
+
northCap = true;
|
|
143
|
+
}
|
|
144
|
+
if (south === -Math_default.PI_OVER_TWO) {
|
|
145
|
+
southCap = true;
|
|
146
|
+
}
|
|
147
|
+
let dx;
|
|
148
|
+
const dy = north - south;
|
|
149
|
+
if (west > east) {
|
|
150
|
+
dx = Math_default.TWO_PI - west + east;
|
|
151
|
+
} else {
|
|
152
|
+
dx = east - west;
|
|
153
|
+
}
|
|
154
|
+
const width = Math.ceil(dx / granularity) + 1;
|
|
155
|
+
const height = Math.ceil(dy / granularity) + 1;
|
|
156
|
+
const granularityX = dx / (width - 1);
|
|
157
|
+
const granularityY = dy / (height - 1);
|
|
158
|
+
const nwCorner = Rectangle_default.northwest(rectangle, nwCornerResult);
|
|
159
|
+
const center = Rectangle_default.center(rectangle, centerScratch);
|
|
160
|
+
if (rotation !== 0 || stRotation !== 0) {
|
|
161
|
+
if (center.longitude < nwCorner.longitude) {
|
|
162
|
+
center.longitude += Math_default.TWO_PI;
|
|
163
|
+
}
|
|
164
|
+
proj._ellipsoid = Ellipsoid_default.default;
|
|
165
|
+
centerCartesian = proj.project(center, centerCartesian);
|
|
166
|
+
}
|
|
167
|
+
const granYCos = granularityY;
|
|
168
|
+
const granXCos = granularityX;
|
|
169
|
+
const granYSin = 0;
|
|
170
|
+
const granXSin = 0;
|
|
171
|
+
const boundingRectangle = Rectangle_default.clone(
|
|
172
|
+
rectangle,
|
|
173
|
+
boundingRectangleScratch
|
|
174
|
+
);
|
|
175
|
+
const computedOptions = {
|
|
176
|
+
granYCos,
|
|
177
|
+
granYSin,
|
|
178
|
+
granXCos,
|
|
179
|
+
granXSin,
|
|
180
|
+
nwCorner,
|
|
181
|
+
boundingRectangle,
|
|
182
|
+
width,
|
|
183
|
+
height,
|
|
184
|
+
northCap,
|
|
185
|
+
southCap
|
|
186
|
+
};
|
|
187
|
+
if (rotation !== 0) {
|
|
188
|
+
const rotationOptions = getRotationOptions(
|
|
189
|
+
nwCorner,
|
|
190
|
+
rotation,
|
|
191
|
+
granularityX,
|
|
192
|
+
granularityY,
|
|
193
|
+
center,
|
|
194
|
+
width,
|
|
195
|
+
height
|
|
196
|
+
);
|
|
197
|
+
north = rotationOptions.north;
|
|
198
|
+
south = rotationOptions.south;
|
|
199
|
+
east = rotationOptions.east;
|
|
200
|
+
west = rotationOptions.west;
|
|
201
|
+
if (north < -Math_default.PI_OVER_TWO || north > Math_default.PI_OVER_TWO || south < -Math_default.PI_OVER_TWO || south > Math_default.PI_OVER_TWO) {
|
|
202
|
+
throw new DeveloperError_default(
|
|
203
|
+
"Rotated rectangle is invalid. It crosses over either the north or south pole."
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
computedOptions.granYCos = rotationOptions.granYCos;
|
|
207
|
+
computedOptions.granYSin = rotationOptions.granYSin;
|
|
208
|
+
computedOptions.granXCos = rotationOptions.granXCos;
|
|
209
|
+
computedOptions.granXSin = rotationOptions.granXSin;
|
|
210
|
+
boundingRectangle.north = north;
|
|
211
|
+
boundingRectangle.south = south;
|
|
212
|
+
boundingRectangle.east = east;
|
|
213
|
+
boundingRectangle.west = west;
|
|
214
|
+
}
|
|
215
|
+
if (stRotation !== 0) {
|
|
216
|
+
rotation = rotation - stRotation;
|
|
217
|
+
const stNwCorner = Rectangle_default.northwest(boundingRectangle, stNwCornerResult);
|
|
218
|
+
const stRotationOptions = getRotationOptions(
|
|
219
|
+
stNwCorner,
|
|
220
|
+
rotation,
|
|
221
|
+
granularityX,
|
|
222
|
+
granularityY,
|
|
223
|
+
center,
|
|
224
|
+
width,
|
|
225
|
+
height
|
|
226
|
+
);
|
|
227
|
+
computedOptions.stGranYCos = stRotationOptions.granYCos;
|
|
228
|
+
computedOptions.stGranXCos = stRotationOptions.granXCos;
|
|
229
|
+
computedOptions.stGranYSin = stRotationOptions.granYSin;
|
|
230
|
+
computedOptions.stGranXSin = stRotationOptions.granXSin;
|
|
231
|
+
computedOptions.stNwCorner = stNwCorner;
|
|
232
|
+
computedOptions.stWest = stRotationOptions.west;
|
|
233
|
+
computedOptions.stSouth = stRotationOptions.south;
|
|
234
|
+
}
|
|
235
|
+
return computedOptions;
|
|
236
|
+
};
|
|
237
|
+
var RectangleGeometryLibrary_default = RectangleGeometryLibrary;
|
|
238
|
+
|
|
239
|
+
export {
|
|
240
|
+
RectangleGeometryLibrary_default
|
|
241
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.6
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
defined_default
|
|
28
|
+
} from "./chunk-OBM2JYMG.js";
|
|
29
|
+
|
|
30
|
+
// packages/engine/Source/Core/formatError.js
|
|
31
|
+
function formatError(object) {
|
|
32
|
+
let result;
|
|
33
|
+
const name = object.name;
|
|
34
|
+
const message = object.message;
|
|
35
|
+
if (defined_default(name) && defined_default(message)) {
|
|
36
|
+
result = `${name}: ${message}`;
|
|
37
|
+
} else {
|
|
38
|
+
result = object.toString();
|
|
39
|
+
}
|
|
40
|
+
const stack = object.stack;
|
|
41
|
+
if (defined_default(stack)) {
|
|
42
|
+
result += `
|
|
43
|
+
${stack}`;
|
|
44
|
+
}
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
var formatError_default = formatError;
|
|
48
|
+
|
|
49
|
+
// packages/engine/Source/Workers/createTaskProcessorWorker.js
|
|
50
|
+
function createTaskProcessorWorker(workerFunction) {
|
|
51
|
+
async function onMessageHandler({ data }) {
|
|
52
|
+
const transferableObjects = [];
|
|
53
|
+
const responseMessage = {
|
|
54
|
+
id: data.id,
|
|
55
|
+
result: void 0,
|
|
56
|
+
error: void 0
|
|
57
|
+
};
|
|
58
|
+
self.CESIUM_BASE_URL = data.baseUrl;
|
|
59
|
+
try {
|
|
60
|
+
const result = await workerFunction(data.parameters, transferableObjects);
|
|
61
|
+
responseMessage.result = result;
|
|
62
|
+
} catch (error) {
|
|
63
|
+
if (error instanceof Error) {
|
|
64
|
+
responseMessage.error = {
|
|
65
|
+
name: error.name,
|
|
66
|
+
message: error.message,
|
|
67
|
+
stack: error.stack
|
|
68
|
+
};
|
|
69
|
+
} else {
|
|
70
|
+
responseMessage.error = error;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (!data.canTransferArrayBuffer) {
|
|
74
|
+
transferableObjects.length = 0;
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
postMessage(responseMessage, transferableObjects);
|
|
78
|
+
} catch (error) {
|
|
79
|
+
responseMessage.result = void 0;
|
|
80
|
+
responseMessage.error = `postMessage failed with error: ${formatError_default(
|
|
81
|
+
error
|
|
82
|
+
)}
|
|
83
|
+
with responseMessage: ${JSON.stringify(responseMessage)}`;
|
|
84
|
+
postMessage(responseMessage);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function onMessageErrorHandler(event) {
|
|
88
|
+
postMessage({
|
|
89
|
+
id: event.data?.id,
|
|
90
|
+
error: `postMessage failed with error: ${JSON.stringify(event)}`
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
self.onmessage = onMessageHandler;
|
|
94
|
+
self.onmessageerror = onMessageErrorHandler;
|
|
95
|
+
return self;
|
|
96
|
+
}
|
|
97
|
+
var createTaskProcessorWorker_default = createTaskProcessorWorker;
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
createTaskProcessorWorker_default
|
|
101
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.8
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
Cartographic_default,
|
|
28
|
+
Ellipsoid_default
|
|
29
|
+
} from "./chunk-KMZXZUA7.js";
|
|
30
|
+
import {
|
|
31
|
+
Cartesian3_default
|
|
32
|
+
} from "./chunk-HEKLTOOR.js";
|
|
33
|
+
import {
|
|
34
|
+
Math_default
|
|
35
|
+
} from "./chunk-YR3LX3PR.js";
|
|
36
|
+
import {
|
|
37
|
+
DeveloperError_default
|
|
38
|
+
} from "./chunk-2ZXYLPPT.js";
|
|
39
|
+
import {
|
|
40
|
+
defined_default
|
|
41
|
+
} from "./chunk-PU44PXY2.js";
|
|
42
|
+
|
|
43
|
+
// packages/engine/Source/Core/WebMercatorProjection.js
|
|
44
|
+
function WebMercatorProjection(ellipsoid) {
|
|
45
|
+
this._ellipsoid = ellipsoid ?? Ellipsoid_default.WGS84;
|
|
46
|
+
this._semimajorAxis = this._ellipsoid.maximumRadius;
|
|
47
|
+
this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
|
|
48
|
+
}
|
|
49
|
+
Object.defineProperties(WebMercatorProjection.prototype, {
|
|
50
|
+
/**
|
|
51
|
+
* Gets the {@link Ellipsoid}.
|
|
52
|
+
*
|
|
53
|
+
* @memberof WebMercatorProjection.prototype
|
|
54
|
+
*
|
|
55
|
+
* @type {Ellipsoid}
|
|
56
|
+
* @readonly
|
|
57
|
+
*/
|
|
58
|
+
ellipsoid: {
|
|
59
|
+
get: function() {
|
|
60
|
+
return this._ellipsoid;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
WebMercatorProjection.mercatorAngleToGeodeticLatitude = function(mercatorAngle) {
|
|
65
|
+
return Math_default.PI_OVER_TWO - 2 * Math.atan(Math.exp(-mercatorAngle));
|
|
66
|
+
};
|
|
67
|
+
WebMercatorProjection.geodeticLatitudeToMercatorAngle = function(latitude) {
|
|
68
|
+
if (latitude > WebMercatorProjection.MaximumLatitude) {
|
|
69
|
+
latitude = WebMercatorProjection.MaximumLatitude;
|
|
70
|
+
} else if (latitude < -WebMercatorProjection.MaximumLatitude) {
|
|
71
|
+
latitude = -WebMercatorProjection.MaximumLatitude;
|
|
72
|
+
}
|
|
73
|
+
const sinLatitude = Math.sin(latitude);
|
|
74
|
+
return 0.5 * Math.log((1 + sinLatitude) / (1 - sinLatitude));
|
|
75
|
+
};
|
|
76
|
+
WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI);
|
|
77
|
+
WebMercatorProjection.prototype.project = function(cartographic, result) {
|
|
78
|
+
const semimajorAxis = this._semimajorAxis;
|
|
79
|
+
const x = cartographic.longitude * semimajorAxis;
|
|
80
|
+
const y = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
|
|
81
|
+
cartographic.latitude
|
|
82
|
+
) * semimajorAxis;
|
|
83
|
+
const z = cartographic.height;
|
|
84
|
+
if (!defined_default(result)) {
|
|
85
|
+
return new Cartesian3_default(x, y, z);
|
|
86
|
+
}
|
|
87
|
+
result.x = x;
|
|
88
|
+
result.y = y;
|
|
89
|
+
result.z = z;
|
|
90
|
+
return result;
|
|
91
|
+
};
|
|
92
|
+
WebMercatorProjection.prototype.unproject = function(cartesian, result) {
|
|
93
|
+
if (!defined_default(cartesian)) {
|
|
94
|
+
throw new DeveloperError_default("cartesian is required");
|
|
95
|
+
}
|
|
96
|
+
const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis;
|
|
97
|
+
const longitude = cartesian.x * oneOverEarthSemimajorAxis;
|
|
98
|
+
const latitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
|
|
99
|
+
cartesian.y * oneOverEarthSemimajorAxis
|
|
100
|
+
);
|
|
101
|
+
const height = cartesian.z;
|
|
102
|
+
if (!defined_default(result)) {
|
|
103
|
+
return new Cartographic_default(longitude, latitude, height);
|
|
104
|
+
}
|
|
105
|
+
result.longitude = longitude;
|
|
106
|
+
result.latitude = latitude;
|
|
107
|
+
result.height = height;
|
|
108
|
+
return result;
|
|
109
|
+
};
|
|
110
|
+
var WebMercatorProjection_default = WebMercatorProjection;
|
|
111
|
+
|
|
112
|
+
export {
|
|
113
|
+
WebMercatorProjection_default
|
|
114
|
+
};
|