@openglobus/og 0.24.2 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{js/Globe.d.ts → Globe.d.ts} +16 -18
- package/lib/{js/Object3d.d.ts → Object3d.d.ts} +1 -1
- package/lib/{@openglobus/js/camera → camera}/Camera.d.ts +16 -22
- package/lib/{@openglobus/js/camera → camera}/Frustum.d.ts +1 -1
- package/lib/control/CameraFrameComposer.d.ts +35 -0
- package/lib/control/KeyboardNavigation.d.ts +32 -0
- package/lib/control/MouseWheelZoomControl.d.ts +1 -0
- package/lib/{js/control → control/atmosphere}/Atmosphere.d.ts +9 -6
- package/lib/{@openglobus/js/control → control/atmosphere}/AtmosphereConfig.d.ts +6 -6
- package/lib/{js/control → control}/index.d.ts +3 -1
- package/lib/control/object3dManager/Object3dCollection.d.ts +21 -0
- package/lib/control/object3dManager/Object3dCollectionView.d.ts +15 -0
- package/lib/control/object3dManager/Object3dItemView.d.ts +10 -0
- package/lib/control/object3dManager/Object3dManager.d.ts +28 -0
- package/lib/control/object3dManager/Object3dManagerDialog.d.ts +23 -0
- package/lib/{js/control → control}/visibleExtent/Segment.d.ts +3 -3
- package/lib/entity/LabelWorker.worker.d.ts +1 -0
- package/lib/{@openglobus/js/index.d.ts → index.d.ts} +1 -0
- package/lib/og.css +1 -0
- package/lib/og.es.js +1 -0
- package/lib/{@openglobus/js/renderer → renderer}/Renderer.d.ts +28 -28
- package/lib/{@openglobus/js/scene → scene}/Planet.d.ts +3 -3
- package/lib/{@openglobus/js/segment → segment}/Segment.d.ts +1 -1
- package/lib/{js/segment → segment}/segmentHelper.d.ts +1 -1
- package/lib/{@openglobus/js/shaders → shaders/atmos}/atmos.d.ts +7 -5
- package/lib/{@openglobus/js/shaders → shaders/billboard}/billboard.d.ts +1 -1
- package/lib/shaders/drawnode/drawnode.d.ts +8 -0
- package/lib/{@openglobus/js/shaders/geoObject.d.ts → shaders/geo_object/geo_object.d.ts} +1 -1
- package/lib/{@openglobus/js/shaders → shaders/label}/label.d.ts +1 -1
- package/lib/{@openglobus/js/shaders → shaders/polyline}/polyline.d.ts +1 -1
- package/lib/shaders/ray/ray.d.ts +2 -0
- package/lib/{@openglobus/js/shaders → shaders/tone_mapping}/toneMapping.d.ts +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/{@openglobus/js/ui → ui}/Dialog.d.ts +1 -1
- package/lib/{@openglobus/js/ui → ui}/View.d.ts +1 -0
- package/lib/{@openglobus/js/utils → utils}/BaseWorker.d.ts +2 -2
- package/lib/utils/PlainSegmentWorker.worker.d.ts +1 -0
- package/lib/utils/TerrainWorker.worker.d.ts +1 -0
- package/lib/{@openglobus/js/utils → utils}/objParser.d.ts +1 -1
- package/lib/{js/utils → utils}/shared.d.ts +16 -0
- package/lib/{js/webgl → webgl}/Framebuffer.d.ts +21 -5
- package/lib/{@openglobus/js/webgl → webgl}/Handler.d.ts +0 -1
- package/package.json +76 -68
- package/res/fonts/Ephesis-Regular.json +4648 -0
- package/res/fonts/Ephesis-Regular.ttf.cfg +1282 -0
- package/res/fonts/Ephesis-Regular.ttf.png +0 -0
- package/res/fonts/Karla-Bold.json +5252 -0
- package/res/fonts/Karla-Bold.ttf.cfg +920 -0
- package/res/fonts/Karla-Bold.ttf.png +0 -0
- package/res/fonts/Karla-Light.json +5252 -0
- package/res/fonts/Karla-Light.ttf.cfg +830 -0
- package/res/fonts/Karla-Light.ttf.png +0 -0
- package/res/fonts/Karla-Medium.json +5252 -0
- package/res/fonts/Karla-Medium.ttf.cfg +1196 -0
- package/res/fonts/Karla-Medium.ttf.png +0 -0
- package/res/fonts/NotoSansArabic-Regular.json +3332 -0
- package/res/fonts/NotoSansArabic-Regular.ttf.cfg +1370 -0
- package/res/fonts/NotoSansArabic-Regular.ttf.png +0 -0
- package/res/fonts/Roboto-Regular.json +37147 -0
- package/res/fonts/Roboto-Regular.ttf.cfg +1340 -0
- package/res/fonts/Roboto-Regular.ttf.png +0 -0
- package/res/fonts/arial.js +4325 -0
- package/res/fonts/arial.json +4321 -0
- package/res/fonts/arial.ttf.cfg +1570 -0
- package/res/fonts/arial.ttf.png +0 -0
- package/res/night-4326.png +0 -0
- package/res/night.png +0 -0
- package/res/spec.png +0 -0
- package/css/og.css +0 -1342
- package/lib/@openglobus/js/Globe.d.ts +0 -145
- package/lib/@openglobus/js/Object3d.d.ts +0 -81
- package/lib/@openglobus/js/control/Atmosphere.d.ts +0 -40
- package/lib/@openglobus/js/control/KeyboardNavigation.d.ts +0 -28
- package/lib/@openglobus/js/control/index.d.ts +0 -30
- package/lib/@openglobus/js/segment/segmentHelper.d.ts +0 -18
- package/lib/@openglobus/js/shaders/bloom.d.ts +0 -2
- package/lib/@openglobus/js/shaders/blur.d.ts +0 -3
- package/lib/@openglobus/js/shaders/drawnode.d.ts +0 -10
- package/lib/@openglobus/js/shaders/lumFilter.d.ts +0 -2
- package/lib/@openglobus/js/shaders/ray.d.ts +0 -2
- package/lib/@openglobus/js/shaders/utils.d.ts +0 -1
- package/lib/@openglobus/js/utils/shared.d.ts +0 -287
- package/lib/@openglobus/js/webgl/Framebuffer.d.ts +0 -97
- package/lib/@openglobus/og.css +0 -1
- package/lib/@openglobus/og.esm.js +0 -2
- package/lib/@openglobus/og.esm.js.map +0 -1
- package/lib/@openglobus/og.umd.js +0 -2
- package/lib/@openglobus/og.umd.js.map +0 -1
- package/lib/js/Clock.d.ts +0 -106
- package/lib/js/Clock.js +0 -141
- package/lib/js/Deferred.d.ts +0 -6
- package/lib/js/Deferred.js +0 -13
- package/lib/js/Events.d.ts +0 -90
- package/lib/js/Events.js +0 -145
- package/lib/js/Extent.d.ts +0 -145
- package/lib/js/Extent.js +0 -278
- package/lib/js/Globe.js +0 -289
- package/lib/js/ImageCanvas.d.ts +0 -128
- package/lib/js/ImageCanvas.js +0 -203
- package/lib/js/Lock.d.ts +0 -15
- package/lib/js/Lock.js +0 -27
- package/lib/js/LonLat.d.ts +0 -128
- package/lib/js/LonLat.js +0 -192
- package/lib/js/Object3d.js +0 -508
- package/lib/js/Popup.d.ts +0 -49
- package/lib/js/Popup.js +0 -160
- package/lib/js/QueueArray.d.ts +0 -16
- package/lib/js/QueueArray.js +0 -63
- package/lib/js/Rectangle.d.ts +0 -76
- package/lib/js/Rectangle.js +0 -77
- package/lib/js/Stack.d.ts +0 -20
- package/lib/js/Stack.js +0 -42
- package/lib/js/astro/astro.d.ts +0 -39
- package/lib/js/astro/astro.js +0 -43
- package/lib/js/astro/earth.d.ts +0 -8
- package/lib/js/astro/earth.js +0 -75
- package/lib/js/astro/jd.d.ts +0 -234
- package/lib/js/astro/jd.js +0 -416
- package/lib/js/astro/orbit.d.ts +0 -5
- package/lib/js/astro/orbit.js +0 -104
- package/lib/js/astro/rotation.d.ts +0 -2
- package/lib/js/astro/rotation.js +0 -25
- package/lib/js/bv/Box.d.ts +0 -32
- package/lib/js/bv/Box.js +0 -53
- package/lib/js/bv/Sphere.d.ts +0 -37
- package/lib/js/bv/Sphere.js +0 -31
- package/lib/js/bv/index.d.ts +0 -3
- package/lib/js/bv/index.js +0 -3
- package/lib/js/camera/Camera.d.ts +0 -361
- package/lib/js/camera/Camera.js +0 -541
- package/lib/js/camera/Frustum.d.ts +0 -142
- package/lib/js/camera/Frustum.js +0 -246
- package/lib/js/camera/PlanetCamera.d.ts +0 -247
- package/lib/js/camera/PlanetCamera.js +0 -513
- package/lib/js/camera/index.d.ts +0 -3
- package/lib/js/camera/index.js +0 -3
- package/lib/js/cons.d.ts +0 -40
- package/lib/js/cons.js +0 -92
- package/lib/js/control/Atmosphere.js +0 -401
- package/lib/js/control/AtmosphereConfig.d.ts +0 -59
- package/lib/js/control/AtmosphereConfig.js +0 -348
- package/lib/js/control/CameraLock.d.ts +0 -38
- package/lib/js/control/CameraLock.js +0 -216
- package/lib/js/control/CompassButton.d.ts +0 -16
- package/lib/js/control/CompassButton.js +0 -118
- package/lib/js/control/Control.d.ts +0 -100
- package/lib/js/control/Control.js +0 -137
- package/lib/js/control/DebugInfo.d.ts +0 -25
- package/lib/js/control/DebugInfo.js +0 -318
- package/lib/js/control/DrawingSwitcher.d.ts +0 -13
- package/lib/js/control/DrawingSwitcher.js +0 -94
- package/lib/js/control/EarthCoordinates.d.ts +0 -41
- package/lib/js/control/EarthCoordinates.js +0 -161
- package/lib/js/control/GeoImageDragControl.d.ts +0 -22
- package/lib/js/control/GeoImageDragControl.js +0 -102
- package/lib/js/control/KeyboardNavigation.d.ts +0 -28
- package/lib/js/control/KeyboardNavigation.js +0 -143
- package/lib/js/control/LayerAnimation.d.ts +0 -71
- package/lib/js/control/LayerAnimation.js +0 -283
- package/lib/js/control/LayerSwitcher.d.ts +0 -38
- package/lib/js/control/LayerSwitcher.js +0 -151
- package/lib/js/control/Lighting.d.ts +0 -54
- package/lib/js/control/Lighting.js +0 -459
- package/lib/js/control/MouseNavigation.d.ts +0 -76
- package/lib/js/control/MouseNavigation.js +0 -414
- package/lib/js/control/MouseWheelZoomControl.d.ts +0 -0
- package/lib/js/control/MouseWheelZoomControl.js +0 -270
- package/lib/js/control/OldMouseNavigation.d.ts +0 -65
- package/lib/js/control/OldMouseNavigation.js +0 -368
- package/lib/js/control/RulerSwitcher.d.ts +0 -18
- package/lib/js/control/RulerSwitcher.js +0 -57
- package/lib/js/control/ScaleControl.d.ts +0 -25
- package/lib/js/control/ScaleControl.js +0 -97
- package/lib/js/control/SegmentBoundVisualization.d.ts +0 -13
- package/lib/js/control/SegmentBoundVisualization.js +0 -37
- package/lib/js/control/ShowFps.d.ts +0 -10
- package/lib/js/control/ShowFps.js +0 -20
- package/lib/js/control/SimpleNavigation.d.ts +0 -43
- package/lib/js/control/SimpleNavigation.js +0 -196
- package/lib/js/control/SimpleSkyBackground.d.ts +0 -18
- package/lib/js/control/SimpleSkyBackground.js +0 -187
- package/lib/js/control/Sun.d.ts +0 -34
- package/lib/js/control/Sun.js +0 -117
- package/lib/js/control/ToggleWireframe.d.ts +0 -15
- package/lib/js/control/ToggleWireframe.js +0 -28
- package/lib/js/control/TouchNavigation.d.ts +0 -53
- package/lib/js/control/TouchNavigation.js +0 -266
- package/lib/js/control/ZoomControl.d.ts +0 -28
- package/lib/js/control/ZoomControl.js +0 -86
- package/lib/js/control/drawing/DrawingControl.d.ts +0 -12
- package/lib/js/control/drawing/DrawingControl.js +0 -35
- package/lib/js/control/drawing/LineStringDrawingScene.d.ts +0 -15
- package/lib/js/control/drawing/LineStringDrawingScene.js +0 -139
- package/lib/js/control/drawing/PolygonDrawingScene.d.ts +0 -98
- package/lib/js/control/drawing/PolygonDrawingScene.js +0 -533
- package/lib/js/control/elevationProfile/ElevationProfile.d.ts +0 -77
- package/lib/js/control/elevationProfile/ElevationProfile.js +0 -248
- package/lib/js/control/elevationProfile/ElevationProfileButtonsView.d.ts +0 -15
- package/lib/js/control/elevationProfile/ElevationProfileButtonsView.js +0 -61
- package/lib/js/control/elevationProfile/ElevationProfileControl.d.ts +0 -33
- package/lib/js/control/elevationProfile/ElevationProfileControl.js +0 -151
- package/lib/js/control/elevationProfile/ElevationProfileLegend.d.ts +0 -20
- package/lib/js/control/elevationProfile/ElevationProfileLegend.js +0 -82
- package/lib/js/control/elevationProfile/ElevationProfileScene.d.ts +0 -80
- package/lib/js/control/elevationProfile/ElevationProfileScene.js +0 -542
- package/lib/js/control/elevationProfile/ElevationProfileView.d.ts +0 -65
- package/lib/js/control/elevationProfile/ElevationProfileView.js +0 -504
- package/lib/js/control/elevationProfile/PointListDialog.d.ts +0 -12
- package/lib/js/control/elevationProfile/PointListDialog.js +0 -57
- package/lib/js/control/geoObjectEditor/ArrowEntity.d.ts +0 -15
- package/lib/js/control/geoObjectEditor/ArrowEntity.js +0 -59
- package/lib/js/control/geoObjectEditor/AxisTrackEntity.d.ts +0 -9
- package/lib/js/control/geoObjectEditor/AxisTrackEntity.js +0 -93
- package/lib/js/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
- package/lib/js/control/geoObjectEditor/GeoObjectEditor.js +0 -30
- package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.d.ts +0 -69
- package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.js +0 -488
- package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.d.ts +0 -127
- package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.js +0 -549
- package/lib/js/control/geoObjectEditor/MoveAxisEntity.d.ts +0 -17
- package/lib/js/control/geoObjectEditor/MoveAxisEntity.js +0 -107
- package/lib/js/control/geoObjectEditor/MovePlaneEntity.d.ts +0 -7
- package/lib/js/control/geoObjectEditor/MovePlaneEntity.js +0 -31
- package/lib/js/control/geoObjectEditor/RotateEntity.d.ts +0 -9
- package/lib/js/control/geoObjectEditor/RotateEntity.js +0 -105
- package/lib/js/control/geoObjectEditor/colors.d.ts +0 -8
- package/lib/js/control/geoObjectEditor/colors.js +0 -8
- package/lib/js/control/heightRuler/HeightRuler.d.ts +0 -7
- package/lib/js/control/heightRuler/HeightRuler.js +0 -11
- package/lib/js/control/heightRuler/HeightRulerScene.d.ts +0 -35
- package/lib/js/control/heightRuler/HeightRulerScene.js +0 -181
- package/lib/js/control/heightRuler/HeightRulerSwitcher.d.ts +0 -6
- package/lib/js/control/heightRuler/HeightRulerSwitcher.js +0 -13
- package/lib/js/control/index.js +0 -30
- package/lib/js/control/ruler/Ruler.d.ts +0 -14
- package/lib/js/control/ruler/Ruler.js +0 -23
- package/lib/js/control/ruler/RulerScene.d.ts +0 -88
- package/lib/js/control/ruler/RulerScene.js +0 -324
- package/lib/js/control/selection/Selection.d.ts +0 -56
- package/lib/js/control/selection/Selection.js +0 -78
- package/lib/js/control/selection/SelectionScene.d.ts +0 -44
- package/lib/js/control/selection/SelectionScene.js +0 -272
- package/lib/js/control/timeline/TimelineControl.d.ts +0 -18
- package/lib/js/control/timeline/TimelineControl.js +0 -81
- package/lib/js/control/timeline/TimelineModel.d.ts +0 -41
- package/lib/js/control/timeline/TimelineModel.js +0 -104
- package/lib/js/control/timeline/TimelineView.d.ts +0 -86
- package/lib/js/control/timeline/TimelineView.js +0 -363
- package/lib/js/control/timeline/timelineUtils.d.ts +0 -12
- package/lib/js/control/timeline/timelineUtils.js +0 -112
- package/lib/js/control/visibleExtent/Segment.js +0 -1301
- package/lib/js/control/visibleExtent/VisibleExtent.js +0 -56
- package/lib/js/control/visibleExtent/drawnode.d.ts +0 -7
- package/lib/js/control/visibleExtent/drawnode.js +0 -718
- package/lib/js/ellipsoid/Ellipsoid.d.ts +0 -194
- package/lib/js/ellipsoid/Ellipsoid.js +0 -459
- package/lib/js/ellipsoid/index.d.ts +0 -4
- package/lib/js/ellipsoid/index.js +0 -4
- package/lib/js/ellipsoid/mars.d.ts +0 -6
- package/lib/js/ellipsoid/mars.js +0 -6
- package/lib/js/ellipsoid/moon.d.ts +0 -6
- package/lib/js/ellipsoid/moon.js +0 -6
- package/lib/js/ellipsoid/wgs84.d.ts +0 -6
- package/lib/js/ellipsoid/wgs84.js +0 -6
- package/lib/js/entity/BaseBillboard.d.ts +0 -225
- package/lib/js/entity/BaseBillboard.js +0 -284
- package/lib/js/entity/BaseBillboardHandler.d.ts +0 -81
- package/lib/js/entity/BaseBillboardHandler.js +0 -546
- package/lib/js/entity/Billboard.d.ts +0 -114
- package/lib/js/entity/Billboard.js +0 -127
- package/lib/js/entity/BillboardHandler.d.ts +0 -15
- package/lib/js/entity/BillboardHandler.js +0 -103
- package/lib/js/entity/Entity.d.ts +0 -630
- package/lib/js/entity/Entity.js +0 -957
- package/lib/js/entity/EntityCollection.d.ts +0 -368
- package/lib/js/entity/EntityCollection.js +0 -655
- package/lib/js/entity/GeoObject.d.ts +0 -257
- package/lib/js/entity/GeoObject.js +0 -318
- package/lib/js/entity/GeoObjectHandler.d.ts +0 -81
- package/lib/js/entity/GeoObjectHandler.js +0 -515
- package/lib/js/entity/Geometry.d.ts +0 -125
- package/lib/js/entity/Geometry.js +0 -291
- package/lib/js/entity/GeometryHandler.d.ts +0 -86
- package/lib/js/entity/GeometryHandler.js +0 -745
- package/lib/js/entity/InstanceData.d.ts +0 -76
- package/lib/js/entity/InstanceData.js +0 -347
- package/lib/js/entity/Label.d.ts +0 -230
- package/lib/js/entity/Label.js +0 -322
- package/lib/js/entity/LabelHandler.d.ts +0 -65
- package/lib/js/entity/LabelHandler.js +0 -696
- package/lib/js/entity/LabelWorker.d.ts +0 -15
- package/lib/js/entity/LabelWorker.js +0 -163
- package/lib/js/entity/PointCloud.d.ts +0 -179
- package/lib/js/entity/PointCloud.js +0 -327
- package/lib/js/entity/PointCloudHandler.d.ts +0 -42
- package/lib/js/entity/PointCloudHandler.js +0 -82
- package/lib/js/entity/Polyline.d.ts +0 -360
- package/lib/js/entity/Polyline.js +0 -1635
- package/lib/js/entity/PolylineHandler.d.ts +0 -29
- package/lib/js/entity/PolylineHandler.js +0 -103
- package/lib/js/entity/Ray.d.ts +0 -135
- package/lib/js/entity/Ray.js +0 -171
- package/lib/js/entity/RayHandler.d.ts +0 -70
- package/lib/js/entity/RayHandler.js +0 -496
- package/lib/js/entity/Strip.d.ts +0 -141
- package/lib/js/entity/Strip.js +0 -417
- package/lib/js/entity/StripHandler.d.ts +0 -42
- package/lib/js/entity/StripHandler.js +0 -110
- package/lib/js/entity/index.d.ts +0 -10
- package/lib/js/entity/index.js +0 -10
- package/lib/js/index.d.ts +0 -34
- package/lib/js/index.js +0 -34
- package/lib/js/input/KeyboardHandler.d.ts +0 -33
- package/lib/js/input/KeyboardHandler.js +0 -159
- package/lib/js/input/MouseHandler.d.ts +0 -17
- package/lib/js/input/MouseHandler.js +0 -92
- package/lib/js/input/TouchHandler.d.ts +0 -11
- package/lib/js/input/TouchHandler.js +0 -42
- package/lib/js/input/input.d.ts +0 -3
- package/lib/js/input/input.js +0 -47
- package/lib/js/layer/BaseGeoImage.d.ts +0 -146
- package/lib/js/layer/BaseGeoImage.js +0 -382
- package/lib/js/layer/Bing.d.ts +0 -5
- package/lib/js/layer/Bing.js +0 -41
- package/lib/js/layer/CanvasTiles.d.ts +0 -104
- package/lib/js/layer/CanvasTiles.js +0 -292
- package/lib/js/layer/GeoImage.d.ts +0 -62
- package/lib/js/layer/GeoImage.js +0 -133
- package/lib/js/layer/GeoTexture2d.d.ts +0 -18
- package/lib/js/layer/GeoTexture2d.js +0 -37
- package/lib/js/layer/GeoVideo.d.ts +0 -69
- package/lib/js/layer/GeoVideo.js +0 -157
- package/lib/js/layer/KML.d.ts +0 -74
- package/lib/js/layer/KML.js +0 -303
- package/lib/js/layer/Layer.d.ts +0 -416
- package/lib/js/layer/Layer.js +0 -734
- package/lib/js/layer/Material.d.ts +0 -34
- package/lib/js/layer/Material.js +0 -69
- package/lib/js/layer/OpenStreetMap.d.ts +0 -5
- package/lib/js/layer/OpenStreetMap.js +0 -19
- package/lib/js/layer/Vector.d.ts +0 -240
- package/lib/js/layer/Vector.js +0 -767
- package/lib/js/layer/WMS.d.ts +0 -76
- package/lib/js/layer/WMS.js +0 -112
- package/lib/js/layer/XYZ.d.ts +0 -149
- package/lib/js/layer/XYZ.js +0 -299
- package/lib/js/layer/index.d.ts +0 -12
- package/lib/js/layer/index.js +0 -12
- package/lib/js/light/LightSource.d.ts +0 -36
- package/lib/js/light/LightSource.js +0 -86
- package/lib/js/math/Line2.d.ts +0 -11
- package/lib/js/math/Line2.js +0 -21
- package/lib/js/math/Line3.d.ts +0 -28
- package/lib/js/math/Line3.js +0 -85
- package/lib/js/math/Mat3.d.ts +0 -77
- package/lib/js/math/Mat3.js +0 -139
- package/lib/js/math/Mat4.d.ts +0 -204
- package/lib/js/math/Mat4.js +0 -487
- package/lib/js/math/Plane.d.ts +0 -22
- package/lib/js/math/Plane.js +0 -118
- package/lib/js/math/Quat.d.ts +0 -393
- package/lib/js/math/Quat.js +0 -794
- package/lib/js/math/Ray.d.ts +0 -72
- package/lib/js/math/Ray.js +0 -211
- package/lib/js/math/Vec2.d.ts +0 -332
- package/lib/js/math/Vec2.js +0 -495
- package/lib/js/math/Vec3.d.ts +0 -488
- package/lib/js/math/Vec3.js +0 -828
- package/lib/js/math/Vec4.d.ts +0 -163
- package/lib/js/math/Vec4.js +0 -211
- package/lib/js/math/coder.d.ts +0 -53
- package/lib/js/math/coder.js +0 -101
- package/lib/js/math/index.d.ts +0 -14
- package/lib/js/math/index.js +0 -11
- package/lib/js/math.d.ts +0 -266
- package/lib/js/math.js +0 -379
- package/lib/js/mercator.d.ts +0 -92
- package/lib/js/mercator.js +0 -120
- package/lib/js/proj/EPSG3857.d.ts +0 -9
- package/lib/js/proj/EPSG3857.js +0 -9
- package/lib/js/proj/EPSG4326.d.ts +0 -9
- package/lib/js/proj/EPSG4326.js +0 -9
- package/lib/js/proj/Proj.d.ts +0 -43
- package/lib/js/proj/Proj.js +0 -38
- package/lib/js/proj/equi.d.ts +0 -9
- package/lib/js/proj/equi.js +0 -9
- package/lib/js/quadTree/EPSG4326/EPSG4326QuadTreeStrategy.d.ts +0 -6
- package/lib/js/quadTree/EPSG4326/EPSG4326QuadTreeStrategy.js +0 -16
- package/lib/js/quadTree/EntityCollectionNode.d.ts +0 -46
- package/lib/js/quadTree/EntityCollectionNode.js +0 -262
- package/lib/js/quadTree/EntityCollectionsTreeStrategy.d.ts +0 -25
- package/lib/js/quadTree/EntityCollectionsTreeStrategy.js +0 -49
- package/lib/js/quadTree/Node.d.ts +0 -80
- package/lib/js/quadTree/Node.js +0 -712
- package/lib/js/quadTree/QuadTreeStrategy.d.ts +0 -39
- package/lib/js/quadTree/QuadTreeStrategy.js +0 -98
- package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +0 -19
- package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.js +0 -74
- package/lib/js/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +0 -19
- package/lib/js/quadTree/earth/EarthEntityCollectionsTreeStrategy.js +0 -103
- package/lib/js/quadTree/earth/EarthQuadTreeStrategy.d.ts +0 -27
- package/lib/js/quadTree/earth/EarthQuadTreeStrategy.js +0 -77
- package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.d.ts +0 -18
- package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.js +0 -70
- package/lib/js/quadTree/equi/EquiEntityCollectionsTreeStrategy.d.ts +0 -17
- package/lib/js/quadTree/equi/EquiEntityCollectionsTreeStrategy.js +0 -75
- package/lib/js/quadTree/equi/EquiQuadTreeStrategy.d.ts +0 -19
- package/lib/js/quadTree/equi/EquiQuadTreeStrategy.js +0 -62
- package/lib/js/quadTree/index.d.ts +0 -12
- package/lib/js/quadTree/index.js +0 -12
- package/lib/js/quadTree/quadTree.d.ts +0 -40
- package/lib/js/quadTree/quadTree.js +0 -66
- package/lib/js/quadTree/wgs84/Wgs84QuadTreeStrategy.d.ts +0 -6
- package/lib/js/quadTree/wgs84/Wgs84QuadTreeStrategy.js +0 -15
- package/lib/js/renderer/Renderer.d.ts +0 -343
- package/lib/js/renderer/Renderer.js +0 -969
- package/lib/js/renderer/RendererEvents.d.ts +0 -245
- package/lib/js/renderer/RendererEvents.js +0 -870
- package/lib/js/scene/Axes.d.ts +0 -12
- package/lib/js/scene/Axes.js +0 -59
- package/lib/js/scene/BaseNode.d.ts +0 -61
- package/lib/js/scene/BaseNode.js +0 -69
- package/lib/js/scene/Planet.d.ts +0 -641
- package/lib/js/scene/Planet.js +0 -1617
- package/lib/js/scene/RenderNode.d.ts +0 -135
- package/lib/js/scene/RenderNode.js +0 -313
- package/lib/js/scene/SkyBox.d.ts +0 -13
- package/lib/js/scene/SkyBox.js +0 -87
- package/lib/js/scene/index.d.ts +0 -5
- package/lib/js/scene/index.js +0 -5
- package/lib/js/segment/Segment.d.ts +0 -289
- package/lib/js/segment/Segment.js +0 -1212
- package/lib/js/segment/SegmentLonLat.d.ts +0 -40
- package/lib/js/segment/SegmentLonLat.js +0 -111
- package/lib/js/segment/SegmentLonLatEqui.d.ts +0 -13
- package/lib/js/segment/SegmentLonLatEqui.js +0 -46
- package/lib/js/segment/Slice.d.ts +0 -13
- package/lib/js/segment/Slice.js +0 -33
- package/lib/js/segment/segmentHelper.js +0 -180
- package/lib/js/shaders/atmos.d.ts +0 -20
- package/lib/js/shaders/atmos.js +0 -326
- package/lib/js/shaders/billboard.d.ts +0 -3
- package/lib/js/shaders/billboard.js +0 -214
- package/lib/js/shaders/bloom.d.ts +0 -2
- package/lib/js/shaders/bloom.js +0 -32
- package/lib/js/shaders/blur.d.ts +0 -3
- package/lib/js/shaders/blur.js +0 -68
- package/lib/js/shaders/depth.d.ts +0 -2
- package/lib/js/shaders/depth.js +0 -40
- package/lib/js/shaders/drawnode.d.ts +0 -10
- package/lib/js/shaders/drawnode.js +0 -1008
- package/lib/js/shaders/geoObject.d.ts +0 -4
- package/lib/js/shaders/geoObject.js +0 -294
- package/lib/js/shaders/label.d.ts +0 -4
- package/lib/js/shaders/label.js +0 -589
- package/lib/js/shaders/lumFilter.d.ts +0 -2
- package/lib/js/shaders/lumFilter.js +0 -36
- package/lib/js/shaders/pointCloud.d.ts +0 -2
- package/lib/js/shaders/pointCloud.js +0 -32
- package/lib/js/shaders/polyline.d.ts +0 -3
- package/lib/js/shaders/polyline.js +0 -364
- package/lib/js/shaders/ray.d.ts +0 -2
- package/lib/js/shaders/ray.js +0 -80
- package/lib/js/shaders/screenFrame.d.ts +0 -2
- package/lib/js/shaders/screenFrame.js +0 -26
- package/lib/js/shaders/skybox.d.ts +0 -2
- package/lib/js/shaders/skybox.js +0 -28
- package/lib/js/shaders/toneMapping.d.ts +0 -2
- package/lib/js/shaders/toneMapping.js +0 -85
- package/lib/js/shaders/utils.d.ts +0 -1
- package/lib/js/shaders/utils.js +0 -97
- package/lib/js/terrain/BilTerrain.d.ts +0 -19
- package/lib/js/terrain/BilTerrain.js +0 -153
- package/lib/js/terrain/EmptyTerrain.d.ts +0 -113
- package/lib/js/terrain/EmptyTerrain.js +0 -113
- package/lib/js/terrain/Geoid.d.ts +0 -33
- package/lib/js/terrain/Geoid.js +0 -191
- package/lib/js/terrain/GlobusRgbTerrain.d.ts +0 -7
- package/lib/js/terrain/GlobusRgbTerrain.js +0 -25
- package/lib/js/terrain/GlobusTerrain.d.ts +0 -140
- package/lib/js/terrain/GlobusTerrain.js +0 -351
- package/lib/js/terrain/RgbTerrain.d.ts +0 -43
- package/lib/js/terrain/RgbTerrain.js +0 -428
- package/lib/js/terrain/index.d.ts +0 -6
- package/lib/js/terrain/index.js +0 -6
- package/lib/js/ui/Button.d.ts +0 -33
- package/lib/js/ui/Button.js +0 -78
- package/lib/js/ui/ButtonGroup.d.ts +0 -16
- package/lib/js/ui/ButtonGroup.js +0 -41
- package/lib/js/ui/Checkbox.d.ts +0 -32
- package/lib/js/ui/Checkbox.js +0 -110
- package/lib/js/ui/Color.d.ts +0 -23
- package/lib/js/ui/Color.js +0 -59
- package/lib/js/ui/Dialog.d.ts +0 -59
- package/lib/js/ui/Dialog.js +0 -193
- package/lib/js/ui/Input.d.ts +0 -33
- package/lib/js/ui/Input.js +0 -107
- package/lib/js/ui/Slider.d.ts +0 -39
- package/lib/js/ui/Slider.js +0 -129
- package/lib/js/ui/ToggleButton.d.ts +0 -21
- package/lib/js/ui/ToggleButton.js +0 -42
- package/lib/js/ui/View.d.ts +0 -39
- package/lib/js/ui/View.js +0 -157
- package/lib/js/ui/icons.d.ts +0 -1
- package/lib/js/ui/icons.js +0 -3
- package/lib/js/utils/BaseWorker.d.ts +0 -14
- package/lib/js/utils/BaseWorker.js +0 -47
- package/lib/js/utils/FontAtlas.d.ts +0 -82
- package/lib/js/utils/FontAtlas.js +0 -220
- package/lib/js/utils/GeoImageCreator.d.ts +0 -34
- package/lib/js/utils/GeoImageCreator.js +0 -163
- package/lib/js/utils/ImagesCacheManager.d.ts +0 -22
- package/lib/js/utils/ImagesCacheManager.js +0 -63
- package/lib/js/utils/Loader.d.ts +0 -63
- package/lib/js/utils/Loader.js +0 -156
- package/lib/js/utils/NormalMapCreator.d.ts +0 -53
- package/lib/js/utils/NormalMapCreator.js +0 -310
- package/lib/js/utils/PlainSegmentWorker.d.ts +0 -24
- package/lib/js/utils/PlainSegmentWorker.js +0 -385
- package/lib/js/utils/TerrainWorker.d.ts +0 -28
- package/lib/js/utils/TerrainWorker.js +0 -551
- package/lib/js/utils/TextureAtlas.d.ts +0 -115
- package/lib/js/utils/TextureAtlas.js +0 -231
- package/lib/js/utils/VectorTileCreator.d.ts +0 -18
- package/lib/js/utils/VectorTileCreator.js +0 -320
- package/lib/js/utils/colorTable.d.ts +0 -3
- package/lib/js/utils/colorTable.js +0 -143
- package/lib/js/utils/earcut.d.ts +0 -7
- package/lib/js/utils/earcut.js +0 -536
- package/lib/js/utils/objParser.d.ts +0 -56
- package/lib/js/utils/objParser.js +0 -293
- package/lib/js/utils/shared.js +0 -961
- package/lib/js/utils/units.d.ts +0 -16
- package/lib/js/utils/units.js +0 -61
- package/lib/js/webgl/BaseFramebuffer.d.ts +0 -52
- package/lib/js/webgl/BaseFramebuffer.js +0 -88
- package/lib/js/webgl/Framebuffer.js +0 -256
- package/lib/js/webgl/Handler.d.ts +0 -491
- package/lib/js/webgl/Handler.js +0 -1035
- package/lib/js/webgl/Multisample.d.ts +0 -28
- package/lib/js/webgl/Multisample.js +0 -77
- package/lib/js/webgl/Program.d.ts +0 -159
- package/lib/js/webgl/Program.js +0 -306
- package/lib/js/webgl/ProgramController.d.ts +0 -87
- package/lib/js/webgl/ProgramController.js +0 -110
- package/lib/js/webgl/index.d.ts +0 -6
- package/lib/js/webgl/index.js +0 -6
- package/lib/js/webgl/types.d.ts +0 -9
- package/lib/js/webgl/types.js +0 -26
- package/lib/js/webgl/variableHandlers.d.ts +0 -22
- package/lib/js/webgl/variableHandlers.js +0 -78
- /package/lib/{@openglobus/js/Clock.d.ts → Clock.d.ts} +0 -0
- /package/lib/{@openglobus/js/Deferred.d.ts → Deferred.d.ts} +0 -0
- /package/lib/{@openglobus/js/Events.d.ts → Events.d.ts} +0 -0
- /package/lib/{@openglobus/js/Extent.d.ts → Extent.d.ts} +0 -0
- /package/lib/{@openglobus/js/ImageCanvas.d.ts → ImageCanvas.d.ts} +0 -0
- /package/lib/{@openglobus/js/Lock.d.ts → Lock.d.ts} +0 -0
- /package/lib/{@openglobus/js/LonLat.d.ts → LonLat.d.ts} +0 -0
- /package/lib/{@openglobus/js/Popup.d.ts → Popup.d.ts} +0 -0
- /package/lib/{@openglobus/js/QueueArray.d.ts → QueueArray.d.ts} +0 -0
- /package/lib/{@openglobus/js/Rectangle.d.ts → Rectangle.d.ts} +0 -0
- /package/lib/{@openglobus/js/Stack.d.ts → Stack.d.ts} +0 -0
- /package/lib/{@openglobus/js/astro → astro}/astro.d.ts +0 -0
- /package/lib/{@openglobus/js/astro → astro}/earth.d.ts +0 -0
- /package/lib/{@openglobus/js/astro → astro}/jd.d.ts +0 -0
- /package/lib/{@openglobus/js/astro → astro}/orbit.d.ts +0 -0
- /package/lib/{@openglobus/js/astro → astro}/rotation.d.ts +0 -0
- /package/lib/{@openglobus/js/bv → bv}/Box.d.ts +0 -0
- /package/lib/{@openglobus/js/bv → bv}/Sphere.d.ts +0 -0
- /package/lib/{@openglobus/js/bv → bv}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/camera → camera}/PlanetCamera.d.ts +0 -0
- /package/lib/{@openglobus/js/camera → camera}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/cons.d.ts → cons.d.ts} +0 -0
- /package/lib/{@openglobus/js/control → control}/CameraLock.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/CompassButton.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/Control.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/DebugInfo.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/DrawingSwitcher.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/EarthCoordinates.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/GeoImageDragControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/LayerAnimation.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/LayerSwitcher.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/Lighting.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/MouseNavigation.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/OldMouseNavigation.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/RulerSwitcher.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ScaleControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/SegmentBoundVisualization.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ShowFps.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/SimpleNavigation.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/SimpleSkyBackground.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/Sun.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ToggleWireframe.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/TouchNavigation.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ZoomControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/drawing/DrawingControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/drawing/LineStringDrawingScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/drawing/PolygonDrawingScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfile.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileButtonsView.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileLegend.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileView.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/elevationProfile/PointListDialog.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/ArrowEntity.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/AxisTrackEntity.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditor.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditorDialog.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditorScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/MoveAxisEntity.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/MovePlaneEntity.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/RotateEntity.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/geoObjectEditor/colors.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRuler.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRulerScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRulerSwitcher.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ruler/Ruler.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/ruler/RulerScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/selection/Selection.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/selection/SelectionScene.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/timeline/TimelineControl.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/timeline/TimelineModel.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/timeline/TimelineView.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/timeline/timelineUtils.d.ts +0 -0
- /package/lib/{js/control → control}/visibleExtent/VisibleExtent.d.ts +0 -0
- /package/lib/{@openglobus/js/control → control}/visibleExtent/drawnode.d.ts +0 -0
- /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/Ellipsoid.d.ts +0 -0
- /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/mars.d.ts +0 -0
- /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/moon.d.ts +0 -0
- /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/wgs84.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/BaseBillboard.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/BaseBillboardHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Billboard.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/BillboardHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Entity.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/EntityCollection.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/GeoObject.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/GeoObjectHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Geometry.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/GeometryHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/InstanceData.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Label.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/LabelHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/LabelWorker.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/PointCloud.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/PointCloudHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Polyline.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/PolylineHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Ray.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/RayHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/Strip.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/StripHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/entity → entity}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/input → input}/KeyboardHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/input → input}/MouseHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/input → input}/TouchHandler.d.ts +0 -0
- /package/lib/{@openglobus/js/input → input}/input.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/BaseGeoImage.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/Bing.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/CanvasTiles.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/GeoImage.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/GeoTexture2d.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/GeoVideo.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/KML.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/Layer.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/Material.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/OpenStreetMap.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/Vector.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/WMS.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/XYZ.d.ts +0 -0
- /package/lib/{@openglobus/js/layer → layer}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/light → light}/LightSource.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Line2.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Line3.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Mat3.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Mat4.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Plane.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Quat.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Ray.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Vec2.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Vec3.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/Vec4.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/coder.d.ts +0 -0
- /package/lib/{@openglobus/js/math → math}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/math.d.ts → math.d.ts} +0 -0
- /package/lib/{@openglobus/js/mercator.d.ts → mercator.d.ts} +0 -0
- /package/lib/{@openglobus/js/proj → proj}/EPSG3857.d.ts +0 -0
- /package/lib/{@openglobus/js/proj → proj}/EPSG4326.d.ts +0 -0
- /package/lib/{@openglobus/js/proj → proj}/Proj.d.ts +0 -0
- /package/lib/{@openglobus/js/proj → proj}/equi.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/EPSG4326/EPSG4326QuadTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/EntityCollectionNode.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/EntityCollectionsTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/Node.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/QuadTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthEntityCollectionNodeLonLat.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthEntityCollectionsTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthQuadTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiEntityCollectionNodeLonLat.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiEntityCollectionsTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiQuadTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/quadTree.d.ts +0 -0
- /package/lib/{@openglobus/js/quadTree → quadTree}/wgs84/Wgs84QuadTreeStrategy.d.ts +0 -0
- /package/lib/{@openglobus/js/renderer → renderer}/RendererEvents.d.ts +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Ephesis-Regular.json +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Ephesis-Regular.ttf.cfg +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Ephesis-Regular.ttf.png +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Karla-Bold.json +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Karla-Bold.ttf.cfg +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Karla-Bold.ttf.png +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Karla-Light.json +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Karla-Light.ttf.cfg +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Karla-Light.ttf.png +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Karla-Medium.json +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Karla-Medium.ttf.cfg +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Karla-Medium.ttf.png +0 -0
- /package/lib/{@openglobus/res → res}/fonts/NotoSansArabic-Regular.json +0 -0
- /package/lib/{@openglobus/res → res}/fonts/NotoSansArabic-Regular.ttf.cfg +0 -0
- /package/lib/{@openglobus/res → res}/fonts/NotoSansArabic-Regular.ttf.png +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.json +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.ttf.cfg +0 -0
- /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.ttf.png +0 -0
- /package/lib/{@openglobus/res → res}/fonts/arial.js +0 -0
- /package/lib/{@openglobus/res → res}/fonts/arial.json +0 -0
- /package/lib/{@openglobus/res → res}/fonts/arial.ttf.cfg +0 -0
- /package/lib/{@openglobus/res → res}/fonts/arial.ttf.png +0 -0
- /package/lib/{@openglobus/res → res}/night-4326.png +0 -0
- /package/lib/{@openglobus/res → res}/night.png +0 -0
- /package/lib/{@openglobus/res → res}/spec.png +0 -0
- /package/lib/{@openglobus/js/scene → scene}/Axes.d.ts +0 -0
- /package/lib/{@openglobus/js/scene → scene}/BaseNode.d.ts +0 -0
- /package/lib/{@openglobus/js/scene → scene}/RenderNode.d.ts +0 -0
- /package/lib/{@openglobus/js/scene → scene}/SkyBox.d.ts +0 -0
- /package/lib/{@openglobus/js/scene → scene}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/segment → segment}/SegmentLonLat.d.ts +0 -0
- /package/lib/{@openglobus/js/segment → segment}/SegmentLonLatEqui.d.ts +0 -0
- /package/lib/{@openglobus/js/segment → segment}/Slice.d.ts +0 -0
- /package/lib/{@openglobus/js/shaders → shaders}/depth.d.ts +0 -0
- /package/lib/{@openglobus/js/shaders → shaders}/pointCloud.d.ts +0 -0
- /package/lib/{@openglobus/js/shaders → shaders}/screenFrame.d.ts +0 -0
- /package/lib/{@openglobus/js/shaders → shaders}/skybox.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/BilTerrain.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/EmptyTerrain.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/Geoid.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/GlobusRgbTerrain.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/GlobusTerrain.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/RgbTerrain.d.ts +0 -0
- /package/lib/{@openglobus/js/terrain → terrain}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/Button.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/ButtonGroup.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/Checkbox.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/Color.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/Input.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/Slider.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/ToggleButton.d.ts +0 -0
- /package/lib/{@openglobus/js/ui → ui}/icons.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/FontAtlas.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/GeoImageCreator.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/ImagesCacheManager.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/Loader.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/NormalMapCreator.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/PlainSegmentWorker.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/TerrainWorker.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/TextureAtlas.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/VectorTileCreator.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/colorTable.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/earcut.d.ts +0 -0
- /package/lib/{@openglobus/js/utils → utils}/units.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/BaseFramebuffer.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/Multisample.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/Program.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/ProgramController.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/index.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/types.d.ts +0 -0
- /package/lib/{@openglobus/js/webgl → webgl}/variableHandlers.d.ts +0 -0
package/lib/js/entity/Entity.js
DELETED
|
@@ -1,957 +0,0 @@
|
|
|
1
|
-
import * as mercator from "../mercator";
|
|
2
|
-
import * as utils from "../utils/shared";
|
|
3
|
-
import { Billboard } from "./Billboard";
|
|
4
|
-
import { Extent } from "../Extent";
|
|
5
|
-
import { Geometry } from "./Geometry";
|
|
6
|
-
import { GeoObject } from "./GeoObject";
|
|
7
|
-
import { LonLat } from "../LonLat";
|
|
8
|
-
import { Label } from "./Label";
|
|
9
|
-
import { Vec3 } from "../math/Vec3";
|
|
10
|
-
import { PointCloud } from "./PointCloud";
|
|
11
|
-
import { Polyline } from "./Polyline";
|
|
12
|
-
import { Ray } from "./Ray";
|
|
13
|
-
import { Strip } from "./Strip";
|
|
14
|
-
import { Quat } from "../math/Quat";
|
|
15
|
-
import { clamp } from "../math";
|
|
16
|
-
/**
|
|
17
|
-
* Entity instances aggregate multiple forms of visualization into a single high-level object.
|
|
18
|
-
* They can be created manually and added to entity collection.
|
|
19
|
-
*
|
|
20
|
-
* @class
|
|
21
|
-
* @param {IEntityParams} [options] - Entity options:
|
|
22
|
-
* @param {string} [options.name] - Name of the entity.
|
|
23
|
-
* @param {any} [options.properties] - Additional properties of the entity.
|
|
24
|
-
* @param {Vec3 | NumberArray3} [options.cartesian] - Cartesian position.
|
|
25
|
-
* @param {LonLat | NumberArray3 | NumberArray2} [options.lonlat] - Geographic coordinates.
|
|
26
|
-
* @param {number} [options.altitude] - Altitude.
|
|
27
|
-
* @param {boolean} [options.visibility] - Visibility flag.
|
|
28
|
-
* @param {Billboard | IBillboardParams} [options.billboard] - Billboard object or parameters.
|
|
29
|
-
* @param {Label | ILabelParams} [options.label] - Label object or parameters.
|
|
30
|
-
* @param {Polyline | IPolylineParams} [options.polyline] - Polyline object or parameters.
|
|
31
|
-
* @param {Ray | IRayParams} [options.ray] - Ray object or parameters.
|
|
32
|
-
* @param {PointCloud | IPointCloudParams} [options.pointCloud] - Point cloud object or parameters.
|
|
33
|
-
* @param {Geometry | IGeometryParams} [options.geometry] - Geometry object or parameters.
|
|
34
|
-
* @param {GeoObject | IGeoObjectParams} [options.geoObject] - Geo object or parameters.
|
|
35
|
-
* @param {Strip | IStripParams} [options.strip] - Strip object or parameters.
|
|
36
|
-
* @param {boolean} [options.independentPicking] - Independent picking flag.
|
|
37
|
-
* @param {boolean} [options.relativePosition] - Parent relative position flag, otherwise position is absolute.
|
|
38
|
-
* @param {number} [options.pitch] - Rotation around local X-axis in radians.
|
|
39
|
-
* @param {number} [options.yaw] - Rotation around local Y-axis in radians.
|
|
40
|
-
* @param {number} [options.roll] - Rotation around local Z-axis in radians.
|
|
41
|
-
* @param {number | Vec3 | NumberArray3} [options.scale] - Scaling factor.
|
|
42
|
-
* @param {boolean} [options.forceGlobalPosition] - Forces global position for the entity make the same position as its parent.
|
|
43
|
-
* @param {boolean} [options.forceGlobalRotation] - Forces global rotation for the entity make the same rotation as its parent.
|
|
44
|
-
* @param {boolean} [options.forceGlobalScale] - Forces global scale for the entity make the same scale as its parent.
|
|
45
|
-
*/
|
|
46
|
-
class Entity {
|
|
47
|
-
constructor(options = {}) {
|
|
48
|
-
options.properties = options.properties || {};
|
|
49
|
-
this.__id = Entity.__counter__++;
|
|
50
|
-
this.properties = options.properties || {};
|
|
51
|
-
this.properties.name = this.properties.name != undefined ? this.properties.name : "";
|
|
52
|
-
this.childEntities = [];
|
|
53
|
-
this.parent = null;
|
|
54
|
-
this.forceGlobalPosition = options.forceGlobalPosition || false;
|
|
55
|
-
this.forceGlobalRotation = options.forceGlobalRotation || false;
|
|
56
|
-
this.forceGlobalScale = options.forceGlobalScale || false;
|
|
57
|
-
this._cartesian = utils.createVector3(options.cartesian);
|
|
58
|
-
this._rootCartesian = new Vec3();
|
|
59
|
-
this._localPosition = utils.createVector3(options.localPosition);
|
|
60
|
-
this._absoluteLocalPosition = new Vec3();
|
|
61
|
-
this._lonLat = utils.createLonLat(options.lonlat);
|
|
62
|
-
this._lonLatMerc = new LonLat();
|
|
63
|
-
this._altitude = options.altitude || 0.0;
|
|
64
|
-
this._visibility = options.visibility != undefined ? options.visibility : true;
|
|
65
|
-
this._entityCollection = null;
|
|
66
|
-
this._entityCollectionIndex = -1;
|
|
67
|
-
this._layer = null;
|
|
68
|
-
this._layerIndex = -1;
|
|
69
|
-
this._pickingColor = new Vec3(0, 0, 0);
|
|
70
|
-
this._independentPicking = options.independentPicking || false;
|
|
71
|
-
this._relativePosition = options.relativePosition || false;
|
|
72
|
-
this._pitchRad = options.pitch || 0;
|
|
73
|
-
this._yawRad = options.yaw || 0;
|
|
74
|
-
this._rollRad = options.roll || 0;
|
|
75
|
-
this._scale = utils.createVector3(options.scale, new Vec3(1, 1, 1));
|
|
76
|
-
this._qFrame = Quat.IDENTITY;
|
|
77
|
-
this._qRot = Quat.IDENTITY;
|
|
78
|
-
this._absoluteQRot = Quat.IDENTITY;
|
|
79
|
-
this._featureConstructorArray = {
|
|
80
|
-
billboard: [Billboard, this.setBillboard],
|
|
81
|
-
label: [Label, this.setLabel],
|
|
82
|
-
polyline: [Polyline, this.setPolyline],
|
|
83
|
-
pointCloud: [PointCloud, this.setPointCloud],
|
|
84
|
-
geometry: [Geometry, this.setGeometry],
|
|
85
|
-
geoObject: [GeoObject, this.setGeoObject],
|
|
86
|
-
strip: [Strip, this.setStrip],
|
|
87
|
-
ray: [Ray, this.setRay]
|
|
88
|
-
};
|
|
89
|
-
this.billboard = this._createOptionFeature("billboard", options.billboard);
|
|
90
|
-
this.label = this._createOptionFeature("label", options.label);
|
|
91
|
-
this.polyline = this._createOptionFeature("polyline", options.polyline);
|
|
92
|
-
this.ray = this._createOptionFeature("ray", options.ray);
|
|
93
|
-
this.pointCloud = this._createOptionFeature("pointCloud", options.pointCloud);
|
|
94
|
-
this.geometry = this._createOptionFeature("geometry", options.geometry);
|
|
95
|
-
this.geoObject = this._createOptionFeature("geoObject", options.geoObject);
|
|
96
|
-
this.strip = this._createOptionFeature("strip", options.strip);
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Returns root entity object.
|
|
100
|
-
* @public
|
|
101
|
-
* @return {Entity}
|
|
102
|
-
*/
|
|
103
|
-
get rootEntity() {
|
|
104
|
-
let pn = this;
|
|
105
|
-
while (pn) {
|
|
106
|
-
if (!pn.parent) {
|
|
107
|
-
return pn;
|
|
108
|
-
}
|
|
109
|
-
pn = pn.parent;
|
|
110
|
-
}
|
|
111
|
-
return this;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Sets relative position property
|
|
115
|
-
* @param isRelative
|
|
116
|
-
*/
|
|
117
|
-
set relativePosition(isRelative) {
|
|
118
|
-
if (isRelative !== this._relativePosition) {
|
|
119
|
-
let cart = this.getAbsoluteCartesian(), pitch = this.getAbsolutePitch(), yaw = this.getAbsoluteYaw(), roll = this.getAbsoluteRoll();
|
|
120
|
-
this._relativePosition = isRelative;
|
|
121
|
-
// probably need to take root this.rootEntity
|
|
122
|
-
if (this.parent) {
|
|
123
|
-
this._rootCartesian.copy(this.parent._rootCartesian);
|
|
124
|
-
}
|
|
125
|
-
if (!isRelative) {
|
|
126
|
-
this.setCartesian3v(cart);
|
|
127
|
-
this.setPitch(pitch);
|
|
128
|
-
this.setYaw(yaw);
|
|
129
|
-
this.setRoll(roll);
|
|
130
|
-
}
|
|
131
|
-
else if (this.parent) {
|
|
132
|
-
this.setAbsoluteCartesian3v(cart);
|
|
133
|
-
this.setAbsolutePitch(pitch);
|
|
134
|
-
this.setAbsoluteYaw(yaw);
|
|
135
|
-
this.setAbsoluteRoll(roll);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Gets relative position property
|
|
141
|
-
* @public
|
|
142
|
-
* @returns{boolean}
|
|
143
|
-
*/
|
|
144
|
-
get relativePosition() {
|
|
145
|
-
return this._relativePosition;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Gets current entity collection container.
|
|
149
|
-
* @public
|
|
150
|
-
* @returns {EntityCollection | null}
|
|
151
|
-
*/
|
|
152
|
-
get entityCollection() {
|
|
153
|
-
return this._entityCollection;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Gets entity uniq id
|
|
157
|
-
* @public
|
|
158
|
-
* @returns {number}
|
|
159
|
-
*/
|
|
160
|
-
get id() {
|
|
161
|
-
return this.__id;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Checks if the given entity is equal to the current entity.
|
|
165
|
-
* @param {Entity} entity - The entity to compare.
|
|
166
|
-
* @returns {boolean} True if entities are equal, otherwise false.
|
|
167
|
-
*/
|
|
168
|
-
isEqual(entity) {
|
|
169
|
-
return this.__id === entity.__id;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Gets the layer index of the entity.
|
|
173
|
-
* @returns {number} The layer index.
|
|
174
|
-
*/
|
|
175
|
-
get layerIndex() {
|
|
176
|
-
return this._layerIndex;
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Gets the instance class name of the entity.
|
|
180
|
-
* @returns {string} The instance name "Entity".
|
|
181
|
-
*/
|
|
182
|
-
get instanceName() {
|
|
183
|
-
return "Entity";
|
|
184
|
-
}
|
|
185
|
-
_createOptionFeature(featureName, options) {
|
|
186
|
-
if (options) {
|
|
187
|
-
let c = this._featureConstructorArray[featureName];
|
|
188
|
-
return c[1].call(this, new c[0](options));
|
|
189
|
-
}
|
|
190
|
-
return null;
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Gets the collection index of the entity.
|
|
194
|
-
* @returns {number} The entity collection index.
|
|
195
|
-
*/
|
|
196
|
-
getCollectionIndex() {
|
|
197
|
-
return this._entityCollectionIndex;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Adds current entity into the specified entity collection.
|
|
201
|
-
* @public
|
|
202
|
-
* @param {EntityCollection | Vector} collection - Specified entity collection or vector layer.
|
|
203
|
-
* @param {boolean} [rightNow=false] - Entity insertion option for vector layer.
|
|
204
|
-
* @returns {Entity} - This object.
|
|
205
|
-
*/
|
|
206
|
-
addTo(collection, rightNow = false) {
|
|
207
|
-
collection.add(this, rightNow);
|
|
208
|
-
return this;
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Removes current entity from its collection or layer.
|
|
212
|
-
* @public
|
|
213
|
-
*/
|
|
214
|
-
remove() {
|
|
215
|
-
this._layer && this._layer.removeEntity(this);
|
|
216
|
-
this._entityCollection && this._entityCollection.removeEntity(this);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Sets the entity visibility.
|
|
220
|
-
* @public
|
|
221
|
-
* @param {boolean} visibility - Entity visibility.
|
|
222
|
-
*/
|
|
223
|
-
setVisibility(visibility) {
|
|
224
|
-
this._visibility = visibility;
|
|
225
|
-
// billboards
|
|
226
|
-
this.billboard && this.billboard.setVisibility(visibility);
|
|
227
|
-
// geoObject
|
|
228
|
-
this.geoObject && this.geoObject.setVisibility(visibility);
|
|
229
|
-
// labels
|
|
230
|
-
this.label && this.label.setVisibility(visibility);
|
|
231
|
-
// polyline
|
|
232
|
-
this.polyline && this.polyline.setVisibility(visibility);
|
|
233
|
-
// ray
|
|
234
|
-
this.ray && this.ray.setVisibility(visibility);
|
|
235
|
-
// geometry
|
|
236
|
-
this.geometry && this.geometry.setVisibility(visibility);
|
|
237
|
-
for (let i = 0; i < this.childEntities.length; i++) {
|
|
238
|
-
this.childEntities[i].setVisibility(visibility);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Returns entity visibility.
|
|
243
|
-
* @public
|
|
244
|
-
* @returns {boolean} -
|
|
245
|
-
*/
|
|
246
|
-
getVisibility() {
|
|
247
|
-
return this._visibility;
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Sets entity cartesian position.
|
|
251
|
-
* @public
|
|
252
|
-
* @param {Vec3} cartesian - Cartesian position in 3d space.
|
|
253
|
-
*/
|
|
254
|
-
setCartesian3v(cartesian) {
|
|
255
|
-
this.setCartesian(cartesian.x, cartesian.y, cartesian.z);
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Gets scale factor
|
|
259
|
-
* @public
|
|
260
|
-
* @returns {Vec3}
|
|
261
|
-
*/
|
|
262
|
-
getScale() {
|
|
263
|
-
return this._scale;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Sets XYZ axis scale for the inner object such as GeoObject
|
|
267
|
-
* @public
|
|
268
|
-
* @param {Vec3} scale - Scale factor
|
|
269
|
-
*/
|
|
270
|
-
setScale3v(scale) {
|
|
271
|
-
this._scale.copy(scale);
|
|
272
|
-
this.geoObject && this.geoObject.setScale3v(this._scale);
|
|
273
|
-
for (let i = 0; i < this.childEntities.length; i++) {
|
|
274
|
-
let chi = this.childEntities[i];
|
|
275
|
-
if (chi.forceGlobalScale) {
|
|
276
|
-
chi.setScale3v(this._scale);
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
chi.setScale3v(this.childEntities[i].getScale());
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Sets scale for the inner object such as GeoObject
|
|
285
|
-
* @public
|
|
286
|
-
* @param {number} val - Scale factor
|
|
287
|
-
*/
|
|
288
|
-
setScale(val) {
|
|
289
|
-
this._scale.set(val, val, val);
|
|
290
|
-
this.geoObject && this.geoObject.setScale(val);
|
|
291
|
-
for (let i = 0; i < this.childEntities.length; i++) {
|
|
292
|
-
let chi = this.childEntities[i];
|
|
293
|
-
if (chi.forceGlobalScale) {
|
|
294
|
-
chi.setScale(val);
|
|
295
|
-
}
|
|
296
|
-
else {
|
|
297
|
-
chi.setScale3v(this.childEntities[i].getScale());
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Gets the absolute rotation direction of the entity.
|
|
303
|
-
* @public
|
|
304
|
-
* @returns {Quat} The absolute rotation quaternion.
|
|
305
|
-
*/
|
|
306
|
-
getAbsoluteRotation() {
|
|
307
|
-
return this._absoluteQRot.clone();
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Gets the local rotation of the entity. For the root entity it is equal to the absolute rotation.
|
|
311
|
-
* @public
|
|
312
|
-
* @returns {Quat} The rotation quaternion.
|
|
313
|
-
*/
|
|
314
|
-
getRotation() {
|
|
315
|
-
return this._qRot;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Rotates the entity to look at a given point in world coordinates.
|
|
319
|
-
* @public
|
|
320
|
-
* @param {Vec3} cart - The target position to look at.
|
|
321
|
-
*/
|
|
322
|
-
setLook3v(cart) {
|
|
323
|
-
let lq = new Quat();
|
|
324
|
-
let p0 = this.getAbsoluteCartesian();
|
|
325
|
-
let rot;
|
|
326
|
-
if (this._entityCollection) {
|
|
327
|
-
let up = this._entityCollection.renderNode.ellipsoid.getSurfaceNormal3v(p0);
|
|
328
|
-
rot = lq.setLookRotation(cart.sub(p0), up).conjugate();
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
rot = lq.setLookRotation(cart.sub(p0), Vec3.UP).conjugate();
|
|
332
|
-
}
|
|
333
|
-
this.setAbsoluteRotation(rot);
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Rotates the entity to look at a given geographic coordinate.
|
|
337
|
-
* @public
|
|
338
|
-
* @param {LonLat} lonLat - The longitude and latitude to look at.
|
|
339
|
-
*/
|
|
340
|
-
setLookLonLat(lonLat) {
|
|
341
|
-
if (this._entityCollection) {
|
|
342
|
-
let cart = this._entityCollection.renderNode.ellipsoid.lonLatToCartesian(lonLat);
|
|
343
|
-
this.setLook3v(cart);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* Sets the absolute rotation of the entity.
|
|
348
|
-
* @public
|
|
349
|
-
* @param {Quat} rot - The new absolute rotation quaternion.
|
|
350
|
-
*/
|
|
351
|
-
setAbsoluteRotation(rot) {
|
|
352
|
-
this._absoluteQRot.copy(rot);
|
|
353
|
-
this._updatePitchYawRoll();
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Sets the local rotation of the entity.
|
|
357
|
-
* @param {Quat} rot - The new rotation quaternion.
|
|
358
|
-
*/
|
|
359
|
-
setRotation(rot) {
|
|
360
|
-
//this._qRot.copy(rot);
|
|
361
|
-
//
|
|
362
|
-
//@todo when necessary
|
|
363
|
-
//
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* Sets the pitch rotation of the entity.
|
|
367
|
-
* @param {number} val - The new pitch angle in radians.
|
|
368
|
-
*/
|
|
369
|
-
setPitch(val) {
|
|
370
|
-
this._pitchRad = val;
|
|
371
|
-
this._updateAbsolutePosition();
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Sets the yaw rotation of the entity.
|
|
375
|
-
* @param {number} val - The new yaw angle in radians.
|
|
376
|
-
*/
|
|
377
|
-
setYaw(val) {
|
|
378
|
-
this._yawRad = val;
|
|
379
|
-
this._updateAbsolutePosition();
|
|
380
|
-
}
|
|
381
|
-
/**
|
|
382
|
-
* Sets the roll rotation of the entity.
|
|
383
|
-
* @public
|
|
384
|
-
* @param {number} val - The new roll angle in radians.
|
|
385
|
-
*/
|
|
386
|
-
setRoll(val) {
|
|
387
|
-
this._rollRad = val;
|
|
388
|
-
this._updateAbsolutePosition();
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Gets the pitch angle of the entity.
|
|
392
|
-
* @public
|
|
393
|
-
* @returns {number} The pitch angle in radians.
|
|
394
|
-
*/
|
|
395
|
-
getPitch() {
|
|
396
|
-
return this._pitchRad;
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* Gets the yaw angle of the entity.
|
|
400
|
-
* @public
|
|
401
|
-
* @returns {number} The yaw angle in radians.
|
|
402
|
-
*/
|
|
403
|
-
getYaw() {
|
|
404
|
-
return this._yawRad;
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Gets the roll angle of the entity.
|
|
408
|
-
* @public
|
|
409
|
-
* @returns {number} The roll angle in radians.
|
|
410
|
-
*/
|
|
411
|
-
getRoll() {
|
|
412
|
-
return this._rollRad;
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* Sets the absolute pitch of the entity.
|
|
416
|
-
* @public
|
|
417
|
-
* @param {number} val - The absolute pitch angle in radians.
|
|
418
|
-
*/
|
|
419
|
-
setAbsolutePitch(val) {
|
|
420
|
-
if (this._relativePosition) {
|
|
421
|
-
this._absoluteQRot.setPitchYawRoll(val, this.getAbsoluteYaw(), this.getAbsoluteRoll(), this._qFrame);
|
|
422
|
-
this._updatePitchYawRoll();
|
|
423
|
-
}
|
|
424
|
-
else {
|
|
425
|
-
this.setPitch(val);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* Sets the absolute yaw of the entity.
|
|
430
|
-
* @public
|
|
431
|
-
* @param {number} val - The absolute yaw angle in radians.
|
|
432
|
-
*/
|
|
433
|
-
setAbsoluteYaw(val) {
|
|
434
|
-
if (this._relativePosition) {
|
|
435
|
-
this._absoluteQRot.setPitchYawRoll(this.getAbsolutePitch(), val, this.getAbsoluteRoll(), this._qFrame);
|
|
436
|
-
this._updatePitchYawRoll();
|
|
437
|
-
}
|
|
438
|
-
else {
|
|
439
|
-
this.setYaw(val);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
/**
|
|
443
|
-
* Sets the absolute roll of the entity.
|
|
444
|
-
* @public
|
|
445
|
-
* @param {number} val - The absolute roll angle in radians.
|
|
446
|
-
*/
|
|
447
|
-
setAbsoluteRoll(val) {
|
|
448
|
-
if (this._relativePosition) {
|
|
449
|
-
this._absoluteQRot.setPitchYawRoll(this.getAbsolutePitch(), this.getAbsoluteYaw(), val, this._qFrame);
|
|
450
|
-
this._updatePitchYawRoll();
|
|
451
|
-
}
|
|
452
|
-
else {
|
|
453
|
-
this.setRoll(val);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* Gets the absolute pitch angle of the entity.
|
|
458
|
-
* @public
|
|
459
|
-
* @returns {number} The absolute pitch angle in radians.
|
|
460
|
-
*/
|
|
461
|
-
getAbsolutePitch() {
|
|
462
|
-
if (this.parent && this._relativePosition) {
|
|
463
|
-
return this._qFrame.conjugate().inverse().mul(this._absoluteQRot).getPitch();
|
|
464
|
-
}
|
|
465
|
-
return this._pitchRad;
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
* Gets the absolute yaw angle of the entity.
|
|
469
|
-
* @public
|
|
470
|
-
* @returns {number} The absolute yaw angle in radians.
|
|
471
|
-
*/
|
|
472
|
-
getAbsoluteYaw() {
|
|
473
|
-
if (this.parent && this._relativePosition) {
|
|
474
|
-
return this._qFrame.conjugate().inverse().mul(this._absoluteQRot).getYaw();
|
|
475
|
-
}
|
|
476
|
-
return this._yawRad;
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Gets the absolute roll angle of the entity.
|
|
480
|
-
* @public
|
|
481
|
-
* @returns {number} The absolute roll angle in radians.
|
|
482
|
-
*/
|
|
483
|
-
getAbsoluteRoll() {
|
|
484
|
-
if (this.parent && this._relativePosition) {
|
|
485
|
-
return this._qFrame.conjugate().inverse().mul(this._absoluteQRot).getRoll();
|
|
486
|
-
}
|
|
487
|
-
return this._rollRad;
|
|
488
|
-
}
|
|
489
|
-
_getScaleByDistance() {
|
|
490
|
-
let scd = 1;
|
|
491
|
-
if (this._entityCollection) {
|
|
492
|
-
let scaleByDistance = this._entityCollection.scaleByDistance;
|
|
493
|
-
let lookLength = 1;
|
|
494
|
-
if (this._entityCollection.renderNode && this._entityCollection.renderNode.renderer) {
|
|
495
|
-
lookLength = this._entityCollection.renderNode.renderer.activeCamera.eye.distance(this._rootCartesian);
|
|
496
|
-
}
|
|
497
|
-
//the same in the shader
|
|
498
|
-
scd = scaleByDistance[2] * clamp(lookLength, scaleByDistance[0], scaleByDistance[1]) / scaleByDistance[0];
|
|
499
|
-
}
|
|
500
|
-
return scd;
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* Sets the absolute cartesian position of the entity.
|
|
504
|
-
* @public
|
|
505
|
-
* @param {number} x - X coordinate.
|
|
506
|
-
* @param {number} y - Y coordinate.
|
|
507
|
-
* @param {number} z - Z coordinate.
|
|
508
|
-
*/
|
|
509
|
-
setAbsoluteCartesian(x, y, z) {
|
|
510
|
-
this.setAbsoluteCartesian3v(new Vec3(x, y, z));
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* Sets the absolute cartesian position of the entity using a Vec3.
|
|
514
|
-
* @public
|
|
515
|
-
* @param {Vec3} absolutCartesian - The absolute cartesian position.
|
|
516
|
-
*/
|
|
517
|
-
setAbsoluteCartesian3v(absolutCartesian) {
|
|
518
|
-
let pos = absolutCartesian;
|
|
519
|
-
if (this.parent && this._relativePosition) {
|
|
520
|
-
let scd = this._getScaleByDistance();
|
|
521
|
-
pos = absolutCartesian.sub(this.parent.getAbsoluteCartesian()).scale(1 / scd);
|
|
522
|
-
pos = this.parent._absoluteQRot.conjugate().mulVec3(pos);
|
|
523
|
-
}
|
|
524
|
-
this.setCartesian3v(pos);
|
|
525
|
-
}
|
|
526
|
-
/**
|
|
527
|
-
* Returns absolute cartesian position.
|
|
528
|
-
* @public
|
|
529
|
-
* @returns {Vec3} -
|
|
530
|
-
*/
|
|
531
|
-
getAbsoluteCartesian() {
|
|
532
|
-
if (this.parent && this._relativePosition) {
|
|
533
|
-
let scd = this._getScaleByDistance();
|
|
534
|
-
return this._rootCartesian.add(this._absoluteLocalPosition.scaleTo(scd));
|
|
535
|
-
}
|
|
536
|
-
return this._cartesian.clone();
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* Sets entity cartesian position.
|
|
540
|
-
* @public
|
|
541
|
-
* @param {number} x - 3d space X - position.
|
|
542
|
-
* @param {number} y - 3d space Y - position.
|
|
543
|
-
* @param {number} z - 3d space Z - position.
|
|
544
|
-
*/
|
|
545
|
-
setCartesian(x, y, z) {
|
|
546
|
-
this._cartesian.set(x, y, z);
|
|
547
|
-
this._updateAbsolutePosition();
|
|
548
|
-
for (let i = 0; i < this.childEntities.length; i++) {
|
|
549
|
-
let chi = this.childEntities[i];
|
|
550
|
-
if (chi._relativePosition) {
|
|
551
|
-
chi.setCartesian3v(chi.getCartesian());
|
|
552
|
-
}
|
|
553
|
-
else if (chi.forceGlobalPosition) {
|
|
554
|
-
chi.setCartesian(x, y, z);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
this._updateLonLat();
|
|
558
|
-
//ec && ec.events.dispatch(ec.events.entitymove, this);
|
|
559
|
-
}
|
|
560
|
-
_updatePitchYawRoll() {
|
|
561
|
-
if (this.parent) {
|
|
562
|
-
this._qRot = this.parent._absoluteQRot.conjugate().mul(this._absoluteQRot);
|
|
563
|
-
this._pitchRad = this._qRot.getPitch();
|
|
564
|
-
this._yawRad = this._qRot.getYaw();
|
|
565
|
-
this._rollRad = this._qRot.getRoll();
|
|
566
|
-
// this._pitch = this._pitchRad * DEGREES;
|
|
567
|
-
// this._yaw = this._yawRad * DEGREES;
|
|
568
|
-
// this._roll = this._rollRad * DEGREES;
|
|
569
|
-
if (this.geoObject) {
|
|
570
|
-
this.geoObject.setRotation(this._absoluteQRot);
|
|
571
|
-
}
|
|
572
|
-
for (let i = 0; i < this.childEntities.length; i++) {
|
|
573
|
-
this.childEntities[i]._updateAbsolutePosition();
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
_updateAbsolutePosition() {
|
|
578
|
-
let parent = this.parent;
|
|
579
|
-
if (parent && this._relativePosition) {
|
|
580
|
-
this._qFrame.copy(parent._qFrame);
|
|
581
|
-
this._rootCartesian.copy(parent._rootCartesian);
|
|
582
|
-
this._qRot.setPitchYawRoll(this._pitchRad, this._yawRad, this._rollRad);
|
|
583
|
-
parent._absoluteQRot.mulRes(this._qRot, this._absoluteQRot);
|
|
584
|
-
let rotCart = parent._absoluteQRot.mulVec3(this._cartesian.add(this._localPosition));
|
|
585
|
-
parent._absoluteLocalPosition.addRes(rotCart, this._absoluteLocalPosition);
|
|
586
|
-
}
|
|
587
|
-
else {
|
|
588
|
-
this._qFrame = Quat.IDENTITY;
|
|
589
|
-
if (this._entityCollection && this._entityCollection.renderNode) {
|
|
590
|
-
this._qFrame = this._entityCollection.renderNode.getFrameRotation(this._cartesian);
|
|
591
|
-
}
|
|
592
|
-
if (parent && this.forceGlobalRotation) {
|
|
593
|
-
this._qRot.setPitchYawRoll(parent._pitchRad, parent._yawRad, parent._rollRad, this._qFrame);
|
|
594
|
-
}
|
|
595
|
-
else {
|
|
596
|
-
this._qRot.setPitchYawRoll(this._pitchRad, this._yawRad, this._rollRad, this._qFrame);
|
|
597
|
-
}
|
|
598
|
-
this._absoluteQRot.copy(this._qRot);
|
|
599
|
-
this._rootCartesian.copy(this._cartesian);
|
|
600
|
-
this._absoluteLocalPosition.copy(this._localPosition);
|
|
601
|
-
}
|
|
602
|
-
if (this.geoObject) {
|
|
603
|
-
this.geoObject.setRotation(this._absoluteQRot);
|
|
604
|
-
this.geoObject.setPosition3v(this._rootCartesian);
|
|
605
|
-
this.geoObject.setLocalPosition3v(this._absoluteLocalPosition);
|
|
606
|
-
}
|
|
607
|
-
this.billboard && this.billboard.setPosition3v(this._rootCartesian);
|
|
608
|
-
this.label && this.label.setPosition3v(this._rootCartesian);
|
|
609
|
-
for (let i = 0, len = this.childEntities.length; i < len; i++) {
|
|
610
|
-
this.childEntities[i]._updateAbsolutePosition();
|
|
611
|
-
}
|
|
612
|
-
this._updateLonLat();
|
|
613
|
-
}
|
|
614
|
-
/**
|
|
615
|
-
* Sets entity cartesian position without event dispatching.
|
|
616
|
-
* @public
|
|
617
|
-
* @param {Vec3} cartesian - Cartesian position in 3d space.
|
|
618
|
-
* @param {boolean} skipLonLat - skip geodetic calculation.
|
|
619
|
-
*/
|
|
620
|
-
_setCartesian3vSilent(cartesian, skipLonLat = false) {
|
|
621
|
-
this._cartesian.copy(cartesian);
|
|
622
|
-
this._updateAbsolutePosition();
|
|
623
|
-
for (let i = 0; i < this.childEntities.length; i++) {
|
|
624
|
-
this.childEntities[i].setCartesian(this._cartesian.x, this._cartesian.y, this._cartesian.z);
|
|
625
|
-
}
|
|
626
|
-
if (!skipLonLat) {
|
|
627
|
-
this._updateLonLat();
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
_updateLonLat() {
|
|
631
|
-
let ec = this._entityCollection;
|
|
632
|
-
if (ec && ec.renderNode && ec.renderNode.ellipsoid) {
|
|
633
|
-
//let cart = this._rootCartesian.add(this._absoluteLocalPosition);
|
|
634
|
-
this._lonLat = ec.renderNode.ellipsoid.cartesianToLonLat(this.getAbsoluteCartesian());
|
|
635
|
-
if (Math.abs(this._lonLat.lat) < mercator.MAX_LAT) {
|
|
636
|
-
this._lonLatMerc = this._lonLat.forwardMercator();
|
|
637
|
-
}
|
|
638
|
-
else {
|
|
639
|
-
this._lonLatMerc.lon = this._lonLatMerc.lat = 0;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
* Gets entity geodetic coordinates.
|
|
645
|
-
* @public
|
|
646
|
-
* @returns {LonLat} -
|
|
647
|
-
*/
|
|
648
|
-
getLonLat() {
|
|
649
|
-
return this._lonLat.clone();
|
|
650
|
-
}
|
|
651
|
-
/**
|
|
652
|
-
* Sets geodetic coordinates of the entity point object.
|
|
653
|
-
* @public
|
|
654
|
-
* @param {LonLat} lonlat - coordinates.
|
|
655
|
-
*/
|
|
656
|
-
setLonLat(lonlat) {
|
|
657
|
-
let l = this._lonLat;
|
|
658
|
-
l.lon = lonlat.lon;
|
|
659
|
-
l.lat = lonlat.lat;
|
|
660
|
-
l.height = lonlat.height;
|
|
661
|
-
let ec = this._entityCollection;
|
|
662
|
-
if (ec && ec.renderNode && ec.renderNode.ellipsoid) {
|
|
663
|
-
if (Math.abs(l.lat) < mercator.MAX_LAT) {
|
|
664
|
-
this._lonLatMerc = l.forwardMercator();
|
|
665
|
-
}
|
|
666
|
-
else {
|
|
667
|
-
//this._lonLatMerc = null;
|
|
668
|
-
}
|
|
669
|
-
let temp = new Vec3();
|
|
670
|
-
ec.renderNode.ellipsoid.lonLatToCartesianRes(l, temp);
|
|
671
|
-
this.setAbsoluteCartesian3v(temp);
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* Sets geodetic coordinates of the entity point object.
|
|
676
|
-
* @public
|
|
677
|
-
* @param {number} lon - Longitude.
|
|
678
|
-
* @param {number} lat - Latitude
|
|
679
|
-
* @param {number} [height] - Height
|
|
680
|
-
*/
|
|
681
|
-
setLonLat2(lon, lat, height) {
|
|
682
|
-
let l = this._lonLat;
|
|
683
|
-
l.lon = lon;
|
|
684
|
-
l.lat = lat;
|
|
685
|
-
l.height = height != undefined ? height : l.height;
|
|
686
|
-
let ec = this._entityCollection;
|
|
687
|
-
if (ec && ec.renderNode && ec.renderNode.ellipsoid) {
|
|
688
|
-
if (Math.abs(l.lat) < mercator.MAX_LAT) {
|
|
689
|
-
this._lonLatMerc = l.forwardMercator();
|
|
690
|
-
}
|
|
691
|
-
else {
|
|
692
|
-
this._lonLatMerc.lon = this._lonLatMerc.lat = this._lonLatMerc.height = 0;
|
|
693
|
-
}
|
|
694
|
-
let temp = new Vec3();
|
|
695
|
-
ec.renderNode.ellipsoid.lonLatToCartesianRes(l, temp);
|
|
696
|
-
this.setAbsoluteCartesian3v(temp);
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
/**
|
|
700
|
-
* Sets entity altitude over the planet.
|
|
701
|
-
* @public
|
|
702
|
-
* @param {number} altitude - Altitude.
|
|
703
|
-
*/
|
|
704
|
-
setAltitude(altitude) {
|
|
705
|
-
this._altitude = altitude;
|
|
706
|
-
}
|
|
707
|
-
/**
|
|
708
|
-
* Sets entity altitude over the planet.
|
|
709
|
-
* @public
|
|
710
|
-
* @return {number} Altitude.
|
|
711
|
-
*/
|
|
712
|
-
getAltitude() {
|
|
713
|
-
return this._altitude;
|
|
714
|
-
}
|
|
715
|
-
/**
|
|
716
|
-
* Returns cartesian position.
|
|
717
|
-
* @public
|
|
718
|
-
* @returns {Vec3} -
|
|
719
|
-
*/
|
|
720
|
-
getCartesian() {
|
|
721
|
-
return this._cartesian.clone();
|
|
722
|
-
}
|
|
723
|
-
/**
|
|
724
|
-
* Sets entity billboard.
|
|
725
|
-
* @public
|
|
726
|
-
* @param {Billboard} billboard - Billboard object.
|
|
727
|
-
* @returns {Billboard} -
|
|
728
|
-
*/
|
|
729
|
-
setBillboard(billboard) {
|
|
730
|
-
if (this.billboard) {
|
|
731
|
-
this.billboard.remove();
|
|
732
|
-
}
|
|
733
|
-
this.billboard = billboard;
|
|
734
|
-
this.billboard._entity = this;
|
|
735
|
-
this.billboard.setPosition3v(this._cartesian);
|
|
736
|
-
this.billboard.setVisibility(this._visibility);
|
|
737
|
-
this._entityCollection && this._entityCollection.billboardHandler.add(billboard);
|
|
738
|
-
return billboard;
|
|
739
|
-
}
|
|
740
|
-
/**
|
|
741
|
-
* Sets entity label.
|
|
742
|
-
* @public
|
|
743
|
-
* @param {Label} label - Text label.
|
|
744
|
-
* @returns {Label} -
|
|
745
|
-
*/
|
|
746
|
-
setLabel(label) {
|
|
747
|
-
if (this.label) {
|
|
748
|
-
this.label.remove();
|
|
749
|
-
}
|
|
750
|
-
this.label = label;
|
|
751
|
-
this.label._entity = this;
|
|
752
|
-
this.label.setPosition3v(this._cartesian);
|
|
753
|
-
this.label.setVisibility(this._visibility);
|
|
754
|
-
this._entityCollection && this._entityCollection.labelHandler.add(label);
|
|
755
|
-
return label;
|
|
756
|
-
}
|
|
757
|
-
/**
|
|
758
|
-
* Sets entity ray.
|
|
759
|
-
* @public
|
|
760
|
-
* @param {Ray} ray - Ray object.
|
|
761
|
-
* @returns {Ray} -
|
|
762
|
-
*/
|
|
763
|
-
setRay(ray) {
|
|
764
|
-
if (this.ray) {
|
|
765
|
-
this.ray.remove();
|
|
766
|
-
}
|
|
767
|
-
this.ray = ray;
|
|
768
|
-
this.ray._entity = this;
|
|
769
|
-
this.ray.setVisibility(this._visibility);
|
|
770
|
-
this._entityCollection && this._entityCollection.rayHandler.add(ray);
|
|
771
|
-
return ray;
|
|
772
|
-
}
|
|
773
|
-
/**
|
|
774
|
-
* Sets entity polyline.
|
|
775
|
-
* @public
|
|
776
|
-
* @param {Polyline} polyline - Polyline object.
|
|
777
|
-
* @returns {Polyline} -
|
|
778
|
-
*/
|
|
779
|
-
setPolyline(polyline) {
|
|
780
|
-
if (this.polyline) {
|
|
781
|
-
this.polyline.remove();
|
|
782
|
-
}
|
|
783
|
-
this.polyline = polyline;
|
|
784
|
-
this.polyline._entity = this;
|
|
785
|
-
this.polyline.setVisibility(this._visibility);
|
|
786
|
-
this._entityCollection && this._entityCollection.polylineHandler.add(polyline);
|
|
787
|
-
return polyline;
|
|
788
|
-
}
|
|
789
|
-
/**
|
|
790
|
-
* Sets entity pointCloud.
|
|
791
|
-
* @public
|
|
792
|
-
* @param {PointCloud} pointCloud - PointCloud object.
|
|
793
|
-
* @returns {PointCloud} -
|
|
794
|
-
*/
|
|
795
|
-
setPointCloud(pointCloud) {
|
|
796
|
-
if (this.pointCloud) {
|
|
797
|
-
this.pointCloud.remove();
|
|
798
|
-
}
|
|
799
|
-
this.pointCloud = pointCloud;
|
|
800
|
-
this.pointCloud._entity = this;
|
|
801
|
-
this.pointCloud.setVisibility(this._visibility);
|
|
802
|
-
this._entityCollection && this._entityCollection.pointCloudHandler.add(pointCloud);
|
|
803
|
-
return pointCloud;
|
|
804
|
-
}
|
|
805
|
-
/**
|
|
806
|
-
* Sets entity geometry.
|
|
807
|
-
* @public
|
|
808
|
-
* @param {Geometry} geometry - Geometry object.
|
|
809
|
-
* @returns {Geometry} -
|
|
810
|
-
*/
|
|
811
|
-
setGeometry(geometry) {
|
|
812
|
-
if (this.geometry) {
|
|
813
|
-
this.geometry.remove();
|
|
814
|
-
}
|
|
815
|
-
this.geometry = geometry;
|
|
816
|
-
this.geometry._entity = this;
|
|
817
|
-
this.geometry.setVisibility(this._visibility);
|
|
818
|
-
let layer = this._layer;
|
|
819
|
-
if (this._layer) {
|
|
820
|
-
this._layer.removeEntity(this);
|
|
821
|
-
}
|
|
822
|
-
layer && layer.add(this);
|
|
823
|
-
return geometry;
|
|
824
|
-
}
|
|
825
|
-
/**
|
|
826
|
-
* Sets entity geoObject.
|
|
827
|
-
* @public
|
|
828
|
-
* @param {GeoObject} geoObject - GeoObject.
|
|
829
|
-
* @returns {GeoObject} -
|
|
830
|
-
*/
|
|
831
|
-
setGeoObject(geoObject) {
|
|
832
|
-
if (this.geoObject) {
|
|
833
|
-
this.geoObject.remove();
|
|
834
|
-
}
|
|
835
|
-
this.geoObject = geoObject;
|
|
836
|
-
this.geoObject._entity = this;
|
|
837
|
-
this.geoObject.setPosition3v(this._cartesian);
|
|
838
|
-
this.geoObject.setVisibility(this._visibility);
|
|
839
|
-
this._entityCollection && this._entityCollection.geoObjectHandler.add(geoObject);
|
|
840
|
-
return geoObject;
|
|
841
|
-
}
|
|
842
|
-
/**
|
|
843
|
-
* Sets entity strip.
|
|
844
|
-
* @public
|
|
845
|
-
* @param {Strip} strip - Strip object.
|
|
846
|
-
* @returns {Strip} -
|
|
847
|
-
*/
|
|
848
|
-
setStrip(strip) {
|
|
849
|
-
if (this.strip) {
|
|
850
|
-
this.strip.remove();
|
|
851
|
-
}
|
|
852
|
-
this.strip = strip;
|
|
853
|
-
this.strip._entity = this;
|
|
854
|
-
this.strip.setVisibility(this._visibility);
|
|
855
|
-
this._entityCollection && this._entityCollection.stripHandler.add(strip);
|
|
856
|
-
return strip;
|
|
857
|
-
}
|
|
858
|
-
/**
|
|
859
|
-
* Gets layer container
|
|
860
|
-
* @public
|
|
861
|
-
* @returns {Vector | null}
|
|
862
|
-
*/
|
|
863
|
-
get layer() {
|
|
864
|
-
return this._layer;
|
|
865
|
-
}
|
|
866
|
-
get rendererEvents() {
|
|
867
|
-
if (this._layer) {
|
|
868
|
-
return this._layer.events;
|
|
869
|
-
}
|
|
870
|
-
else if (this._entityCollection) {
|
|
871
|
-
return this._entityCollection.events;
|
|
872
|
-
}
|
|
873
|
-
return null;
|
|
874
|
-
}
|
|
875
|
-
/**
|
|
876
|
-
* Append child entity.
|
|
877
|
-
* @public
|
|
878
|
-
* @param {Entity} entity - Child entity.
|
|
879
|
-
*/
|
|
880
|
-
appendChild(entity) {
|
|
881
|
-
entity._entityCollection = this._entityCollection;
|
|
882
|
-
if (!entity._independentPicking) {
|
|
883
|
-
entity._pickingColor = this._pickingColor;
|
|
884
|
-
}
|
|
885
|
-
entity.parent = this;
|
|
886
|
-
this.childEntities.push(entity);
|
|
887
|
-
this._entityCollection && this._entityCollection.appendChildEntity(entity);
|
|
888
|
-
}
|
|
889
|
-
/**
|
|
890
|
-
* Appends entity items(billboard, label etc.) picking color.
|
|
891
|
-
* @public
|
|
892
|
-
*/
|
|
893
|
-
setPickingColor() {
|
|
894
|
-
let c = this._pickingColor;
|
|
895
|
-
this.billboard && this.billboard.setPickingColor3v(c);
|
|
896
|
-
this.label && this.label.setPickingColor3v(c);
|
|
897
|
-
this.polyline && this.polyline.setPickingColor3v(c);
|
|
898
|
-
this.ray && this.ray.setPickingColor3v(c);
|
|
899
|
-
this.strip && this.strip.setPickingColor3v(c);
|
|
900
|
-
this.geoObject && this.geoObject.setPickingColor3v(c);
|
|
901
|
-
for (let i = 0; i < this.childEntities.length; i++) {
|
|
902
|
-
this.childEntities[i].setPickingColor();
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
/**
|
|
906
|
-
* Return geodetic extent.
|
|
907
|
-
* @public
|
|
908
|
-
* @returns {Extent} -
|
|
909
|
-
*/
|
|
910
|
-
getExtent() {
|
|
911
|
-
let res;
|
|
912
|
-
let c = this._lonLat;
|
|
913
|
-
if (this.billboard || this.label) {
|
|
914
|
-
res = new Extent(new LonLat(c.lon, c.lat), new LonLat(c.lon, c.lat));
|
|
915
|
-
}
|
|
916
|
-
else {
|
|
917
|
-
res = new Extent(new LonLat(180.0, 90.0), new LonLat(-180.0, -90.0));
|
|
918
|
-
}
|
|
919
|
-
let sw = res.southWest, ne = res.northEast;
|
|
920
|
-
if (this.polyline) {
|
|
921
|
-
let e = this.polyline.getExtent();
|
|
922
|
-
if (e.southWest.lon < sw.lon)
|
|
923
|
-
sw.lon = e.southWest.lon;
|
|
924
|
-
if (e.southWest.lat < sw.lat)
|
|
925
|
-
sw.lat = e.southWest.lat;
|
|
926
|
-
if (e.northEast.lon > ne.lon)
|
|
927
|
-
ne.lon = e.northEast.lon;
|
|
928
|
-
if (e.northEast.lat > ne.lat)
|
|
929
|
-
ne.lat = e.northEast.lat;
|
|
930
|
-
}
|
|
931
|
-
if (this.geometry) {
|
|
932
|
-
let e = this.geometry.getExtent();
|
|
933
|
-
if (e.southWest.lon < sw.lon)
|
|
934
|
-
sw.lon = e.southWest.lon;
|
|
935
|
-
if (e.southWest.lat < sw.lat)
|
|
936
|
-
sw.lat = e.southWest.lat;
|
|
937
|
-
if (e.northEast.lon > ne.lon)
|
|
938
|
-
ne.lon = e.northEast.lon;
|
|
939
|
-
if (e.northEast.lat > ne.lat)
|
|
940
|
-
ne.lat = e.northEast.lat;
|
|
941
|
-
}
|
|
942
|
-
for (let i = 0; i < this.childEntities.length; i++) {
|
|
943
|
-
let e = this.childEntities[i].getExtent();
|
|
944
|
-
if (e.southWest.lon < sw.lon)
|
|
945
|
-
sw.lon = e.southWest.lon;
|
|
946
|
-
if (e.southWest.lat < sw.lat)
|
|
947
|
-
sw.lat = e.southWest.lat;
|
|
948
|
-
if (e.northEast.lon > ne.lon)
|
|
949
|
-
ne.lon = e.northEast.lon;
|
|
950
|
-
if (e.northEast.lat > ne.lat)
|
|
951
|
-
ne.lat = e.northEast.lat;
|
|
952
|
-
}
|
|
953
|
-
return res;
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
Entity.__counter__ = 0;
|
|
957
|
-
export { Entity };
|