org.outernet.cesium-unity 1.15.3-linux.1

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 (315) hide show
  1. package/CHANGES.md +420 -0
  2. package/CHANGES.md.meta +7 -0
  3. package/Editor/BuildCesiumForUnity.cs +186 -0
  4. package/Editor/BuildCesiumForUnity.cs.meta +11 -0
  5. package/Editor/Cesium3DTilesetEditor.cs +542 -0
  6. package/Editor/Cesium3DTilesetEditor.cs.meta +11 -0
  7. package/Editor/CesiumBingMapsRasterOverlayEditor.cs +66 -0
  8. package/Editor/CesiumBingMapsRasterOverlayEditor.cs.meta +11 -0
  9. package/Editor/CesiumCameraControllerEditor.cs +174 -0
  10. package/Editor/CesiumCameraControllerEditor.cs.meta +11 -0
  11. package/Editor/CesiumCameraManagerEditor.cs +65 -0
  12. package/Editor/CesiumCameraManagerEditor.cs.meta +11 -0
  13. package/Editor/CesiumCartographicPolygonEditor.cs +23 -0
  14. package/Editor/CesiumCartographicPolygonEditor.cs.meta +11 -0
  15. package/Editor/CesiumDebugColorizeTilesRasterOverlayEditor.cs +41 -0
  16. package/Editor/CesiumDebugColorizeTilesRasterOverlayEditor.cs.meta +11 -0
  17. package/Editor/CesiumEditor.asmdef +26 -0
  18. package/Editor/CesiumEditor.asmdef.meta +7 -0
  19. package/Editor/CesiumEditorStyle.cs +188 -0
  20. package/Editor/CesiumEditorStyle.cs.meta +11 -0
  21. package/Editor/CesiumEditorUtility.cs +394 -0
  22. package/Editor/CesiumEditorUtility.cs.meta +11 -0
  23. package/Editor/CesiumEditorWindow.cs +447 -0
  24. package/Editor/CesiumEditorWindow.cs.meta +11 -0
  25. package/Editor/CesiumFlyToControllerEditor.cs +76 -0
  26. package/Editor/CesiumFlyToControllerEditor.cs.meta +11 -0
  27. package/Editor/CesiumGeoreferenceEditor.cs +277 -0
  28. package/Editor/CesiumGeoreferenceEditor.cs.meta +11 -0
  29. package/Editor/CesiumGlobeAnchorEditor.cs +202 -0
  30. package/Editor/CesiumGlobeAnchorEditor.cs.meta +11 -0
  31. package/Editor/CesiumInspectorGUI.cs +187 -0
  32. package/Editor/CesiumInspectorGUI.cs.meta +11 -0
  33. package/Editor/CesiumIonAsset.cs +192 -0
  34. package/Editor/CesiumIonAsset.cs.meta +11 -0
  35. package/Editor/CesiumIonAssetsWindow.cs +257 -0
  36. package/Editor/CesiumIonAssetsWindow.cs.meta +11 -0
  37. package/Editor/CesiumIonRasterOverlayEditor.cs +87 -0
  38. package/Editor/CesiumIonRasterOverlayEditor.cs.meta +11 -0
  39. package/Editor/CesiumIonServerManager.cs +153 -0
  40. package/Editor/CesiumIonServerManager.cs.meta +11 -0
  41. package/Editor/CesiumIonServerSelector.cs +127 -0
  42. package/Editor/CesiumIonServerSelector.cs.meta +11 -0
  43. package/Editor/CesiumIonSession.cs +102 -0
  44. package/Editor/CesiumIonSession.cs.meta +11 -0
  45. package/Editor/CesiumPolygonRasterOverlayEditor.cs +102 -0
  46. package/Editor/CesiumPolygonRasterOverlayEditor.cs.meta +11 -0
  47. package/Editor/CesiumRasterOverlayEditor.cs +230 -0
  48. package/Editor/CesiumRasterOverlayEditor.cs.meta +11 -0
  49. package/Editor/CesiumSubSceneEditor.cs +201 -0
  50. package/Editor/CesiumSubSceneEditor.cs.meta +11 -0
  51. package/Editor/CesiumTileMapServiceRasterOverlayEditor.cs +88 -0
  52. package/Editor/CesiumTileMapServiceRasterOverlayEditor.cs.meta +11 -0
  53. package/Editor/CesiumWebMapServiceRasterOverlayEditor.cs +111 -0
  54. package/Editor/CesiumWebMapServiceRasterOverlayEditor.cs.meta +11 -0
  55. package/Editor/CesiumWebMapTileServiceRasterOverlayEditor.cs +277 -0
  56. package/Editor/CesiumWebMapTileServiceRasterOverlayEditor.cs.meta +3 -0
  57. package/Editor/CompileCesiumForUnityNative.cs +581 -0
  58. package/Editor/CompileCesiumForUnityNative.cs.meta +11 -0
  59. package/Editor/ConfigureReinterop.cs +255 -0
  60. package/Editor/ConfigureReinterop.cs.meta +11 -0
  61. package/Editor/Helpers.cs +102 -0
  62. package/Editor/Helpers.cs.meta +11 -0
  63. package/Editor/IonAssetsMultiColumnHeader.cs +45 -0
  64. package/Editor/IonAssetsMultiColumnHeader.cs.meta +11 -0
  65. package/Editor/IonAssetsTreeView.cs +214 -0
  66. package/Editor/IonAssetsTreeView.cs.meta +11 -0
  67. package/Editor/IonMissingAssetWindow.cs +65 -0
  68. package/Editor/IonMissingAssetWindow.cs.meta +11 -0
  69. package/Editor/IonTokenTroubleshootingWindow.cs +615 -0
  70. package/Editor/IonTokenTroubleshootingWindow.cs.meta +11 -0
  71. package/Editor/NativeDownloadHandler.cs +35 -0
  72. package/Editor/NativeDownloadHandler.cs.meta +11 -0
  73. package/Editor/QuickAddItem.cs +43 -0
  74. package/Editor/QuickAddItem.cs.meta +11 -0
  75. package/Editor/Resources/Cesium-128x128.png +0 -0
  76. package/Editor/Resources/Cesium-128x128.png.meta +98 -0
  77. package/Editor/Resources/Cesium-24x24.png +0 -0
  78. package/Editor/Resources/Cesium-24x24.png.meta +123 -0
  79. package/Editor/Resources/Cesium-64x64.png +0 -0
  80. package/Editor/Resources/Cesium-64x64.png.meta +98 -0
  81. package/Editor/Resources/Cesium-for-Unity-dark.png +0 -0
  82. package/Editor/Resources/Cesium-for-Unity-dark.png.meta +123 -0
  83. package/Editor/Resources/Cesium-for-Unity-light.png +0 -0
  84. package/Editor/Resources/Cesium-for-Unity-light.png.meta +123 -0
  85. package/Editor/Resources/Cesium-icon-16x16.png +0 -0
  86. package/Editor/Resources/Cesium-icon-16x16.png.meta +98 -0
  87. package/Editor/Resources/FontAwesome/attribution.txt +9 -0
  88. package/Editor/Resources/FontAwesome/attribution.txt.meta +7 -0
  89. package/Editor/Resources/FontAwesome/book-reader-solid.png +0 -0
  90. package/Editor/Resources/FontAwesome/book-reader-solid.png.meta +98 -0
  91. package/Editor/Resources/FontAwesome/book-reader-solid.svg +1 -0
  92. package/Editor/Resources/FontAwesome/book-reader-solid.svg.meta +7 -0
  93. package/Editor/Resources/FontAwesome/check-solid.png +0 -0
  94. package/Editor/Resources/FontAwesome/check-solid.png.meta +98 -0
  95. package/Editor/Resources/FontAwesome/check-solid.svg +1 -0
  96. package/Editor/Resources/FontAwesome/check-solid.svg.meta +7 -0
  97. package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.png +0 -0
  98. package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.png.meta +98 -0
  99. package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.svg +1 -0
  100. package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.svg.meta +7 -0
  101. package/Editor/Resources/FontAwesome/folder.png +0 -0
  102. package/Editor/Resources/FontAwesome/folder.png.meta +147 -0
  103. package/Editor/Resources/FontAwesome/folder.svg +5 -0
  104. package/Editor/Resources/FontAwesome/folder.svg.meta +7 -0
  105. package/Editor/Resources/FontAwesome/hands-helping-solid.png +0 -0
  106. package/Editor/Resources/FontAwesome/hands-helping-solid.png.meta +98 -0
  107. package/Editor/Resources/FontAwesome/hands-helping-solid.svg +1 -0
  108. package/Editor/Resources/FontAwesome/hands-helping-solid.svg.meta +7 -0
  109. package/Editor/Resources/FontAwesome/key-solid.png +0 -0
  110. package/Editor/Resources/FontAwesome/key-solid.png.meta +98 -0
  111. package/Editor/Resources/FontAwesome/key-solid.svg +1 -0
  112. package/Editor/Resources/FontAwesome/key-solid.svg.meta +7 -0
  113. package/Editor/Resources/FontAwesome/plus-solid.png +0 -0
  114. package/Editor/Resources/FontAwesome/plus-solid.png.meta +98 -0
  115. package/Editor/Resources/FontAwesome/plus-solid.svg +1 -0
  116. package/Editor/Resources/FontAwesome/plus-solid.svg.meta +7 -0
  117. package/Editor/Resources/FontAwesome/sign-out-alt-solid.png +0 -0
  118. package/Editor/Resources/FontAwesome/sign-out-alt-solid.png.meta +98 -0
  119. package/Editor/Resources/FontAwesome/sign-out-alt-solid.svg +1 -0
  120. package/Editor/Resources/FontAwesome/sign-out-alt-solid.svg.meta +7 -0
  121. package/Editor/Resources/FontAwesome/sync-alt-solid.png +0 -0
  122. package/Editor/Resources/FontAwesome/sync-alt-solid.png.meta +98 -0
  123. package/Editor/Resources/FontAwesome/sync-alt-solid.svg +1 -0
  124. package/Editor/Resources/FontAwesome/sync-alt-solid.svg.meta +7 -0
  125. package/Editor/Resources/FontAwesome/times-solid.png +0 -0
  126. package/Editor/Resources/FontAwesome/times-solid.png.meta +98 -0
  127. package/Editor/Resources/FontAwesome/times-solid.svg +1 -0
  128. package/Editor/Resources/FontAwesome/times-solid.svg.meta +7 -0
  129. package/Editor/Resources/FontAwesome.meta +8 -0
  130. package/Editor/Resources.meta +8 -0
  131. package/Editor/SelectIonTokenWindow.cs +249 -0
  132. package/Editor/SelectIonTokenWindow.cs.meta +11 -0
  133. package/Editor/arm64.meta +8 -0
  134. package/Editor/csc.rsp +1 -0
  135. package/Editor/csc.rsp.meta +7 -0
  136. package/Editor/libCesiumForUnityNative-Editor.so +0 -0
  137. package/Editor/libCesiumForUnityNative-Editor.so.meta +2 -0
  138. package/Editor/libCesiumForUnityNative-Runtime.so +0 -0
  139. package/Editor/libCesiumForUnityNative-Runtime.so.meta +2 -0
  140. package/Editor/x86_64.meta +8 -0
  141. package/Editor.meta +8 -0
  142. package/LICENSE +201 -0
  143. package/LICENSE.meta +7 -0
  144. package/Plugins/Standalone/libCesiumForUnityNative-Runtime.so +0 -0
  145. package/Plugins/Standalone/libCesiumForUnityNative-Runtime.so.meta +2 -0
  146. package/Plugins/Standalone.meta +8 -0
  147. package/Plugins.meta +8 -0
  148. package/README.md +39 -0
  149. package/README.md.meta +7 -0
  150. package/Reinterop.deps.json +172 -0
  151. package/Reinterop.deps.json.meta +7 -0
  152. package/Reinterop.dll +0 -0
  153. package/Reinterop.dll.meta +79 -0
  154. package/Runtime/Cesium3DTile.cs +37 -0
  155. package/Runtime/Cesium3DTile.cs.meta +11 -0
  156. package/Runtime/Cesium3DTileset.cs +788 -0
  157. package/Runtime/Cesium3DTileset.cs.meta +11 -0
  158. package/Runtime/Cesium3DTilesetLoadFailureDetails.cs +65 -0
  159. package/Runtime/Cesium3DTilesetLoadFailureDetails.cs.meta +11 -0
  160. package/Runtime/CesiumBackwardCompatibility.cs +163 -0
  161. package/Runtime/CesiumBackwardCompatibility.cs.meta +11 -0
  162. package/Runtime/CesiumBingMapsRasterOverlay.cs +72 -0
  163. package/Runtime/CesiumBingMapsRasterOverlay.cs.meta +11 -0
  164. package/Runtime/CesiumCameraController.cs +827 -0
  165. package/Runtime/CesiumCameraController.cs.meta +11 -0
  166. package/Runtime/CesiumCameraManager.cs +105 -0
  167. package/Runtime/CesiumCameraManager.cs.meta +11 -0
  168. package/Runtime/CesiumCartographicPolygon.cs +152 -0
  169. package/Runtime/CesiumCartographicPolygon.cs.meta +11 -0
  170. package/Runtime/CesiumCreditSystem.cs +343 -0
  171. package/Runtime/CesiumCreditSystem.cs.meta +11 -0
  172. package/Runtime/CesiumCreditSystemUI.cs +402 -0
  173. package/Runtime/CesiumCreditSystemUI.cs.meta +11 -0
  174. package/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs +21 -0
  175. package/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs.meta +11 -0
  176. package/Runtime/CesiumEllipsoid.cs +107 -0
  177. package/Runtime/CesiumEllipsoid.cs.meta +11 -0
  178. package/Runtime/CesiumFeature.cs +279 -0
  179. package/Runtime/CesiumFeature.cs.meta +11 -0
  180. package/Runtime/CesiumFeatureIdAttribute.cs +61 -0
  181. package/Runtime/CesiumFeatureIdAttribute.cs.meta +11 -0
  182. package/Runtime/CesiumFeatureIdSet.cs +165 -0
  183. package/Runtime/CesiumFeatureIdSet.cs.meta +11 -0
  184. package/Runtime/CesiumFeatureIdTexture.cs +68 -0
  185. package/Runtime/CesiumFeatureIdTexture.cs.meta +11 -0
  186. package/Runtime/CesiumFlyToController.cs +539 -0
  187. package/Runtime/CesiumFlyToController.cs.meta +11 -0
  188. package/Runtime/CesiumGeoreference.cs +628 -0
  189. package/Runtime/CesiumGeoreference.cs.meta +11 -0
  190. package/Runtime/CesiumGlobeAnchor.cs +664 -0
  191. package/Runtime/CesiumGlobeAnchor.cs.meta +11 -0
  192. package/Runtime/CesiumGlobeAnchorBackwardCompatibility0dot2dot0.cs +105 -0
  193. package/Runtime/CesiumGlobeAnchorBackwardCompatibility0dot2dot0.cs.meta +11 -0
  194. package/Runtime/CesiumIntMatN.cs +398 -0
  195. package/Runtime/CesiumIntMatN.cs.meta +11 -0
  196. package/Runtime/CesiumIntVecN.cs +525 -0
  197. package/Runtime/CesiumIntVecN.cs.meta +11 -0
  198. package/Runtime/CesiumIonRasterOverlay.cs +110 -0
  199. package/Runtime/CesiumIonRasterOverlay.cs.meta +11 -0
  200. package/Runtime/CesiumIonServer.cs +137 -0
  201. package/Runtime/CesiumIonServer.cs.meta +11 -0
  202. package/Runtime/CesiumMetadata.cs +33 -0
  203. package/Runtime/CesiumMetadata.cs.meta +11 -0
  204. package/Runtime/CesiumMetadataValue.cs +1764 -0
  205. package/Runtime/CesiumMetadataValue.cs.meta +11 -0
  206. package/Runtime/CesiumMetadataValueType.cs +203 -0
  207. package/Runtime/CesiumMetadataValueType.cs.meta +11 -0
  208. package/Runtime/CesiumModelMetadata.cs +26 -0
  209. package/Runtime/CesiumModelMetadata.cs.meta +11 -0
  210. package/Runtime/CesiumObjectPool.cs +74 -0
  211. package/Runtime/CesiumObjectPool.cs.meta +11 -0
  212. package/Runtime/CesiumObjectPools.cs +39 -0
  213. package/Runtime/CesiumObjectPools.cs.meta +11 -0
  214. package/Runtime/CesiumOriginShift.cs +146 -0
  215. package/Runtime/CesiumOriginShift.cs.meta +11 -0
  216. package/Runtime/CesiumPointCloudRenderer.cs +246 -0
  217. package/Runtime/CesiumPointCloudRenderer.cs.meta +11 -0
  218. package/Runtime/CesiumPointCloudShading.cs +76 -0
  219. package/Runtime/CesiumPointCloudShading.cs.meta +11 -0
  220. package/Runtime/CesiumPolygonRasterOverlay.cs +109 -0
  221. package/Runtime/CesiumPolygonRasterOverlay.cs.meta +11 -0
  222. package/Runtime/CesiumPrimitiveFeatures.cs +130 -0
  223. package/Runtime/CesiumPrimitiveFeatures.cs.meta +11 -0
  224. package/Runtime/CesiumPropertyArray.cs +64 -0
  225. package/Runtime/CesiumPropertyArray.cs.meta +11 -0
  226. package/Runtime/CesiumPropertyTable.cs +126 -0
  227. package/Runtime/CesiumPropertyTable.cs.meta +11 -0
  228. package/Runtime/CesiumPropertyTableProperty.cs +1734 -0
  229. package/Runtime/CesiumPropertyTableProperty.cs.meta +11 -0
  230. package/Runtime/CesiumRasterOverlay.cs +239 -0
  231. package/Runtime/CesiumRasterOverlay.cs.meta +11 -0
  232. package/Runtime/CesiumRasterOverlayLoadFailureDetails.cs +65 -0
  233. package/Runtime/CesiumRasterOverlayLoadFailureDetails.cs.meta +11 -0
  234. package/Runtime/CesiumRuntime.asmdef +32 -0
  235. package/Runtime/CesiumRuntime.asmdef.meta +7 -0
  236. package/Runtime/CesiumRuntime.cs +3 -0
  237. package/Runtime/CesiumRuntime.cs.meta +11 -0
  238. package/Runtime/CesiumRuntimeSettings.cs +188 -0
  239. package/Runtime/CesiumRuntimeSettings.cs.meta +11 -0
  240. package/Runtime/CesiumSampleHeightResult.cs +47 -0
  241. package/Runtime/CesiumSampleHeightResult.cs.meta +11 -0
  242. package/Runtime/CesiumSimplePlanarEllipsoidCurve.cs +93 -0
  243. package/Runtime/CesiumSimplePlanarEllipsoidCurve.cs.meta +11 -0
  244. package/Runtime/CesiumSubScene.cs +473 -0
  245. package/Runtime/CesiumSubScene.cs.meta +11 -0
  246. package/Runtime/CesiumTileExcluder.cs +47 -0
  247. package/Runtime/CesiumTileExcluder.cs.meta +11 -0
  248. package/Runtime/CesiumTileMapServiceRasterOverlay.cs +93 -0
  249. package/Runtime/CesiumTileMapServiceRasterOverlay.cs.meta +11 -0
  250. package/Runtime/CesiumWebMapServiceRasterOverlay.cs +129 -0
  251. package/Runtime/CesiumWebMapServiceRasterOverlay.cs.meta +11 -0
  252. package/Runtime/CesiumWebMapTileServiceRasterOverlay.cs +414 -0
  253. package/Runtime/CesiumWebMapTileServiceRasterOverlay.cs.meta +3 -0
  254. package/Runtime/CesiumWgs84Ellipsoid.cs +75 -0
  255. package/Runtime/CesiumWgs84Ellipsoid.cs.meta +11 -0
  256. package/Runtime/ConfigureReinterop.cs +926 -0
  257. package/Runtime/ConfigureReinterop.cs.meta +11 -0
  258. package/Runtime/Helpers.cs +122 -0
  259. package/Runtime/Helpers.cs.meta +11 -0
  260. package/Runtime/ICesiumRestartable.cs +17 -0
  261. package/Runtime/ICesiumRestartable.cs.meta +11 -0
  262. package/Runtime/NativeCoroutine.cs +28 -0
  263. package/Runtime/NativeCoroutine.cs.meta +11 -0
  264. package/Runtime/NativeDownloadHandler.cs +29 -0
  265. package/Runtime/NativeDownloadHandler.cs.meta +11 -0
  266. package/Runtime/Resources/CesiumCreditSystem.prefab +78 -0
  267. package/Runtime/Resources/CesiumCreditSystem.prefab.meta +7 -0
  268. package/Runtime/Resources/CesiumCreditSystemRuntimeTheme.tss +2 -0
  269. package/Runtime/Resources/CesiumCreditSystemRuntimeTheme.tss.meta +11 -0
  270. package/Runtime/Resources/CesiumCreditSystemUI.uxml +4 -0
  271. package/Runtime/Resources/CesiumCreditSystemUI.uxml.meta +10 -0
  272. package/Runtime/Resources/CesiumCreditSystemUIPanelSettings.asset +38 -0
  273. package/Runtime/Resources/CesiumCreditSystemUIPanelSettings.asset.meta +8 -0
  274. package/Runtime/Resources/CesiumDefaultTilesetMaterial.mat +232 -0
  275. package/Runtime/Resources/CesiumDefaultTilesetMaterial.mat.meta +8 -0
  276. package/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph +14271 -0
  277. package/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph.meta +10 -0
  278. package/Runtime/Resources/CesiumPointCloudShading.hlsl +156 -0
  279. package/Runtime/Resources/CesiumPointCloudShading.hlsl.meta +7 -0
  280. package/Runtime/Resources/CesiumPointCloudShadingMaterial.mat +125 -0
  281. package/Runtime/Resources/CesiumPointCloudShadingMaterial.mat.meta +8 -0
  282. package/Runtime/Resources/CesiumPointCloudShadingShader.shader +73 -0
  283. package/Runtime/Resources/CesiumPointCloudShadingShader.shader.meta +10 -0
  284. package/Runtime/Resources/CesiumRasterOverlay.shadersubgraph +2207 -0
  285. package/Runtime/Resources/CesiumRasterOverlay.shadersubgraph.meta +10 -0
  286. package/Runtime/Resources/CesiumSelectTexCoords.shadersubgraph +722 -0
  287. package/Runtime/Resources/CesiumSelectTexCoords.shadersubgraph.meta +10 -0
  288. package/Runtime/Resources/CesiumUnlitTilesetMaterial.mat +261 -0
  289. package/Runtime/Resources/CesiumUnlitTilesetMaterial.mat.meta +8 -0
  290. package/Runtime/Resources/CesiumUnlitTilesetShader.shadergraph +5873 -0
  291. package/Runtime/Resources/CesiumUnlitTilesetShader.shadergraph.meta +10 -0
  292. package/Runtime/Resources/DynamicCamera.prefab +253 -0
  293. package/Runtime/Resources/DynamicCamera.prefab.meta +7 -0
  294. package/Runtime/Resources/TransformTextureCoordinates.shadersubgraph +2171 -0
  295. package/Runtime/Resources/TransformTextureCoordinates.shadersubgraph.meta +10 -0
  296. package/Runtime/Resources/green1x1.png +0 -0
  297. package/Runtime/Resources/green1x1.png.meta +123 -0
  298. package/Runtime/Resources.meta +8 -0
  299. package/Runtime/TestGltfModel.cs +56 -0
  300. package/Runtime/TestGltfModel.cs.meta +11 -0
  301. package/Runtime/TestReinterop.cs +21 -0
  302. package/Runtime/TestReinterop.cs.meta +11 -0
  303. package/Runtime/UnityLifetime.cs +27 -0
  304. package/Runtime/UnityLifetime.cs.meta +11 -0
  305. package/Runtime/WaitForTask.cs +25 -0
  306. package/Runtime/WaitForTask.cs.meta +11 -0
  307. package/Runtime/csc.rsp +1 -0
  308. package/Runtime/csc.rsp.meta +7 -0
  309. package/Runtime.meta +8 -0
  310. package/ThirdParty.json +27 -0
  311. package/ThirdParty.json.meta +7 -0
  312. package/WGS84.asset +18 -0
  313. package/WGS84.asset.meta +8 -0
  314. package/package.json +29 -0
  315. package/package.json.meta +7 -0
