deeptwins-cesium-engine 0.1.2 → 0.1.4

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.
Files changed (219) hide show
  1. package/Build/Workers/chunk-2HWLF3FT.js +837 -0
  2. package/Build/Workers/chunk-2KXMJ5XS.js +3792 -0
  3. package/Build/Workers/chunk-2NPCLB3H.js +56 -0
  4. package/Build/Workers/chunk-2ZHQTIBH.js +1483 -0
  5. package/Build/Workers/chunk-3GLYOW63.js +352 -0
  6. package/Build/Workers/chunk-3L22KMPU.js +219 -0
  7. package/Build/Workers/chunk-3Q6V2B2I.js +73 -0
  8. package/Build/Workers/chunk-3QOKKRIG.js +387 -0
  9. package/Build/Workers/chunk-44YZFGRH.js +1800 -0
  10. package/Build/Workers/chunk-45VV4SBO.js +2342 -0
  11. package/Build/Workers/chunk-4EJ4AA2S.js +368 -0
  12. package/Build/Workers/chunk-4IJFHUL6.js +414 -0
  13. package/Build/Workers/chunk-4K3V5CGW.js +454 -0
  14. package/Build/Workers/chunk-4M4QL6KJ.js +305 -0
  15. package/Build/Workers/chunk-4YNRIEQ6.js +288 -0
  16. package/Build/Workers/chunk-56CVDPH5.js +352 -0
  17. package/Build/Workers/chunk-5CTAAPXH.js +1483 -0
  18. package/Build/Workers/chunk-5ISZ6NJD.js +102 -0
  19. package/Build/Workers/chunk-5SDHYIOS.js +56 -0
  20. package/Build/Workers/chunk-66TGUMCU.js +2719 -0
  21. package/Build/Workers/chunk-6EJMTDQJ.js +163 -0
  22. package/Build/Workers/chunk-6VWXYSMH.js +959 -0
  23. package/Build/Workers/chunk-6VZ7VB2Q.js +241 -0
  24. package/Build/Workers/chunk-7AMRE57Q.js +301 -0
  25. package/Build/Workers/chunk-7DH6C33H.js +398 -0
  26. package/Build/Workers/chunk-7VUS3FVE.js +38 -0
  27. package/Build/Workers/chunk-7Y3ZA6H3.js +198 -0
  28. package/Build/Workers/chunk-A6BMHZNA.js +38 -0
  29. package/Build/Workers/chunk-A7XY2MN7.js +171 -0
  30. package/Build/Workers/chunk-AC7ND63S.js +57 -0
  31. package/Build/Workers/chunk-AHCZ757M.js +9230 -0
  32. package/Build/Workers/chunk-ANOA7E7F.js +56 -0
  33. package/Build/Workers/chunk-AYO5HHV6.js +789 -0
  34. package/Build/Workers/chunk-BE2N56VZ.js +1344 -0
  35. package/Build/Workers/chunk-BR3BPM64.js +9230 -0
  36. package/Build/Workers/chunk-BVMRWGOK.js +455 -0
  37. package/Build/Workers/chunk-BXEL2NX7.js +455 -0
  38. package/Build/Workers/chunk-C5BO2JCG.js +278 -0
  39. package/Build/Workers/chunk-CIRQNZVR.js +301 -0
  40. package/Build/Workers/chunk-CM67CQME.js +305 -0
  41. package/Build/Workers/chunk-D3QIW4DH.js +630 -0
  42. package/Build/Workers/chunk-E5W7QIGZ.js +511 -0
  43. package/Build/Workers/chunk-E6CYGUJI.js +1054 -0
  44. package/Build/Workers/chunk-EIZ23IOX.js +414 -0
  45. package/Build/Workers/chunk-EIZJUMQY.js +101 -0
  46. package/Build/Workers/chunk-EXTMZJXB.js +82 -0
  47. package/Build/Workers/chunk-EYOOSIBW.js +682 -0
  48. package/Build/Workers/chunk-F37WADVC.js +1054 -0
  49. package/Build/Workers/chunk-FIWPJFHX.js +101 -0
  50. package/Build/Workers/chunk-FM32TNGT.js +198 -0
  51. package/Build/Workers/chunk-FOMYIEIB.js +476 -0
  52. package/Build/Workers/chunk-FWYDLSVQ.js +97 -0
  53. package/Build/Workers/chunk-HGZR6CZF.js +1067 -0
  54. package/Build/Workers/chunk-HIXHDABG.js +288 -0
  55. package/Build/Workers/chunk-HMCCZZWE.js +97 -0
  56. package/Build/Workers/chunk-HW54WHGM.js +2719 -0
  57. package/Build/Workers/chunk-IHYAI7GF.js +973 -0
  58. package/Build/Workers/chunk-INLQ7LVK.js +837 -0
  59. package/Build/Workers/chunk-IQMESTCB.js +124 -0
  60. package/Build/Workers/chunk-J4PISUNT.js +2342 -0
  61. package/Build/Workers/chunk-JSWU557I.js +693 -0
  62. package/Build/Workers/chunk-KHONDSQ7.js +693 -0
  63. package/Build/Workers/chunk-KLUL2SOE.js +352 -0
  64. package/Build/Workers/chunk-KMBLKQCC.js +1992 -0
  65. package/Build/Workers/chunk-KOTWWQN7.js +171 -0
  66. package/Build/Workers/chunk-KWV6ZTF4.js +163 -0
  67. package/Build/Workers/chunk-LSEFPQHG.js +476 -0
  68. package/Build/Workers/chunk-M66X4O24.js +44 -0
  69. package/Build/Workers/chunk-M6IXKBC7.js +1992 -0
  70. package/Build/Workers/chunk-MFUC3D5C.js +162 -0
  71. package/Build/Workers/chunk-MRMNELAH.js +82 -0
  72. package/Build/Workers/chunk-N3NUA5H2.js +3792 -0
  73. package/Build/Workers/chunk-NFB2NXJN.js +138 -0
  74. package/Build/Workers/chunk-NQAXBK4K.js +789 -0
  75. package/Build/Workers/chunk-NUGQWV6S.js +352 -0
  76. package/Build/Workers/chunk-O7S7WL7K.js +278 -0
  77. package/Build/Workers/chunk-ODZYB26X.js +1287 -0
  78. package/Build/Workers/chunk-OEHJY463.js +3201 -0
  79. package/Build/Workers/chunk-OMMRNMXF.js +44 -0
  80. package/Build/Workers/chunk-OZ3CQDO3.js +138 -0
  81. package/Build/Workers/chunk-PNXBG64I.js +219 -0
  82. package/Build/Workers/chunk-PYR35GK4.js +973 -0
  83. package/Build/Workers/chunk-Q4CXGW74.js +57 -0
  84. package/Build/Workers/chunk-QGISLKCW.js +147 -0
  85. package/Build/Workers/chunk-QQHVOJW6.js +497 -0
  86. package/Build/Workers/chunk-QWCMMRJW.js +58 -0
  87. package/Build/Workers/chunk-RDEZCHF4.js +398 -0
  88. package/Build/Workers/chunk-SJTE7FVN.js +778 -0
  89. package/Build/Workers/chunk-SM5T67LR.js +162 -0
  90. package/Build/Workers/chunk-T27NNXEU.js +58 -0
  91. package/Build/Workers/chunk-T4J5BWUO.js +511 -0
  92. package/Build/Workers/chunk-T6JS4BRN.js +140 -0
  93. package/Build/Workers/chunk-UH6DUQBW.js +140 -0
  94. package/Build/Workers/chunk-UJAH6XKF.js +73 -0
  95. package/Build/Workers/chunk-UKSTJ2PH.js +454 -0
  96. package/Build/Workers/chunk-UQCDCCZ7.js +368 -0
  97. package/Build/Workers/chunk-UXIFNEA3.js +1287 -0
  98. package/Build/Workers/chunk-UXJ6J5L7.js +56 -0
  99. package/Build/Workers/chunk-V4VUAZXI.js +1800 -0
  100. package/Build/Workers/chunk-VQH2YXO2.js +497 -0
  101. package/Build/Workers/chunk-VXKCLSE4.js +241 -0
  102. package/Build/Workers/chunk-W3U6YBEI.js +280 -0
  103. package/Build/Workers/chunk-W75ZVFKP.js +778 -0
  104. package/Build/Workers/chunk-WCDFJYFB.js +1344 -0
  105. package/Build/Workers/chunk-WME5M6W3.js +630 -0
  106. package/Build/Workers/chunk-XDQBQB64.js +1067 -0
  107. package/Build/Workers/chunk-Y6HOIWE5.js +959 -0
  108. package/Build/Workers/chunk-YEMC2ZOR.js +147 -0
  109. package/Build/Workers/chunk-YWNF3TPE.js +682 -0
  110. package/Build/Workers/chunk-Z55VGWJP.js +280 -0
  111. package/Build/Workers/chunk-Z5YWP24C.js +124 -0
  112. package/Build/Workers/chunk-ZHXCWUJB.js +387 -0
  113. package/Build/Workers/chunk-ZIMPUF2I.js +102 -0
  114. package/Build/Workers/chunk-ZKDWYQKC.js +3201 -0
  115. package/Build/Workers/combineGeometry.js +24 -22
  116. package/Build/Workers/createBoxGeometry.js +18 -16
  117. package/Build/Workers/createBoxOutlineGeometry.js +23 -25
  118. package/Build/Workers/createCircleGeometry.js +29 -27
  119. package/Build/Workers/createCircleOutlineGeometry.js +22 -20
  120. package/Build/Workers/createCoplanarPolygonGeometry.js +43 -43
  121. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +37 -35
  122. package/Build/Workers/createCorridorGeometry.js +46 -49
  123. package/Build/Workers/createCorridorOutlineGeometry.js +40 -43
  124. package/Build/Workers/createCylinderGeometry.js +20 -18
  125. package/Build/Workers/createCylinderOutlineGeometry.js +27 -25
  126. package/Build/Workers/createEllipseGeometry.js +28 -25
  127. package/Build/Workers/createEllipseOutlineGeometry.js +21 -18
  128. package/Build/Workers/createEllipsoidGeometry.js +19 -17
  129. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -16
  130. package/Build/Workers/createFrustumGeometry.js +18 -16
  131. package/Build/Workers/createFrustumOutlineGeometry.js +21 -21
  132. package/Build/Workers/createGeometry.js +31 -26
  133. package/Build/Workers/createGroundPolylineGeometry.js +188 -135
  134. package/Build/Workers/createPlaneGeometry.js +22 -21
  135. package/Build/Workers/createPlaneOutlineGeometry.js +15 -13
  136. package/Build/Workers/createPolygonGeometry.js +51 -52
  137. package/Build/Workers/createPolygonOutlineGeometry.js +43 -44
  138. package/Build/Workers/createPolylineGeometry.js +37 -40
  139. package/Build/Workers/createPolylineVolumeGeometry.js +41 -44
  140. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +36 -39
  141. package/Build/Workers/createRectangleGeometry.js +47 -53
  142. package/Build/Workers/createRectangleOutlineGeometry.js +32 -33
  143. package/Build/Workers/createSimplePolylineGeometry.js +33 -34
  144. package/Build/Workers/createSphereGeometry.js +20 -20
  145. package/Build/Workers/createSphereOutlineGeometry.js +19 -19
  146. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  147. package/Build/Workers/createVectorTileClampedPolylines.js +16 -14
  148. package/Build/Workers/createVectorTileGeometries.js +24 -22
  149. package/Build/Workers/createVectorTilePoints.js +15 -13
  150. package/Build/Workers/createVectorTilePolygons.js +24 -21
  151. package/Build/Workers/createVectorTilePolylines.js +16 -14
  152. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  153. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +29 -27
  154. package/Build/Workers/createVerticesFromHeightmap.js +42 -63
  155. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +26 -280
  156. package/Build/Workers/createWallGeometry.js +35 -36
  157. package/Build/Workers/createWallOutlineGeometry.js +33 -34
  158. package/Build/Workers/decodeDraco.js +10 -11
  159. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  160. package/Build/Workers/decodeI3S.js +16 -20
  161. package/Build/Workers/gaussianSplatSorter.js +4 -4
  162. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  163. package/Build/Workers/incrementallyBuildTerrainPicker.js +20 -12
  164. package/Build/Workers/transcodeKTX2.js +42 -14
  165. package/Build/Workers/transferTypedArrayTest.js +1 -1
  166. package/Build/Workers/upsampleQuantizedTerrainMesh.js +24 -21
  167. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  168. package/Source/Shaders/BillboardCollectionFS.js +85 -81
  169. package/Source/Shaders/BillboardCollectionVS.js +60 -118
  170. package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
  171. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
  172. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
  173. package/Source/Shaders/Builtin/Constants/passCesium3DTileEdges.js +12 -0
  174. package/Source/Shaders/Builtin/Constants/passCesium3DTileEdgesDirect.js +11 -0
  175. package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +11 -0
  176. package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
  177. package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
  178. package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
  179. package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
  180. package/Source/Shaders/Builtin/CzmBuiltins.js +12 -0
  181. package/Source/Shaders/Builtin/Functions/columbusViewMorph.js +8 -1
  182. package/Source/Shaders/Builtin/Functions/computeTextureTransform.js +25 -0
  183. package/Source/Shaders/Builtin/Functions/decodeRGB8.js +24 -0
  184. package/Source/Shaders/Builtin/Functions/modelToWindowCoordinates.js +2 -1
  185. package/Source/Shaders/Builtin/Functions/unpackTexture.js +37 -0
  186. package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.js +0 -1
  187. package/Source/Shaders/EllipsoidVS.js +4 -4
  188. package/Source/Shaders/FXAA3_11.js +2 -0
  189. package/Source/Shaders/GlobeFS.js +22 -0
  190. package/Source/Shaders/GlobeVS.js +3 -2
  191. package/Source/Shaders/Model/MaterialStageFS.js +50 -20
  192. package/Source/Shaders/Model/MetadataStageFS.js +2 -1
  193. package/Source/Shaders/Model/MetadataStageVS.js +2 -1
  194. package/Source/Shaders/Model/ModelFS.js +32 -2
  195. package/Source/Shaders/Model/ModelVS.js +15 -1
  196. package/Source/Shaders/Model/PointCloudStylingStageVS.js +2 -1
  197. package/Source/Shaders/Model/PrimitiveOutlineStageFS.js +0 -1
  198. package/Source/Shaders/PointPrimitiveCollectionVS.js +8 -39
  199. package/Source/Shaders/PolygonSignedDistanceFS.js +64 -33
  200. package/Source/Shaders/PolylineCommon.js +1 -1
  201. package/Source/Shaders/ShadowVolumeAppearanceFS.js +7 -15
  202. package/Source/Shaders/SkyAtmosphereVS.js +2 -1
  203. package/Source/Shaders/Voxels/IntersectBox.js +20 -33
  204. package/Source/Shaders/Voxels/IntersectCylinder.js +28 -32
  205. package/Source/Shaders/Voxels/IntersectDepth.js +10 -6
  206. package/Source/Shaders/Voxels/IntersectEllipsoid.js +12 -20
  207. package/Source/Shaders/Voxels/IntersectLongitude.js +21 -9
  208. package/Source/Shaders/Voxels/Intersection.js +3 -5
  209. package/Source/Shaders/Voxels/IntersectionUtils.js +2 -1
  210. package/Source/Shaders/Voxels/Megatexture.js +15 -83
  211. package/Source/Shaders/Voxels/Octree.js +53 -61
  212. package/Source/Shaders/Voxels/VoxelFS.js +67 -52
  213. package/Source/Shaders/Voxels/VoxelUtils.js +0 -19
  214. package/index.js +346 -261
  215. package/package.json +1 -1
  216. package/Source/Shaders/Voxels/IntersectClippingPlanes.js +0 -80
  217. package/Source/Shaders/Voxels/convertUvToBox.js +0 -46
  218. package/Source/Shaders/Voxels/convertUvToCylinder.js +0 -101
  219. package/Source/Shaders/Voxels/convertUvToEllipsoid.js +0 -141
@@ -0,0 +1,352 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.1.3
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-KMBLKQCC.js";
30
+ import {
31
+ Cartesian3_default
32
+ } from "./chunk-45VV4SBO.js";
33
+ import {
34
+ Math_default
35
+ } from "./chunk-QQHVOJW6.js";
36
+ import {
37
+ Check_default
38
+ } from "./chunk-6EJMTDQJ.js";
39
+ import {
40
+ defined_default
41
+ } from "./chunk-EXTMZJXB.js";
42
+
43
+ // packages/engine/Source/Core/EllipsoidGeodesic.js
44
+ function setConstants(ellipsoidGeodesic) {
45
+ const uSquared = ellipsoidGeodesic._uSquared;
46
+ const a = ellipsoidGeodesic._ellipsoid.maximumRadius;
47
+ const b = ellipsoidGeodesic._ellipsoid.minimumRadius;
48
+ const f = (a - b) / a;
49
+ const cosineHeading = Math.cos(ellipsoidGeodesic._startHeading);
50
+ const sineHeading = Math.sin(ellipsoidGeodesic._startHeading);
51
+ const tanU = (1 - f) * Math.tan(ellipsoidGeodesic._start.latitude);
52
+ const cosineU = 1 / Math.sqrt(1 + tanU * tanU);
53
+ const sineU = cosineU * tanU;
54
+ const sigma = Math.atan2(tanU, cosineHeading);
55
+ const sineAlpha = cosineU * sineHeading;
56
+ const sineSquaredAlpha = sineAlpha * sineAlpha;
57
+ const cosineSquaredAlpha = 1 - sineSquaredAlpha;
58
+ const cosineAlpha = Math.sqrt(cosineSquaredAlpha);
59
+ const u2Over4 = uSquared / 4;
60
+ const u4Over16 = u2Over4 * u2Over4;
61
+ const u6Over64 = u4Over16 * u2Over4;
62
+ const u8Over256 = u4Over16 * u4Over16;
63
+ const a0 = 1 + u2Over4 - 3 * u4Over16 / 4 + 5 * u6Over64 / 4 - 175 * u8Over256 / 64;
64
+ const a1 = 1 - u2Over4 + 15 * u4Over16 / 8 - 35 * u6Over64 / 8;
65
+ const a2 = 1 - 3 * u2Over4 + 35 * u4Over16 / 4;
66
+ const a3 = 1 - 5 * u2Over4;
67
+ const distanceRatio = a0 * sigma - a1 * Math.sin(2 * sigma) * u2Over4 / 2 - a2 * Math.sin(4 * sigma) * u4Over16 / 16 - a3 * Math.sin(6 * sigma) * u6Over64 / 48 - Math.sin(8 * sigma) * 5 * u8Over256 / 512;
68
+ const constants = ellipsoidGeodesic._constants;
69
+ constants.a = a;
70
+ constants.b = b;
71
+ constants.f = f;
72
+ constants.cosineHeading = cosineHeading;
73
+ constants.sineHeading = sineHeading;
74
+ constants.tanU = tanU;
75
+ constants.cosineU = cosineU;
76
+ constants.sineU = sineU;
77
+ constants.sigma = sigma;
78
+ constants.sineAlpha = sineAlpha;
79
+ constants.sineSquaredAlpha = sineSquaredAlpha;
80
+ constants.cosineSquaredAlpha = cosineSquaredAlpha;
81
+ constants.cosineAlpha = cosineAlpha;
82
+ constants.u2Over4 = u2Over4;
83
+ constants.u4Over16 = u4Over16;
84
+ constants.u6Over64 = u6Over64;
85
+ constants.u8Over256 = u8Over256;
86
+ constants.a0 = a0;
87
+ constants.a1 = a1;
88
+ constants.a2 = a2;
89
+ constants.a3 = a3;
90
+ constants.distanceRatio = distanceRatio;
91
+ }
92
+ function computeC(f, cosineSquaredAlpha) {
93
+ return f * cosineSquaredAlpha * (4 + f * (4 - 3 * cosineSquaredAlpha)) / 16;
94
+ }
95
+ function computeDeltaLambda(f, sineAlpha, cosineSquaredAlpha, sigma, sineSigma, cosineSigma, cosineTwiceSigmaMidpoint) {
96
+ const C = computeC(f, cosineSquaredAlpha);
97
+ return (1 - C) * f * sineAlpha * (sigma + C * sineSigma * (cosineTwiceSigmaMidpoint + C * cosineSigma * (2 * cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint - 1)));
98
+ }
99
+ function vincentyInverseFormula(ellipsoidGeodesic, major, minor, firstLongitude, firstLatitude, secondLongitude, secondLatitude) {
100
+ const eff = (major - minor) / major;
101
+ const l = secondLongitude - firstLongitude;
102
+ const u1 = Math.atan((1 - eff) * Math.tan(firstLatitude));
103
+ const u2 = Math.atan((1 - eff) * Math.tan(secondLatitude));
104
+ const cosineU1 = Math.cos(u1);
105
+ const sineU1 = Math.sin(u1);
106
+ const cosineU2 = Math.cos(u2);
107
+ const sineU2 = Math.sin(u2);
108
+ const cc = cosineU1 * cosineU2;
109
+ const cs = cosineU1 * sineU2;
110
+ const ss = sineU1 * sineU2;
111
+ const sc = sineU1 * cosineU2;
112
+ let lambda = l;
113
+ let lambdaDot = Math_default.TWO_PI;
114
+ let cosineLambda = Math.cos(lambda);
115
+ let sineLambda = Math.sin(lambda);
116
+ let sigma;
117
+ let cosineSigma;
118
+ let sineSigma;
119
+ let cosineSquaredAlpha;
120
+ let cosineTwiceSigmaMidpoint;
121
+ do {
122
+ cosineLambda = Math.cos(lambda);
123
+ sineLambda = Math.sin(lambda);
124
+ const temp = cs - sc * cosineLambda;
125
+ sineSigma = Math.sqrt(
126
+ cosineU2 * cosineU2 * sineLambda * sineLambda + temp * temp
127
+ );
128
+ cosineSigma = ss + cc * cosineLambda;
129
+ sigma = Math.atan2(sineSigma, cosineSigma);
130
+ let sineAlpha;
131
+ if (sineSigma === 0) {
132
+ sineAlpha = 0;
133
+ cosineSquaredAlpha = 1;
134
+ } else {
135
+ sineAlpha = cc * sineLambda / sineSigma;
136
+ cosineSquaredAlpha = 1 - sineAlpha * sineAlpha;
137
+ }
138
+ lambdaDot = lambda;
139
+ cosineTwiceSigmaMidpoint = cosineSigma - 2 * ss / cosineSquaredAlpha;
140
+ if (!isFinite(cosineTwiceSigmaMidpoint)) {
141
+ cosineTwiceSigmaMidpoint = 0;
142
+ }
143
+ lambda = l + computeDeltaLambda(
144
+ eff,
145
+ sineAlpha,
146
+ cosineSquaredAlpha,
147
+ sigma,
148
+ sineSigma,
149
+ cosineSigma,
150
+ cosineTwiceSigmaMidpoint
151
+ );
152
+ } while (Math.abs(lambda - lambdaDot) > Math_default.EPSILON12);
153
+ const uSquared = cosineSquaredAlpha * (major * major - minor * minor) / (minor * minor);
154
+ const A = 1 + uSquared * (4096 + uSquared * (uSquared * (320 - 175 * uSquared) - 768)) / 16384;
155
+ const B = uSquared * (256 + uSquared * (uSquared * (74 - 47 * uSquared) - 128)) / 1024;
156
+ const cosineSquaredTwiceSigmaMidpoint = cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint;
157
+ const deltaSigma = B * sineSigma * (cosineTwiceSigmaMidpoint + B * (cosineSigma * (2 * cosineSquaredTwiceSigmaMidpoint - 1) - B * cosineTwiceSigmaMidpoint * (4 * sineSigma * sineSigma - 3) * (4 * cosineSquaredTwiceSigmaMidpoint - 3) / 6) / 4);
158
+ const distance = minor * A * (sigma - deltaSigma);
159
+ const startHeading = Math.atan2(
160
+ cosineU2 * sineLambda,
161
+ cs - sc * cosineLambda
162
+ );
163
+ const endHeading = Math.atan2(cosineU1 * sineLambda, cs * cosineLambda - sc);
164
+ ellipsoidGeodesic._distance = distance;
165
+ ellipsoidGeodesic._startHeading = startHeading;
166
+ ellipsoidGeodesic._endHeading = endHeading;
167
+ ellipsoidGeodesic._uSquared = uSquared;
168
+ }
169
+ var scratchCart1 = new Cartesian3_default();
170
+ var scratchCart2 = new Cartesian3_default();
171
+ function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
172
+ const firstCartesian = Cartesian3_default.normalize(
173
+ ellipsoid.cartographicToCartesian(start, scratchCart2),
174
+ scratchCart1
175
+ );
176
+ const lastCartesian = Cartesian3_default.normalize(
177
+ ellipsoid.cartographicToCartesian(end, scratchCart2),
178
+ scratchCart2
179
+ );
180
+ Check_default.typeOf.number.greaterThanOrEquals(
181
+ "value",
182
+ Math.abs(
183
+ Math.abs(Cartesian3_default.angleBetween(firstCartesian, lastCartesian)) - Math.PI
184
+ ),
185
+ 0.0125
186
+ );
187
+ vincentyInverseFormula(
188
+ ellipsoidGeodesic,
189
+ ellipsoid.maximumRadius,
190
+ ellipsoid.minimumRadius,
191
+ start.longitude,
192
+ start.latitude,
193
+ end.longitude,
194
+ end.latitude
195
+ );
196
+ ellipsoidGeodesic._start = Cartographic_default.clone(
197
+ start,
198
+ ellipsoidGeodesic._start
199
+ );
200
+ ellipsoidGeodesic._end = Cartographic_default.clone(end, ellipsoidGeodesic._end);
201
+ ellipsoidGeodesic._start.height = 0;
202
+ ellipsoidGeodesic._end.height = 0;
203
+ setConstants(ellipsoidGeodesic);
204
+ }
205
+ function EllipsoidGeodesic(start, end, ellipsoid) {
206
+ const e = ellipsoid ?? Ellipsoid_default.default;
207
+ this._ellipsoid = e;
208
+ this._start = new Cartographic_default();
209
+ this._end = new Cartographic_default();
210
+ this._constants = {};
211
+ this._startHeading = void 0;
212
+ this._endHeading = void 0;
213
+ this._distance = void 0;
214
+ this._uSquared = void 0;
215
+ if (defined_default(start) && defined_default(end)) {
216
+ computeProperties(this, start, end, e);
217
+ }
218
+ }
219
+ Object.defineProperties(EllipsoidGeodesic.prototype, {
220
+ /**
221
+ * Gets the ellipsoid.
222
+ * @memberof EllipsoidGeodesic.prototype
223
+ * @type {Ellipsoid}
224
+ * @readonly
225
+ */
226
+ ellipsoid: {
227
+ get: function() {
228
+ return this._ellipsoid;
229
+ }
230
+ },
231
+ /**
232
+ * Gets the surface distance between the start and end point
233
+ * @memberof EllipsoidGeodesic.prototype
234
+ * @type {number}
235
+ * @readonly
236
+ */
237
+ surfaceDistance: {
238
+ get: function() {
239
+ Check_default.defined("distance", this._distance);
240
+ return this._distance;
241
+ }
242
+ },
243
+ /**
244
+ * Gets the initial planetodetic point on the path.
245
+ * @memberof EllipsoidGeodesic.prototype
246
+ * @type {Cartographic}
247
+ * @readonly
248
+ */
249
+ start: {
250
+ get: function() {
251
+ return this._start;
252
+ }
253
+ },
254
+ /**
255
+ * Gets the final planetodetic point on the path.
256
+ * @memberof EllipsoidGeodesic.prototype
257
+ * @type {Cartographic}
258
+ * @readonly
259
+ */
260
+ end: {
261
+ get: function() {
262
+ return this._end;
263
+ }
264
+ },
265
+ /**
266
+ * Gets the heading at the initial point.
267
+ * @memberof EllipsoidGeodesic.prototype
268
+ * @type {number}
269
+ * @readonly
270
+ */
271
+ startHeading: {
272
+ get: function() {
273
+ Check_default.defined("distance", this._distance);
274
+ return this._startHeading;
275
+ }
276
+ },
277
+ /**
278
+ * Gets the heading at the final point.
279
+ * @memberof EllipsoidGeodesic.prototype
280
+ * @type {number}
281
+ * @readonly
282
+ */
283
+ endHeading: {
284
+ get: function() {
285
+ Check_default.defined("distance", this._distance);
286
+ return this._endHeading;
287
+ }
288
+ }
289
+ });
290
+ EllipsoidGeodesic.prototype.setEndPoints = function(start, end) {
291
+ Check_default.defined("start", start);
292
+ Check_default.defined("end", end);
293
+ computeProperties(this, start, end, this._ellipsoid);
294
+ };
295
+ EllipsoidGeodesic.prototype.interpolateUsingFraction = function(fraction, result) {
296
+ return this.interpolateUsingSurfaceDistance(
297
+ this._distance * fraction,
298
+ result
299
+ );
300
+ };
301
+ EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance = function(distance, result) {
302
+ Check_default.defined("distance", this._distance);
303
+ const constants = this._constants;
304
+ const s = constants.distanceRatio + distance / constants.b;
305
+ const cosine2S = Math.cos(2 * s);
306
+ const cosine4S = Math.cos(4 * s);
307
+ const cosine6S = Math.cos(6 * s);
308
+ const sine2S = Math.sin(2 * s);
309
+ const sine4S = Math.sin(4 * s);
310
+ const sine6S = Math.sin(6 * s);
311
+ const sine8S = Math.sin(8 * s);
312
+ const s2 = s * s;
313
+ const s3 = s * s2;
314
+ const u8Over256 = constants.u8Over256;
315
+ const u2Over4 = constants.u2Over4;
316
+ const u6Over64 = constants.u6Over64;
317
+ const u4Over16 = constants.u4Over16;
318
+ let sigma = 2 * s3 * u8Over256 * cosine2S / 3 + s * (1 - u2Over4 + 7 * u4Over16 / 4 - 15 * u6Over64 / 4 + 579 * u8Over256 / 64 - (u4Over16 - 15 * u6Over64 / 4 + 187 * u8Over256 / 16) * cosine2S - (5 * u6Over64 / 4 - 115 * u8Over256 / 16) * cosine4S - 29 * u8Over256 * cosine6S / 16) + (u2Over4 / 2 - u4Over16 + 71 * u6Over64 / 32 - 85 * u8Over256 / 16) * sine2S + (5 * u4Over16 / 16 - 5 * u6Over64 / 4 + 383 * u8Over256 / 96) * sine4S - s2 * ((u6Over64 - 11 * u8Over256 / 2) * sine2S + 5 * u8Over256 * sine4S / 2) + (29 * u6Over64 / 96 - 29 * u8Over256 / 16) * sine6S + 539 * u8Over256 * sine8S / 1536;
319
+ const theta = Math.asin(Math.sin(sigma) * constants.cosineAlpha);
320
+ const latitude = Math.atan(constants.a / constants.b * Math.tan(theta));
321
+ sigma = sigma - constants.sigma;
322
+ const cosineTwiceSigmaMidpoint = Math.cos(2 * constants.sigma + sigma);
323
+ const sineSigma = Math.sin(sigma);
324
+ const cosineSigma = Math.cos(sigma);
325
+ const cc = constants.cosineU * cosineSigma;
326
+ const ss = constants.sineU * sineSigma;
327
+ const lambda = Math.atan2(
328
+ sineSigma * constants.sineHeading,
329
+ cc - ss * constants.cosineHeading
330
+ );
331
+ const l = lambda - computeDeltaLambda(
332
+ constants.f,
333
+ constants.sineAlpha,
334
+ constants.cosineSquaredAlpha,
335
+ sigma,
336
+ sineSigma,
337
+ cosineSigma,
338
+ cosineTwiceSigmaMidpoint
339
+ );
340
+ if (defined_default(result)) {
341
+ result.longitude = this._start.longitude + l;
342
+ result.latitude = latitude;
343
+ result.height = 0;
344
+ return result;
345
+ }
346
+ return new Cartographic_default(this._start.longitude + l, latitude, 0);
347
+ };
348
+ var EllipsoidGeodesic_default = EllipsoidGeodesic;
349
+
350
+ export {
351
+ EllipsoidGeodesic_default
352
+ };
@@ -0,0 +1,219 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.1.3
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-UXIFNEA3.js";
29
+ import {
30
+ Intersect_default
31
+ } from "./chunk-5SDHYIOS.js";
32
+ import {
33
+ Rectangle_default
34
+ } from "./chunk-AHCZ757M.js";
35
+ import {
36
+ Cartesian2_default,
37
+ Cartographic_default,
38
+ Ellipsoid_default
39
+ } from "./chunk-KMBLKQCC.js";
40
+ import {
41
+ Check_default
42
+ } from "./chunk-6EJMTDQJ.js";
43
+ import {
44
+ defined_default
45
+ } from "./chunk-EXTMZJXB.js";
46
+
47
+ // packages/engine/Source/Core/BoundingRectangle.js
48
+ function BoundingRectangle(x, y, width, height) {
49
+ this.x = x ?? 0;
50
+ this.y = y ?? 0;
51
+ this.width = width ?? 0;
52
+ this.height = height ?? 0;
53
+ }
54
+ BoundingRectangle.packedLength = 4;
55
+ BoundingRectangle.pack = function(value, array, startingIndex) {
56
+ Check_default.typeOf.object("value", value);
57
+ Check_default.defined("array", array);
58
+ startingIndex = startingIndex ?? 0;
59
+ array[startingIndex++] = value.x;
60
+ array[startingIndex++] = value.y;
61
+ array[startingIndex++] = value.width;
62
+ array[startingIndex] = value.height;
63
+ return array;
64
+ };
65
+ BoundingRectangle.unpack = function(array, startingIndex, result) {
66
+ Check_default.defined("array", array);
67
+ startingIndex = startingIndex ?? 0;
68
+ if (!defined_default(result)) {
69
+ result = new BoundingRectangle();
70
+ }
71
+ result.x = array[startingIndex++];
72
+ result.y = array[startingIndex++];
73
+ result.width = array[startingIndex++];
74
+ result.height = array[startingIndex];
75
+ return result;
76
+ };
77
+ BoundingRectangle.fromPoints = function(positions, result) {
78
+ if (!defined_default(result)) {
79
+ result = new BoundingRectangle();
80
+ }
81
+ if (!defined_default(positions) || positions.length === 0) {
82
+ result.x = 0;
83
+ result.y = 0;
84
+ result.width = 0;
85
+ result.height = 0;
86
+ return result;
87
+ }
88
+ const length = positions.length;
89
+ let minimumX = positions[0].x;
90
+ let minimumY = positions[0].y;
91
+ let maximumX = positions[0].x;
92
+ let maximumY = positions[0].y;
93
+ for (let i = 1; i < length; i++) {
94
+ const p = positions[i];
95
+ const x = p.x;
96
+ const y = p.y;
97
+ minimumX = Math.min(x, minimumX);
98
+ maximumX = Math.max(x, maximumX);
99
+ minimumY = Math.min(y, minimumY);
100
+ maximumY = Math.max(y, maximumY);
101
+ }
102
+ result.x = minimumX;
103
+ result.y = minimumY;
104
+ result.width = maximumX - minimumX;
105
+ result.height = maximumY - minimumY;
106
+ return result;
107
+ };
108
+ var defaultProjection = new GeographicProjection_default();
109
+ var fromRectangleLowerLeft = new Cartographic_default();
110
+ var fromRectangleUpperRight = new Cartographic_default();
111
+ BoundingRectangle.fromRectangle = function(rectangle, projection, result) {
112
+ if (!defined_default(result)) {
113
+ result = new BoundingRectangle();
114
+ }
115
+ if (!defined_default(rectangle)) {
116
+ result.x = 0;
117
+ result.y = 0;
118
+ result.width = 0;
119
+ result.height = 0;
120
+ return result;
121
+ }
122
+ defaultProjection._ellipsoid = Ellipsoid_default.default;
123
+ projection = projection ?? defaultProjection;
124
+ const lowerLeft = projection.project(
125
+ Rectangle_default.southwest(rectangle, fromRectangleLowerLeft)
126
+ );
127
+ const upperRight = projection.project(
128
+ Rectangle_default.northeast(rectangle, fromRectangleUpperRight)
129
+ );
130
+ Cartesian2_default.subtract(upperRight, lowerLeft, upperRight);
131
+ result.x = lowerLeft.x;
132
+ result.y = lowerLeft.y;
133
+ result.width = upperRight.x;
134
+ result.height = upperRight.y;
135
+ return result;
136
+ };
137
+ BoundingRectangle.clone = function(rectangle, result) {
138
+ if (!defined_default(rectangle)) {
139
+ return void 0;
140
+ }
141
+ if (!defined_default(result)) {
142
+ return new BoundingRectangle(
143
+ rectangle.x,
144
+ rectangle.y,
145
+ rectangle.width,
146
+ rectangle.height
147
+ );
148
+ }
149
+ result.x = rectangle.x;
150
+ result.y = rectangle.y;
151
+ result.width = rectangle.width;
152
+ result.height = rectangle.height;
153
+ return result;
154
+ };
155
+ BoundingRectangle.union = function(left, right, result) {
156
+ Check_default.typeOf.object("left", left);
157
+ Check_default.typeOf.object("right", right);
158
+ if (!defined_default(result)) {
159
+ result = new BoundingRectangle();
160
+ }
161
+ const lowerLeftX = Math.min(left.x, right.x);
162
+ const lowerLeftY = Math.min(left.y, right.y);
163
+ const upperRightX = Math.max(left.x + left.width, right.x + right.width);
164
+ const upperRightY = Math.max(left.y + left.height, right.y + right.height);
165
+ result.x = lowerLeftX;
166
+ result.y = lowerLeftY;
167
+ result.width = upperRightX - lowerLeftX;
168
+ result.height = upperRightY - lowerLeftY;
169
+ return result;
170
+ };
171
+ BoundingRectangle.expand = function(rectangle, point, result) {
172
+ Check_default.typeOf.object("rectangle", rectangle);
173
+ Check_default.typeOf.object("point", point);
174
+ result = BoundingRectangle.clone(rectangle, result);
175
+ const width = point.x - result.x;
176
+ const height = point.y - result.y;
177
+ if (width > result.width) {
178
+ result.width = width;
179
+ } else if (width < 0) {
180
+ result.width -= width;
181
+ result.x = point.x;
182
+ }
183
+ if (height > result.height) {
184
+ result.height = height;
185
+ } else if (height < 0) {
186
+ result.height -= height;
187
+ result.y = point.y;
188
+ }
189
+ return result;
190
+ };
191
+ BoundingRectangle.intersect = function(left, right) {
192
+ Check_default.typeOf.object("left", left);
193
+ Check_default.typeOf.object("right", right);
194
+ const leftX = left.x;
195
+ const leftY = left.y;
196
+ const rightX = right.x;
197
+ const rightY = right.y;
198
+ if (!(leftX > rightX + right.width || leftX + left.width < rightX || leftY + left.height < rightY || leftY > rightY + right.height)) {
199
+ return Intersect_default.INTERSECTING;
200
+ }
201
+ return Intersect_default.OUTSIDE;
202
+ };
203
+ BoundingRectangle.equals = function(left, right) {
204
+ return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.width === right.width && left.height === right.height;
205
+ };
206
+ BoundingRectangle.prototype.clone = function(result) {
207
+ return BoundingRectangle.clone(this, result);
208
+ };
209
+ BoundingRectangle.prototype.intersect = function(right) {
210
+ return BoundingRectangle.intersect(this, right);
211
+ };
212
+ BoundingRectangle.prototype.equals = function(right) {
213
+ return BoundingRectangle.equals(this, right);
214
+ };
215
+ var BoundingRectangle_default = BoundingRectangle;
216
+
217
+ export {
218
+ BoundingRectangle_default
219
+ };
@@ -0,0 +1,73 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.1.3
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
+ Math_default
28
+ } from "./chunk-QQHVOJW6.js";
29
+
30
+ // packages/engine/Source/Core/CylinderGeometryLibrary.js
31
+ var CylinderGeometryLibrary = {};
32
+ CylinderGeometryLibrary.computePositions = function(length, topRadius, bottomRadius, slices, fill) {
33
+ const topZ = length * 0.5;
34
+ const bottomZ = -topZ;
35
+ const twoSlice = slices + slices;
36
+ const size = fill ? 2 * twoSlice : twoSlice;
37
+ const positions = new Float64Array(size * 3);
38
+ let i;
39
+ let index = 0;
40
+ let tbIndex = 0;
41
+ const bottomOffset = fill ? twoSlice * 3 : 0;
42
+ const topOffset = fill ? (twoSlice + slices) * 3 : slices * 3;
43
+ for (i = 0; i < slices; i++) {
44
+ const angle = i / slices * Math_default.TWO_PI;
45
+ const x = Math.cos(angle);
46
+ const y = Math.sin(angle);
47
+ const bottomX = x * bottomRadius;
48
+ const bottomY = y * bottomRadius;
49
+ const topX = x * topRadius;
50
+ const topY = y * topRadius;
51
+ positions[tbIndex + bottomOffset] = bottomX;
52
+ positions[tbIndex + bottomOffset + 1] = bottomY;
53
+ positions[tbIndex + bottomOffset + 2] = bottomZ;
54
+ positions[tbIndex + topOffset] = topX;
55
+ positions[tbIndex + topOffset + 1] = topY;
56
+ positions[tbIndex + topOffset + 2] = topZ;
57
+ tbIndex += 3;
58
+ if (fill) {
59
+ positions[index++] = bottomX;
60
+ positions[index++] = bottomY;
61
+ positions[index++] = bottomZ;
62
+ positions[index++] = topX;
63
+ positions[index++] = topY;
64
+ positions[index++] = topZ;
65
+ }
66
+ }
67
+ return positions;
68
+ };
69
+ var CylinderGeometryLibrary_default = CylinderGeometryLibrary;
70
+
71
+ export {
72
+ CylinderGeometryLibrary_default
73
+ };