@@ -0,0 +1,539 @@
1
+ using System;
2
+ using Unity.Mathematics;
3
+ using UnityEngine;
4
+
5
+ namespace CesiumForUnity
6
+ {
7
+ /// <summary>
8
+ /// A controller that can smoothly fly to locations around the globe while
9
+ /// offering control over the characteristics of its flights.
10
+ /// </summary>
11
+ /// <remarks>
12
+ /// This controller is compatible with CesiumCameraController. During flights,
13
+ /// it will disable inputs on CesiumCameraController as necessary, such as
14
+ /// camera rotation with the mouse.
15
+ /// </remarks>
16
+ [DisallowMultipleComponent]
17
+ [AddComponentMenu("Cesium/Cesium Fly To Controller")]
18
+ [IconAttribute("Packages/com.cesium.unity/Editor/Resources/Cesium-24x24.png")]
19
+ public class CesiumFlyToController : MonoBehaviour
20
+ {
21
+ [SerializeField]
22
+ private AnimationCurve _flyToAltitudeProfileCurve;
23
+
24
+ /// <summary>
25
+ /// A curve that dictates what percentage of the max altitude the controller
26
+ /// should take at a given time on the curve.
27
+ /// </summary>
28
+ /// <remarks>
29
+ /// This curve must be kept in the 0 to 1 range on both axes. The
30
+ /// <see cref="CesiumFlyToController.flyToMaximumAltitudeCurve"/>
31
+ /// dictates the actual max altitude at each point along the curve.
32
+ /// </remarks>
33
+ public AnimationCurve flyToAltitudeProfileCurve
34
+ {
35
+ get => this._flyToAltitudeProfileCurve;
36
+ set => this._flyToAltitudeProfileCurve = value;
37
+ }
38
+
39
+ [SerializeField]
40
+ private AnimationCurve _flyToProgressCurve;
41
+
42
+ /// <summary>
43
+ /// A curve that is used to determine the progress percentage for all the other
44
+ /// curves.
45
+ /// </summary>
46
+ public AnimationCurve flyToProgressCurve
47
+ {
48
+ get => this._flyToProgressCurve;
49
+ set => this._flyToProgressCurve = value;
50
+ }
51
+
52
+ [SerializeField]
53
+ private AnimationCurve _flyToMaximumAltitudeCurve;
54
+
55
+ /// <summary>
56
+ /// A curve that dictates the maximum altitude at each point along the curve.
57
+ /// </summary>
58
+ /// <remarks>
59
+ /// This can be used in conjuction with
60
+ /// <see cref="CesiumFlyToController.flyToAltitudeProfileCurve"/> to allow the
61
+ /// controller to take some altitude during the flight.
62
+ /// </remarks>
63
+ public AnimationCurve flyToMaximumAltitudeCurve
64
+ {
65
+ get => this._flyToMaximumAltitudeCurve;
66
+ set => this._flyToMaximumAltitudeCurve = value;
67
+ }
68
+
69
+ [SerializeField]
70
+ [Min(0.0f)]
71
+ private double _flyToDuration = 5.0;
72
+
73
+ /// <summary>
74
+ /// The length in seconds that the flight should last.
75
+ /// </summary>
76
+ public double flyToDuration
77
+ {
78
+ get => this._flyToDuration;
79
+ set => this._flyToDuration = Math.Max(value, 0.0);
80
+ }
81
+
82
+ #region Deprecated Functionality
83
+ [Min(0.0f)]
84
+ private double _flyToGranularityDegrees = 0.01;
85
+
86
+ /// <summary>
87
+ /// The granularity in degrees with which keypoints should be generated for the
88
+ /// flight interpolation. This value should be greater than 0.0, otherwise
89
+ /// the controller will not take flight.
90
+ /// </summary>
91
+ /// <remarks>
92
+ /// This represents the difference in degrees between each keypoint on the flight path.
93
+ /// The lower the value, the more keypoints are generated, and the smoother the flight
94
+ /// interpolation will be.
95
+ /// </remarks>
96
+ [Obsolete("CesiumFlyToController no longer works using keypoints. This value has no effect.")]
97
+ public double flyToGranularityDegrees
98
+ {
99
+ get => this._flyToGranularityDegrees;
100
+ set
101
+ {
102
+ this._flyToGranularityDegrees = Math.Max(value, 0.0);
103
+ if (this._flyToGranularityDegrees == 0.0)
104
+ {
105
+ Debug.LogWarning(
106
+ "FlyToGranularityDegrees must be set to a non-zero value. " +
107
+ "Otherwise, CesiumFlyToController will not fly to any " +
108
+ "specified location.");
109
+ }
110
+ }
111
+ }
112
+ #endregion
113
+
114
+ /// <summary>
115
+ /// Encapsulates a method that is called whenever the controller finishes flying.
116
+ /// </summary>
117
+ public delegate void CompletedFlightDelegate();
118
+
119
+ /// <summary>
120
+ /// An event that is raised when the controller finishes flying.
121
+ /// </summary>
122
+ public event CompletedFlightDelegate OnFlightComplete;
123
+
124
+ /// <summary>
125
+ /// Encapsulates a method that is called whenever the controller's flight is interrupted.
126
+ /// </summary>
127
+ public delegate void InterruptedFlightDelegate();
128
+
129
+ /// <summary>
130
+ /// An event that is raised when the controller's flight is interrupted.
131
+ /// </summary>
132
+ public event InterruptedFlightDelegate OnFlightInterrupted;
133
+
134
+ private CesiumGeoreference _georeference;
135
+ private CesiumGlobeAnchor _globeAnchor;
136
+ private CesiumSimplePlanarEllipsoidCurve _flightPath;
137
+ private double _flightPathLength;
138
+
139
+ private CesiumCameraController _cameraController;
140
+
141
+ private Quaternion _sourceRotation;
142
+ private Quaternion _destinationRotation;
143
+
144
+ private double3 _destinationECEF;
145
+ private double3 _previousPositionECEF;
146
+
147
+ private double _maxHeight;
148
+
149
+ private double _currentFlyToTime = 0.0;
150
+
151
+ private bool _flyingToLocation = false;
152
+ private bool _canInterruptFlight = true;
153
+
154
+ void Awake()
155
+ {
156
+ this._georeference = this.gameObject.GetComponentInParent<CesiumGeoreference>();
157
+ if (this._georeference == null)
158
+ {
159
+ Debug.LogError(
160
+ "CesiumFlyToController must be nested under a game object " +
161
+ "with a CesiumGeoreference.");
162
+ }
163
+
164
+ this._globeAnchor = this.gameObject.GetComponentInParent<CesiumGlobeAnchor>();
165
+ if (this._globeAnchor == null)
166
+ {
167
+ Debug.LogError("CesiumFlyToController expects a CesiumGlobeAnchor to be attached to itself or to a parent");
168
+ }
169
+
170
+ CesiumOriginShift originShift = this._globeAnchor.GetComponent<CesiumOriginShift>();
171
+ if (originShift == null)
172
+ {
173
+ Debug.LogError("CesiumFlyToController expects a CesiumOriginShift to be attached to the CesiumGlobeAnchor above it");
174
+ }
175
+
176
+ // If a CesiumCameraController is present, CesiumFlyToController will account for
177
+ // its inputs and modify it during flights.
178
+ this._cameraController = this.gameObject.GetComponent<CesiumCameraController>();
179
+ }
180
+
181
+ void Update()
182
+ {
183
+ if (this._flyingToLocation)
184
+ {
185
+ this.HandleFlightStep(Time.deltaTime);
186
+ }
187
+ }
188
+
189
+ #if UNITY_EDITOR
190
+ // Ensures required components are present in the editor.
191
+ private void Reset()
192
+ {
193
+ CesiumGlobeAnchor anchor = this.gameObject.GetComponentInParent<CesiumGlobeAnchor>();
194
+ if(anchor == null)
195
+ {
196
+ anchor = this.gameObject.AddComponent<CesiumGlobeAnchor>();
197
+ Debug.LogWarning("CesiumFlyToController missing a CesiumGlobeAnchor - adding");
198
+ }
199
+
200
+ CesiumOriginShift origin = anchor.GetComponent<CesiumOriginShift>();
201
+ if(origin == null)
202
+ {
203
+ origin = anchor.gameObject.AddComponent<CesiumOriginShift>();
204
+ Debug.LogWarning("CesiumFlyToController missing a CesiumOriginShift - adding");
205
+ }
206
+ }
207
+ #endif
208
+
209
+ /// <summary>
210
+ /// Whether this controller detects movement from other controllers on the game object.
211
+ /// </summary>
212
+ /// <remarks>
213
+ /// This function is only called if CesiumFlyToController is in flight. When the controller
214
+ /// is in flight, CesiumGlobeAnchor.detectTransformChanges is disabled. This means that
215
+ /// any changes to the transform will only be detected if those changes were synced to
216
+ /// the globe anchor by another controller.
217
+ /// </remarks>
218
+ /// <returns>Whether or not movement was detected.</returns>
219
+ private bool DetectMovementInput()
220
+ {
221
+ double3 currentPositionECEF = this._globeAnchor.positionGlobeFixed;
222
+ double distanceSquared = math.lengthsq(currentPositionECEF - this._previousPositionECEF);
223
+ const double distanceConsideredMovement = 1e-6; // 1/1000 of a millimeter
224
+ return distanceSquared >= (distanceConsideredMovement * distanceConsideredMovement);
225
+ }
226
+
227
+ /// <summary>
228
+ /// Advance the controller's flight based on the given time delta.
229
+ /// </summary>
230
+ /// <remarks>
231
+ /// <para>
232
+ /// This function requires the CesiumGeoreference to be valid. If it is not valid,
233
+ /// then this function will do nothing.
234
+ /// </para>
235
+ /// <para>
236
+ /// The given delta will be added to the _currentFlyTime, and the position
237
+ /// and orientation will be computed by interpolating the _keypoints
238
+ /// and _flyToSourceRotation/_flyToDestinationRotation based on this time.
239
+ /// </para>
240
+ /// <para>
241
+ /// The position will be set via the globe anchor's setter, while the
242
+ /// orientation is assigned directly to the transform.
243
+ /// </para>
244
+ /// </remarks>
245
+ /// <param name="deltaTime"> The time delta in seconds.</param>
246
+ private void HandleFlightStep(float deltaTime)
247
+ {
248
+ if (!this._flyingToLocation || this._flightPath == null)
249
+ {
250
+ return;
251
+ }
252
+
253
+ if (this._georeference == null)
254
+ {
255
+ this._flyingToLocation = false;
256
+ return;
257
+ }
258
+
259
+ if (this._canInterruptFlight && this.DetectMovementInput())
260
+ {
261
+ this.InterruptFlight();
262
+ return;
263
+ }
264
+
265
+ this._currentFlyToTime += deltaTime;
266
+
267
+ double flyPercentage = 0.0;
268
+ if (this._currentFlyToTime >= this._flyToDuration)
269
+ {
270
+ flyPercentage = 1.0;
271
+ }
272
+ else if (this._flyToProgressCurve != null && this._flyToProgressCurve.length > 0)
273
+ {
274
+ // Sample the progress curve if we have one
275
+ flyPercentage = math.clamp(this._flyToProgressCurve.Evaluate((float)(this._currentFlyToTime / this._flyToDuration)), 0.0, 1.0);
276
+ }
277
+ else
278
+ {
279
+ flyPercentage = this._currentFlyToTime / this._flyToDuration;
280
+ }
281
+
282
+ // If we're have it to the end of the flight, or if the flight we're taking isn't actually moving or rotating us at all, we're done.
283
+ if (flyPercentage == 1.0 || (this._flightPathLength == 0.0 && this._sourceRotation == this._destinationRotation))
284
+ {
285
+ this.CompleteFlight();
286
+ return;
287
+ }
288
+
289
+ // Calculate the height above the surface. If we have a profile curve, use it as well.
290
+ double altituteOffset = 0.0;
291
+ if (this._maxHeight != 0.0 && this.flyToAltitudeProfileCurve != null && this.flyToAltitudeProfileCurve.length > 0)
292
+ {
293
+ double curveOffset = this._maxHeight * this.flyToAltitudeProfileCurve.Evaluate((float)flyPercentage);
294
+ altituteOffset += curveOffset;
295
+ }
296
+
297
+ // Update position.
298
+ double3 currentPosition = this._flightPath.GetPosition(flyPercentage, altituteOffset);
299
+ this._previousPositionECEF = currentPosition;
300
+ this._globeAnchor.positionGlobeFixed = currentPosition;
301
+
302
+ Quaternion currentQuat = Quaternion.Slerp(this._sourceRotation, this._destinationRotation, (float)flyPercentage);
303
+ this._globeAnchor.rotationEastUpNorth = currentQuat;
304
+ }
305
+
306
+ private void CompleteFlight()
307
+ {
308
+ this._globeAnchor.positionGlobeFixed = _destinationECEF;
309
+ this._globeAnchor.rotationEastUpNorth = this._destinationRotation;
310
+
311
+ this._flyingToLocation = false;
312
+ this._currentFlyToTime = 0.0;
313
+
314
+ this._globeAnchor.adjustOrientationForGlobeWhenMoving = true;
315
+ this._globeAnchor.detectTransformChanges = true;
316
+
317
+ if (this._cameraController != null)
318
+ {
319
+ this._cameraController.enableMovement = true;
320
+ this._cameraController.enableRotation = true;
321
+ }
322
+
323
+ if (this.OnFlightComplete != null)
324
+ {
325
+ this.OnFlightComplete();
326
+ }
327
+ }
328
+
329
+ private void InterruptFlight()
330
+ {
331
+ this._flyingToLocation = false;
332
+
333
+ // Set the controller's roll to 0.0
334
+ Vector3 angles = this.transform.eulerAngles;
335
+ angles.z = 0.0f;
336
+ this.transform.eulerAngles = angles;
337
+
338
+ this._globeAnchor.adjustOrientationForGlobeWhenMoving = true;
339
+ this._globeAnchor.detectTransformChanges = true;
340
+
341
+ if (this._cameraController != null)
342
+ {
343
+ this._cameraController.enableMovement = true;
344
+ this._cameraController.enableRotation = true;
345
+ }
346
+
347
+ if (this.OnFlightInterrupted != null)
348
+ {
349
+ this.OnFlightInterrupted();
350
+ }
351
+ }
352
+
353
+ private void ComputeFlightPath(
354
+ double3 sourceECEF,
355
+ double3 destinationECEF,
356
+ float yawAtDestination,
357
+ float pitchAtDestination)
358
+ {
359
+ // The source and destination rotations are expressed in East-Up-North coordinates.
360
+ pitchAtDestination = Mathf.Clamp(pitchAtDestination, -89.99f, 89.99f);
361
+ this._sourceRotation = this._globeAnchor.transform.rotation;
362
+ this._destinationRotation = Quaternion.Euler(pitchAtDestination, yawAtDestination, 0.0f);
363
+ this._destinationECEF = destinationECEF;
364
+
365
+ this._flightPath = CesiumSimplePlanarEllipsoidCurve.FromCenteredFixedCoordinates(
366
+ this._georeference.ellipsoid,
367
+ sourceECEF,
368
+ destinationECEF);
369
+ this._flightPathLength = math.length(sourceECEF - destinationECEF);
370
+
371
+ this._maxHeight = 0.0;
372
+ if (this._flyToAltitudeProfileCurve != null && this._flyToMaximumAltitudeCurve.length > 0)
373
+ {
374
+ this._maxHeight = 30000.0;
375
+ if (this._flyToMaximumAltitudeCurve != null && this._flyToMaximumAltitudeCurve.length > 0)
376
+ {
377
+ this._maxHeight = this._flyToMaximumAltitudeCurve.Evaluate((float)this._flightPathLength);
378
+ }
379
+ }
380
+
381
+ this._previousPositionECEF = sourceECEF;
382
+ this._flyingToLocation = true;
383
+ }
384
+
385
+ /// <summary>
386
+ /// Begin a smooth flight to the given Earth-Centered, Earth-Fixed (ECEF)
387
+ /// destination such that the controller ends at the specified yaw and pitch.
388
+ /// </summary>
389
+ /// <remarks>
390
+ /// The characteristics of the flight can be configured with
391
+ /// <see cref="CesiumFlyToController.flyToAltitudeProfileCurve"/>,
392
+ /// <see cref="CesiumFlyToController.flyToProgressCurve"/>,
393
+ /// <see cref="CesiumFlyToController.flyToMaximumAltitudeCurve"/>,
394
+ /// <see cref="CesiumFlyToController.flyToDuration"/>, and
395
+ /// <see cref="CesiumFlyToController.flyToGranularityDegrees"/>.
396
+ /// </remarks>
397
+ /// <param name="destination">The destination in ECEF coordinates.</param>
398
+ /// <param name="yawAtDestination">The yaw of the controller at the destination.</param>
399
+ /// <param name="pitchAtDestination">The pitch of the controller at the destination.</param>
400
+ /// <param name="canInterruptByMoving">Whether the flight can be interrupted with movement inputs.</param>
401
+ public void FlyToLocationEarthCenteredEarthFixed(
402
+ double3 destination,
403
+ float yawAtDestination,
404
+ float pitchAtDestination,
405
+ bool canInterruptByMoving)
406
+ {
407
+ if (this._flyingToLocation)
408
+ {
409
+ return;
410
+ }
411
+
412
+ pitchAtDestination = Mathf.Clamp(pitchAtDestination, -89.99f, 89.99f);
413
+
414
+ // Compute source location in ECEF
415
+ double3 source = this._globeAnchor.positionGlobeFixed;
416
+
417
+ this.ComputeFlightPath(source, destination, yawAtDestination, pitchAtDestination);
418
+
419
+ // Indicate that the controller will be flying from now
420
+ this._flyingToLocation = true;
421
+ this._canInterruptFlight = canInterruptByMoving;
422
+ this._globeAnchor.adjustOrientationForGlobeWhenMoving = false;
423
+ this._globeAnchor.detectTransformChanges = false;
424
+
425
+ if (this._cameraController != null)
426
+ {
427
+ this._cameraController.enableMovement = canInterruptByMoving;
428
+ this._cameraController.enableRotation = false;
429
+ }
430
+ }
431
+
432
+ /// <summary>
433
+ /// Begin a smooth flight to the given Earth-Centered, Earth-Fixed (ECEF)
434
+ /// destination such that the controller ends at the specified yaw and pitch.
435
+ /// </summary>
436
+ /// <remarks>
437
+ /// The characteristics of the flight can be configured with
438
+ /// <see cref="CesiumFlyToController.flyToAltitudeProfileCurve"/>,
439
+ /// <see cref="CesiumFlyToController.flyToProgressCurve"/>,
440
+ /// <see cref="CesiumFlyToController.flyToMaximumAltitudeCurve"/>,
441
+ /// <see cref="CesiumFlyToController.flyToDuration"/>, and
442
+ /// <see cref="CesiumFlyToController.flyToGranularityDegrees"/>.
443
+ /// </remarks>
444
+ /// <param name="destination">The destination in ECEF coordinates.</param>
445
+ /// <param name="yawAtDestination">The yaw of the controller at the destination.</param>
446
+ /// <param name="pitchAtDestination">The pitch of the controller at the destination.</param>
447
+ /// <param name="canInterruptByMoving">Whether the flight can be interrupted with movement inputs.</param>
448
+ public void FlyToLocationEarthCenteredEarthFixed(
449
+ Vector3 destination,
450
+ float yawAtDestination,
451
+ float pitchAtDestination,
452
+ bool canInterruptByMoving)
453
+ {
454
+ this.FlyToLocationEarthCenteredEarthFixed(
455
+ new double3()
456
+ {
457
+ x = destination.x,
458
+ y = destination.y,
459
+ z = destination.z,
460
+ },
461
+ yawAtDestination,
462
+ pitchAtDestination,
463
+ canInterruptByMoving);
464
+ }
465
+
466
+ /// <summary>
467
+ /// Begin a smooth flight to the given WGS84 longitude in degrees (x),
468
+ /// latitude in degrees (y), and height in meters (z) such that the controller ends
469
+ /// at the specified yaw and pitch.
470
+ /// </summary>
471
+ /// <remarks>
472
+ /// The characteristics of the flight can be configured with
473
+ /// <see cref="CesiumFlyToController.flyToAltitudeProfileCurve"/>,
474
+ /// <see cref="CesiumFlyToController.flyToProgressCurve"/>,
475
+ /// <see cref="CesiumFlyToController.flyToMaximumAltitudeCurve"/>,
476
+ /// <see cref="CesiumFlyToController.flyToDuration"/>, and
477
+ /// <see cref="CesiumFlyToController.flyToGranularityDegrees"/>.
478
+ /// </remarks>
479
+ /// <param name="destination">The longitude (x), latitude (y), and height (z) of the destination.</param>
480
+ /// <param name="yawAtDestination">The yaw of the controller at the destination.</param>
481
+ /// <param name="pitchAtDestination">The pitch of the controller at the destination.</param>
482
+ /// <param name="canInterruptByMoving">Whether the flight can be interrupted with movement inputs.</param>
483
+ public void FlyToLocationLongitudeLatitudeHeight(
484
+ double3 destination,
485
+ float yawAtDestination,
486
+ float pitchAtDestination,
487
+ bool canInterruptByMoving)
488
+ {
489
+ double3 destinationECEF =
490
+ this._georeference.ellipsoid.LongitudeLatitudeHeightToCenteredFixed(destination);
491
+
492
+ this.FlyToLocationEarthCenteredEarthFixed(
493
+ destinationECEF,
494
+ yawAtDestination,
495
+ pitchAtDestination,
496
+ canInterruptByMoving);
497
+ }
498
+
499
+ /// <summary>
500
+ /// Begin a smooth flight to the given WGS84 longitude in degrees (x),
501
+ /// latitude in degrees (y), and height in meters (z) such that the controller ends
502
+ /// at the specified yaw and pitch.
503
+ /// </summary>
504
+ /// <remarks>
505
+ /// The characteristics of the flight can be configured with
506
+ /// <see cref="CesiumFlyToController.flyToAltitudeProfileCurve"/>,
507
+ /// <see cref="CesiumFlyToController.flyToProgressCurve"/>,
508
+ /// <see cref="CesiumFlyToController.flyToMaximumAltitudeCurve"/>,
509
+ /// <see cref="CesiumFlyToController.flyToDuration"/>, and
510
+ /// <see cref="CesiumFlyToController.flyToGranularityDegrees"/>.
511
+ /// </remarks>
512
+ /// <param name="destination">The longitude (x), latitude (y), and height (z) of the destination.</param>
513
+ /// <param name="yawAtDestination">The yaw of the controller at the destination.</param>
514
+ /// <param name="pitchAtDestination">The pitch of the controller at the destination.</param>
515
+ /// <param name="canInterruptByMoving">Whether the flight can be interrupted with movement inputs.</param>
516
+ public void FlyToLocationLongitudeLatitudeHeight(
517
+ Vector3 destination,
518
+ float yawAtDestination,
519
+ float pitchAtDestination,
520
+ bool canInterruptByMoving)
521
+ {
522
+ double3 destinationCoordinates = new double3()
523
+ {
524
+ x = destination.x,
525
+ y = destination.y,
526
+ z = destination.z
527
+ };
528
+ double3 destinationECEF =
529
+ this._georeference.ellipsoid.LongitudeLatitudeHeightToCenteredFixed(
530
+ destinationCoordinates);
531
+
532
+ this.FlyToLocationEarthCenteredEarthFixed(
533
+ destinationECEF,
534
+ yawAtDestination,
535
+ pitchAtDestination,
536
+ canInterruptByMoving);
537
+ }
538
+ }
539
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 275ecd2d59d942d41bf31252981978e0
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: