@openglobus/og 0.24.2 → 0.25.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.
- 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 +75 -68
- 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/@openglobus/res/fonts/Ephesis-Regular.json +0 -4648
- package/lib/@openglobus/res/fonts/Ephesis-Regular.ttf.cfg +0 -1282
- package/lib/@openglobus/res/fonts/Ephesis-Regular.ttf.png +0 -0
- package/lib/@openglobus/res/fonts/Karla-Bold.json +0 -5252
- package/lib/@openglobus/res/fonts/Karla-Bold.ttf.cfg +0 -920
- package/lib/@openglobus/res/fonts/Karla-Bold.ttf.png +0 -0
- package/lib/@openglobus/res/fonts/Karla-Light.json +0 -5252
- package/lib/@openglobus/res/fonts/Karla-Light.ttf.cfg +0 -830
- package/lib/@openglobus/res/fonts/Karla-Light.ttf.png +0 -0
- package/lib/@openglobus/res/fonts/Karla-Medium.json +0 -5252
- package/lib/@openglobus/res/fonts/Karla-Medium.ttf.cfg +0 -1196
- package/lib/@openglobus/res/fonts/Karla-Medium.ttf.png +0 -0
- package/lib/@openglobus/res/fonts/NotoSansArabic-Regular.json +0 -3332
- package/lib/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.cfg +0 -1370
- package/lib/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.png +0 -0
- package/lib/@openglobus/res/fonts/arial.js +0 -4325
- 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/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.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
|
@@ -1,1008 +0,0 @@
|
|
|
1
|
-
import { COMMON } from "./atmos";
|
|
2
|
-
import { Program } from "../webgl/Program";
|
|
3
|
-
import { UTILS } from './utils';
|
|
4
|
-
// REMEMBER!
|
|
5
|
-
// src*(1)+dest*(1-src.alpha)
|
|
6
|
-
// glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
|
7
|
-
// src*(src.alpha)+dest*(1-src.alpha)
|
|
8
|
-
// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
9
|
-
const NIGHT = `const vec3 nightStep = 10.0 * vec3(0.58, 0.48, 0.25);`;
|
|
10
|
-
const DEF_BLEND = `#define blend(DEST, SAMPLER, OFFSET, OPACITY) \
|
|
11
|
-
src = texture( SAMPLER, OFFSET.xy + vTextureCoord.xy * OFFSET.zw );\
|
|
12
|
-
DEST = DEST * (1.0 - src.a * OPACITY) + src * OPACITY;`;
|
|
13
|
-
const DEF_BLEND_WEBGL1 = `#define blend(DEST, SAMPLER, OFFSET, OPACITY) \
|
|
14
|
-
src = texture2D( SAMPLER, OFFSET.xy + vTextureCoord.xy * OFFSET.zw ); \
|
|
15
|
-
DEST = DEST * (1.0 - src.a * OPACITY) + src * OPACITY;`;
|
|
16
|
-
const DEF_BLEND_PICKING = `#define blendPicking(DEST, OFFSET, SAMPLER, MASK, COLOR, OPACITY) \
|
|
17
|
-
tc = OFFSET.xy + vTextureCoord.xy * OFFSET.zw; \
|
|
18
|
-
t = texture2D(SAMPLER, tc); \
|
|
19
|
-
p = texture2D(MASK, tc); \
|
|
20
|
-
DEST = mix(DEST, vec4(max(COLOR.rgb, p.rgb), OPACITY), (t.a == 0.0 ? 0.0 : 1.0) * COLOR.a);`;
|
|
21
|
-
const SLICE_SIZE = 4;
|
|
22
|
-
export const ENCODE24 = `vec3 encode24(highp float f) {
|
|
23
|
-
float F = abs(f);
|
|
24
|
-
float s = step( 0.0, -f );
|
|
25
|
-
float e = floor( log2(F) );
|
|
26
|
-
float m = exp2(- e) * F;
|
|
27
|
-
e = floor( log2(F) + 127.0 ) + floor( log2(m) );
|
|
28
|
-
return vec3(
|
|
29
|
-
( 128.0 * s + floor( e * exp2(-1.0) ) ) / 255.0,
|
|
30
|
-
( 128.0 * mod( e, 2.0 ) + mod( floor( m * 128.0 ), 128.0 ) ) / 255.0,
|
|
31
|
-
floor( mod( floor( m * exp2( 23.0 - 8.0) ), exp2(8.0) ) ) / 255.0);
|
|
32
|
-
}`;
|
|
33
|
-
export function drawnode_screen_nl() {
|
|
34
|
-
return new Program("drawnode_screen_nl", {
|
|
35
|
-
uniforms: {
|
|
36
|
-
projectionMatrix: "mat4",
|
|
37
|
-
viewMatrix: "mat4",
|
|
38
|
-
eyePositionHigh: "vec3",
|
|
39
|
-
eyePositionLow: "vec3",
|
|
40
|
-
samplerCount: "int",
|
|
41
|
-
tileOffsetArr: "vec4",
|
|
42
|
-
layerOpacityArr: "float",
|
|
43
|
-
samplerArr: "sampler2darray",
|
|
44
|
-
defaultTexture: "sampler2d",
|
|
45
|
-
height: "float"
|
|
46
|
-
}, attributes: {
|
|
47
|
-
aVertexPositionHigh: "vec3",
|
|
48
|
-
aVertexPositionLow: "vec3",
|
|
49
|
-
aTextureCoord: "vec2"
|
|
50
|
-
},
|
|
51
|
-
vertexShader: `precision highp float;
|
|
52
|
-
|
|
53
|
-
attribute vec3 aVertexPositionHigh;
|
|
54
|
-
attribute vec3 aVertexPositionLow;
|
|
55
|
-
attribute vec2 aTextureCoord;
|
|
56
|
-
|
|
57
|
-
uniform mat4 projectionMatrix;
|
|
58
|
-
uniform mat4 viewMatrix;
|
|
59
|
-
uniform vec3 eyePositionHigh;
|
|
60
|
-
uniform vec3 eyePositionLow;
|
|
61
|
-
uniform float height;
|
|
62
|
-
|
|
63
|
-
varying vec2 vTextureCoord;
|
|
64
|
-
|
|
65
|
-
void main(void) {
|
|
66
|
-
|
|
67
|
-
vTextureCoord = aTextureCoord;
|
|
68
|
-
vec3 nh = height * normalize(aVertexPositionHigh + aVertexPositionLow);
|
|
69
|
-
|
|
70
|
-
mat4 viewMatrixRTE = viewMatrix;
|
|
71
|
-
viewMatrixRTE[3] = vec4(0.0, 0.0, 0.0, 1.0);
|
|
72
|
-
mat4 m = projectionMatrix * viewMatrixRTE;
|
|
73
|
-
|
|
74
|
-
vec3 highDiff = aVertexPositionHigh - eyePositionHigh;
|
|
75
|
-
vec3 lowDiff = aVertexPositionLow - eyePositionLow + nh;
|
|
76
|
-
|
|
77
|
-
// This is works for Mac Chrome, prevent some weird optimization I suppose
|
|
78
|
-
gl_Position = m * vec4(highDiff * step(1.0, length(highDiff)) + lowDiff, 1.0);
|
|
79
|
-
}`,
|
|
80
|
-
fragmentShader: `precision highp float;
|
|
81
|
-
#define SLICE_SIZE ${SLICE_SIZE + 1}
|
|
82
|
-
uniform vec4 tileOffsetArr[SLICE_SIZE];
|
|
83
|
-
uniform float layerOpacityArr[SLICE_SIZE];
|
|
84
|
-
uniform sampler2D defaultTexture;
|
|
85
|
-
uniform sampler2D samplerArr[SLICE_SIZE];
|
|
86
|
-
uniform int samplerCount;
|
|
87
|
-
varying vec2 vTextureCoord;
|
|
88
|
-
|
|
89
|
-
${DEF_BLEND_WEBGL1}
|
|
90
|
-
|
|
91
|
-
void main(void) {
|
|
92
|
-
gl_FragColor = texture2D( defaultTexture, vTextureCoord );
|
|
93
|
-
if( samplerCount == 0 ) return;
|
|
94
|
-
|
|
95
|
-
vec4 src;
|
|
96
|
-
|
|
97
|
-
blend(gl_FragColor, samplerArr[0], tileOffsetArr[0], layerOpacityArr[0]);
|
|
98
|
-
if( samplerCount == 1 ) return;
|
|
99
|
-
|
|
100
|
-
blend(gl_FragColor, samplerArr[1], tileOffsetArr[1], layerOpacityArr[1]);
|
|
101
|
-
if( samplerCount == 2 ) return;
|
|
102
|
-
|
|
103
|
-
blend(gl_FragColor, samplerArr[2], tileOffsetArr[2], layerOpacityArr[2]);
|
|
104
|
-
if( samplerCount == 3 ) return;
|
|
105
|
-
|
|
106
|
-
blend(gl_FragColor, samplerArr[3], tileOffsetArr[3], layerOpacityArr[3]);
|
|
107
|
-
if( samplerCount == 4 ) return;
|
|
108
|
-
|
|
109
|
-
blend(gl_FragColor, samplerArr[4], tileOffsetArr[4], layerOpacityArr[4]);
|
|
110
|
-
}`
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
export function drawnode_screen_wl_webgl1NoAtmos() {
|
|
114
|
-
return new Program("drawnode_screen_wl", {
|
|
115
|
-
uniforms: {
|
|
116
|
-
projectionMatrix: "mat4",
|
|
117
|
-
viewMatrix: "mat4",
|
|
118
|
-
eyePositionHigh: "vec3",
|
|
119
|
-
eyePositionLow: "vec3",
|
|
120
|
-
height: "float",
|
|
121
|
-
uGlobalTextureCoord: "vec4",
|
|
122
|
-
uNormalMapBias: "vec3",
|
|
123
|
-
samplerCount: "int",
|
|
124
|
-
tileOffsetArr: "vec4",
|
|
125
|
-
layerOpacityArr: "float",
|
|
126
|
-
samplerArr: "sampler2darray",
|
|
127
|
-
defaultTexture: "sampler2d",
|
|
128
|
-
uNormalMap: "sampler2d",
|
|
129
|
-
nightTexture: "sampler2d",
|
|
130
|
-
specularTexture: "sampler2d",
|
|
131
|
-
lightPosition: "vec3",
|
|
132
|
-
diffuse: "vec3",
|
|
133
|
-
ambient: "vec3",
|
|
134
|
-
specular: "vec4",
|
|
135
|
-
camHeight: "float",
|
|
136
|
-
nightTextureCoefficient: "float"
|
|
137
|
-
}, attributes: {
|
|
138
|
-
aVertexPositionHigh: "vec3",
|
|
139
|
-
aVertexPositionLow: "vec3",
|
|
140
|
-
aTextureCoord: "vec2"
|
|
141
|
-
},
|
|
142
|
-
vertexShader: `
|
|
143
|
-
attribute vec3 aVertexPositionHigh;
|
|
144
|
-
attribute vec3 aVertexPositionLow;
|
|
145
|
-
attribute vec2 aTextureCoord;
|
|
146
|
-
|
|
147
|
-
uniform mat4 projectionMatrix;
|
|
148
|
-
uniform mat4 viewMatrix;
|
|
149
|
-
uniform vec4 uGlobalTextureCoord;
|
|
150
|
-
uniform vec3 uNormalMapBias;
|
|
151
|
-
uniform vec3 eyePositionHigh;
|
|
152
|
-
uniform vec3 eyePositionLow;
|
|
153
|
-
uniform float height;
|
|
154
|
-
|
|
155
|
-
varying vec4 vTextureCoord;
|
|
156
|
-
varying vec3 v_vertex;
|
|
157
|
-
varying vec3 cameraPosition;
|
|
158
|
-
varying vec2 vGlobalTextureCoord;
|
|
159
|
-
varying float v_height;
|
|
160
|
-
|
|
161
|
-
void main(void) {
|
|
162
|
-
|
|
163
|
-
vec3 aVertexPosition = aVertexPositionHigh + aVertexPositionLow;
|
|
164
|
-
vec3 nh = height * normalize(aVertexPosition);
|
|
165
|
-
|
|
166
|
-
vTextureCoord.xy = aTextureCoord;
|
|
167
|
-
vGlobalTextureCoord = uGlobalTextureCoord.xy + (uGlobalTextureCoord.zw - uGlobalTextureCoord.xy) * aTextureCoord;
|
|
168
|
-
vTextureCoord.zw = uNormalMapBias.z * ( aTextureCoord + uNormalMapBias.xy );
|
|
169
|
-
|
|
170
|
-
cameraPosition = eyePositionHigh + eyePositionLow;
|
|
171
|
-
|
|
172
|
-
vec3 highDiff = aVertexPositionHigh - eyePositionHigh;
|
|
173
|
-
vec3 lowDiff = aVertexPositionLow - eyePositionLow + nh;
|
|
174
|
-
|
|
175
|
-
mat4 viewMatrixRTE = viewMatrix;
|
|
176
|
-
viewMatrixRTE[3] = vec4(0.0, 0.0, 0.0, 1.0);
|
|
177
|
-
|
|
178
|
-
v_height = height;
|
|
179
|
-
v_vertex = aVertexPosition + nh;
|
|
180
|
-
|
|
181
|
-
gl_Position = projectionMatrix * viewMatrixRTE * vec4(highDiff * step(1.0, length(highDiff)) + lowDiff, 1.0);
|
|
182
|
-
}`,
|
|
183
|
-
fragmentShader: `
|
|
184
|
-
precision highp float;
|
|
185
|
-
|
|
186
|
-
#define SLICE_SIZE ${SLICE_SIZE + 1}
|
|
187
|
-
|
|
188
|
-
uniform vec4 specular;
|
|
189
|
-
uniform vec3 diffuse;
|
|
190
|
-
uniform vec3 ambient;
|
|
191
|
-
|
|
192
|
-
uniform sampler2D uNormalMap;
|
|
193
|
-
uniform sampler2D nightTexture;
|
|
194
|
-
uniform sampler2D specularTexture;
|
|
195
|
-
uniform sampler2D defaultTexture;
|
|
196
|
-
uniform sampler2D samplerArr[SLICE_SIZE];
|
|
197
|
-
|
|
198
|
-
uniform vec4 tileOffsetArr[SLICE_SIZE];
|
|
199
|
-
uniform vec3 lightPosition;
|
|
200
|
-
uniform float layerOpacityArr[SLICE_SIZE];
|
|
201
|
-
|
|
202
|
-
uniform int samplerCount;
|
|
203
|
-
uniform float nightTextureCoefficient;
|
|
204
|
-
uniform float camHeight;
|
|
205
|
-
|
|
206
|
-
varying vec4 vTextureCoord;
|
|
207
|
-
varying vec3 v_vertex;
|
|
208
|
-
varying vec3 cameraPosition;
|
|
209
|
-
varying vec2 vGlobalTextureCoord;
|
|
210
|
-
varying float v_height;
|
|
211
|
-
|
|
212
|
-
vec3 sunPos;
|
|
213
|
-
|
|
214
|
-
${NIGHT}
|
|
215
|
-
|
|
216
|
-
${DEF_BLEND_WEBGL1}
|
|
217
|
-
|
|
218
|
-
${UTILS}
|
|
219
|
-
|
|
220
|
-
void main(void) {
|
|
221
|
-
|
|
222
|
-
sunPos = lightPosition;
|
|
223
|
-
|
|
224
|
-
vec3 texNormal = texture2D(uNormalMap, vTextureCoord.zw).rgb;
|
|
225
|
-
vec3 normal = normalize((texNormal - 0.5) * 2.0);
|
|
226
|
-
|
|
227
|
-
float minH = 1200000.0;
|
|
228
|
-
float maxH = minH * 3.0;
|
|
229
|
-
float nightCoef = getLerpValue(minH, maxH, camHeight) * nightTextureCoefficient;
|
|
230
|
-
|
|
231
|
-
// if(camHeight > 6000000.0)
|
|
232
|
-
// {
|
|
233
|
-
// normal = normalize(v_vertex);
|
|
234
|
-
// }
|
|
235
|
-
|
|
236
|
-
vec3 lightDir = normalize(sunPos);
|
|
237
|
-
vec3 viewDir = normalize(cameraPosition - v_vertex);
|
|
238
|
-
|
|
239
|
-
float overGround = 1.0 - step(0.1, v_height);
|
|
240
|
-
|
|
241
|
-
float shininess = texture2D( specularTexture, vGlobalTextureCoord.st ).r * 255.0 * overGround;
|
|
242
|
-
vec3 reflectionDirection = reflect(-lightDir, normal);
|
|
243
|
-
float reflection = max( dot(reflectionDirection, viewDir), 0.0);
|
|
244
|
-
vec3 spec = specular.rgb * pow( reflection, specular.w) * shininess;
|
|
245
|
-
float diffuseLightWeighting = max(dot(normal, lightDir), 0.0);
|
|
246
|
-
vec4 nightImageColor = texture2D( nightTexture, vGlobalTextureCoord.st );
|
|
247
|
-
vec3 night = nightStep * (.18 - diffuseLightWeighting * 3.0) * nightImageColor.rgb * nightCoef;
|
|
248
|
-
night *= overGround * step(0.0, night);
|
|
249
|
-
vec4 lightWeighting = vec4(ambient + diffuse * diffuseLightWeighting + night, 1.0);
|
|
250
|
-
|
|
251
|
-
gl_FragColor = texture2D( defaultTexture, vTextureCoord.xy );
|
|
252
|
-
if( samplerCount == 0 ) {
|
|
253
|
-
gl_FragColor = gl_FragColor * lightWeighting + vec4(spec, 0.0);
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
vec4 src;
|
|
258
|
-
|
|
259
|
-
blend(gl_FragColor, samplerArr[0], tileOffsetArr[0], layerOpacityArr[0]);
|
|
260
|
-
if( samplerCount == 1 ) {
|
|
261
|
-
gl_FragColor = gl_FragColor * lightWeighting + vec4(spec, 0.0);
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
blend(gl_FragColor, samplerArr[1], tileOffsetArr[1], layerOpacityArr[1]);
|
|
266
|
-
if( samplerCount == 2 ) {
|
|
267
|
-
gl_FragColor = gl_FragColor * lightWeighting + vec4(spec, 0.0);
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
blend(gl_FragColor, samplerArr[2], tileOffsetArr[2], layerOpacityArr[2]);
|
|
272
|
-
if( samplerCount == 3 ) {
|
|
273
|
-
gl_FragColor = gl_FragColor * lightWeighting + vec4(spec, 0.0);
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
blend(gl_FragColor, samplerArr[3], tileOffsetArr[3], layerOpacityArr[3]);
|
|
278
|
-
if( samplerCount == 4 ) {
|
|
279
|
-
gl_FragColor = gl_FragColor * lightWeighting + vec4(spec, 0.0);
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
blend(gl_FragColor, samplerArr[4], tileOffsetArr[4], layerOpacityArr[4]);
|
|
284
|
-
gl_FragColor = gl_FragColor * lightWeighting + vec4(spec, 0.0);
|
|
285
|
-
}`
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
export function drawnode_screen_wl_webgl2NoAtmos() {
|
|
289
|
-
return new Program("drawnode_screen_wl", {
|
|
290
|
-
uniforms: {
|
|
291
|
-
projectionMatrix: "mat4",
|
|
292
|
-
viewMatrix: "mat4",
|
|
293
|
-
eyePositionHigh: "vec3",
|
|
294
|
-
eyePositionLow: "vec3",
|
|
295
|
-
height: "float",
|
|
296
|
-
uGlobalTextureCoord: "vec4",
|
|
297
|
-
uNormalMapBias: "vec3",
|
|
298
|
-
samplerCount: "int",
|
|
299
|
-
tileOffsetArr: "vec4",
|
|
300
|
-
layerOpacityArr: "float",
|
|
301
|
-
samplerArr: "sampler2darray",
|
|
302
|
-
defaultTexture: "sampler2d",
|
|
303
|
-
uNormalMap: "sampler2d",
|
|
304
|
-
nightTexture: "sampler2d",
|
|
305
|
-
specularTexture: "sampler2d",
|
|
306
|
-
lightPosition: "vec3",
|
|
307
|
-
diffuse: "vec3",
|
|
308
|
-
ambient: "vec3",
|
|
309
|
-
specular: "vec4",
|
|
310
|
-
camHeight: "float",
|
|
311
|
-
nightTextureCoefficient: "float",
|
|
312
|
-
transitionOpacity: "float"
|
|
313
|
-
}, attributes: {
|
|
314
|
-
aVertexPositionHigh: "vec3",
|
|
315
|
-
aVertexPositionLow: "vec3",
|
|
316
|
-
aTextureCoord: "vec2"
|
|
317
|
-
},
|
|
318
|
-
vertexShader: `#version 300 es
|
|
319
|
-
|
|
320
|
-
precision highp float;
|
|
321
|
-
|
|
322
|
-
in vec3 aVertexPositionHigh;
|
|
323
|
-
in vec3 aVertexPositionLow;
|
|
324
|
-
in vec2 aTextureCoord;
|
|
325
|
-
|
|
326
|
-
uniform mat4 projectionMatrix;
|
|
327
|
-
uniform mat4 viewMatrix;
|
|
328
|
-
uniform vec4 uGlobalTextureCoord;
|
|
329
|
-
uniform vec3 uNormalMapBias;
|
|
330
|
-
uniform vec3 eyePositionHigh;
|
|
331
|
-
uniform vec3 eyePositionLow;
|
|
332
|
-
uniform float height;
|
|
333
|
-
|
|
334
|
-
out vec4 vTextureCoord;
|
|
335
|
-
out vec3 v_vertex;
|
|
336
|
-
out vec3 cameraPosition;
|
|
337
|
-
out vec2 vGlobalTextureCoord;
|
|
338
|
-
out float v_height;
|
|
339
|
-
|
|
340
|
-
void main(void) {
|
|
341
|
-
|
|
342
|
-
vec3 aVertexPosition = aVertexPositionHigh + aVertexPositionLow;
|
|
343
|
-
vec3 nh = height * normalize(aVertexPosition);
|
|
344
|
-
|
|
345
|
-
vTextureCoord.xy = aTextureCoord;
|
|
346
|
-
vGlobalTextureCoord = uGlobalTextureCoord.xy + (uGlobalTextureCoord.zw - uGlobalTextureCoord.xy) * aTextureCoord;
|
|
347
|
-
vTextureCoord.zw = uNormalMapBias.z * ( aTextureCoord + uNormalMapBias.xy );
|
|
348
|
-
|
|
349
|
-
cameraPosition = eyePositionHigh + eyePositionLow;
|
|
350
|
-
|
|
351
|
-
vec3 highDiff = aVertexPositionHigh - eyePositionHigh;
|
|
352
|
-
vec3 lowDiff = aVertexPositionLow - eyePositionLow + nh;
|
|
353
|
-
|
|
354
|
-
mat4 viewMatrixRTE = viewMatrix;
|
|
355
|
-
viewMatrixRTE[3] = vec4(0.0, 0.0, 0.0, 1.0);
|
|
356
|
-
|
|
357
|
-
v_height = height;
|
|
358
|
-
v_vertex = aVertexPosition + nh;
|
|
359
|
-
|
|
360
|
-
gl_Position = projectionMatrix * viewMatrixRTE * vec4(highDiff * step(1.0, length(highDiff)) + lowDiff, 1.0);
|
|
361
|
-
}`,
|
|
362
|
-
fragmentShader: `#version 300 es
|
|
363
|
-
|
|
364
|
-
precision highp float;
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
#define SLICE_SIZE ${SLICE_SIZE + 1}
|
|
368
|
-
|
|
369
|
-
uniform vec4 specular;
|
|
370
|
-
uniform vec3 diffuse;
|
|
371
|
-
uniform vec3 ambient;
|
|
372
|
-
|
|
373
|
-
uniform sampler2D uNormalMap;
|
|
374
|
-
uniform sampler2D nightTexture;
|
|
375
|
-
uniform sampler2D specularTexture;
|
|
376
|
-
uniform sampler2D defaultTexture;
|
|
377
|
-
uniform sampler2D samplerArr[SLICE_SIZE];
|
|
378
|
-
|
|
379
|
-
uniform vec4 tileOffsetArr[SLICE_SIZE];
|
|
380
|
-
uniform vec3 lightPosition;
|
|
381
|
-
uniform float layerOpacityArr[SLICE_SIZE];
|
|
382
|
-
|
|
383
|
-
uniform int samplerCount;
|
|
384
|
-
uniform float nightTextureCoefficient;
|
|
385
|
-
|
|
386
|
-
uniform float transitionOpacity;
|
|
387
|
-
|
|
388
|
-
uniform float camHeight;
|
|
389
|
-
|
|
390
|
-
in vec4 vTextureCoord;
|
|
391
|
-
in vec3 v_vertex;
|
|
392
|
-
in vec3 cameraPosition;
|
|
393
|
-
in vec2 vGlobalTextureCoord;
|
|
394
|
-
in float v_height;
|
|
395
|
-
|
|
396
|
-
vec3 sunPos;
|
|
397
|
-
|
|
398
|
-
layout(location = 0) out vec4 diffuseColor;
|
|
399
|
-
|
|
400
|
-
${NIGHT}
|
|
401
|
-
|
|
402
|
-
${DEF_BLEND}
|
|
403
|
-
|
|
404
|
-
${UTILS}
|
|
405
|
-
|
|
406
|
-
void main(void) {
|
|
407
|
-
|
|
408
|
-
sunPos = lightPosition;
|
|
409
|
-
|
|
410
|
-
vec3 texNormal = texture(uNormalMap, vTextureCoord.zw).rgb;
|
|
411
|
-
vec3 normal = normalize((texNormal - 0.5) * 2.0);
|
|
412
|
-
|
|
413
|
-
float minH = 1200000.0;
|
|
414
|
-
float maxH = minH * 3.0;
|
|
415
|
-
float nightCoef = getLerpValue(minH, maxH, camHeight) * nightTextureCoefficient;
|
|
416
|
-
|
|
417
|
-
// if(camHeight > 6000000.0)
|
|
418
|
-
// {
|
|
419
|
-
// normal = normalize(v_vertex);
|
|
420
|
-
// }
|
|
421
|
-
|
|
422
|
-
vec3 lightDir = normalize(sunPos);
|
|
423
|
-
vec3 viewDir = normalize(cameraPosition - v_vertex);
|
|
424
|
-
|
|
425
|
-
float overGround = 1.0 - step(0.1, v_height);
|
|
426
|
-
|
|
427
|
-
float shininess = texture( specularTexture, vGlobalTextureCoord.st ).r * 255.0 * overGround;
|
|
428
|
-
vec3 reflectionDirection = reflect(-lightDir, normal);
|
|
429
|
-
float reflection = max( dot(reflectionDirection, viewDir), 0.0);
|
|
430
|
-
vec3 spec = specular.rgb * pow( reflection, specular.w) * shininess;
|
|
431
|
-
float diffuseLightWeighting = max(dot(normal, lightDir), 0.0);
|
|
432
|
-
vec4 nightImageColor = texture( nightTexture, vGlobalTextureCoord.st );
|
|
433
|
-
vec3 night = nightStep * (.18 - diffuseLightWeighting * 3.0) * nightImageColor.rgb * nightCoef;
|
|
434
|
-
night *= overGround * step(0.0, night);
|
|
435
|
-
vec4 lightWeighting = vec4(ambient + diffuse * diffuseLightWeighting + night, 1.0);
|
|
436
|
-
|
|
437
|
-
diffuseColor = texture( defaultTexture, vTextureCoord.xy );
|
|
438
|
-
|
|
439
|
-
if( samplerCount == 0 ) {
|
|
440
|
-
diffuseColor = diffuseColor * lightWeighting + vec4(spec, 0.0);
|
|
441
|
-
diffuseColor *= transitionOpacity;
|
|
442
|
-
return;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
vec4 src;
|
|
446
|
-
|
|
447
|
-
blend(diffuseColor, samplerArr[0], tileOffsetArr[0], layerOpacityArr[0]);
|
|
448
|
-
if( samplerCount == 1 ) {
|
|
449
|
-
diffuseColor = diffuseColor * lightWeighting + vec4(spec, 0.0);
|
|
450
|
-
diffuseColor *= transitionOpacity;
|
|
451
|
-
return;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
blend(diffuseColor, samplerArr[1], tileOffsetArr[1], layerOpacityArr[1]);
|
|
455
|
-
if( samplerCount == 2 ) {
|
|
456
|
-
diffuseColor = diffuseColor * lightWeighting + vec4(spec, 0.0);
|
|
457
|
-
diffuseColor *= transitionOpacity;
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
blend(diffuseColor, samplerArr[2], tileOffsetArr[2], layerOpacityArr[2]);
|
|
462
|
-
if( samplerCount == 3 ) {
|
|
463
|
-
diffuseColor = diffuseColor * lightWeighting + vec4(spec, 0.0);
|
|
464
|
-
diffuseColor *= transitionOpacity;
|
|
465
|
-
return;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
blend(diffuseColor, samplerArr[3], tileOffsetArr[3], layerOpacityArr[3]);
|
|
469
|
-
if( samplerCount == 4 ) {
|
|
470
|
-
diffuseColor = diffuseColor * lightWeighting + vec4(spec, 0.0);
|
|
471
|
-
diffuseColor *= transitionOpacity;
|
|
472
|
-
return;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
blend(diffuseColor, samplerArr[4], tileOffsetArr[4], layerOpacityArr[4]);
|
|
476
|
-
diffuseColor = diffuseColor * lightWeighting + vec4(spec, 0.0);
|
|
477
|
-
diffuseColor *= transitionOpacity;
|
|
478
|
-
}`
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
export function drawnode_screen_wl_webgl2Atmos(atmosParams) {
|
|
482
|
-
return new Program("drawnode_screen_wl", {
|
|
483
|
-
uniforms: {
|
|
484
|
-
projectionMatrix: "mat4",
|
|
485
|
-
viewMatrix: "mat4",
|
|
486
|
-
eyePositionHigh: "vec3",
|
|
487
|
-
eyePositionLow: "vec3",
|
|
488
|
-
height: "float",
|
|
489
|
-
uGlobalTextureCoord: "vec4",
|
|
490
|
-
uNormalMapBias: "vec3",
|
|
491
|
-
samplerCount: "int",
|
|
492
|
-
tileOffsetArr: "vec4",
|
|
493
|
-
layerOpacityArr: "float",
|
|
494
|
-
samplerArr: "sampler2darray",
|
|
495
|
-
defaultTexture: "sampler2d",
|
|
496
|
-
uNormalMap: "sampler2d",
|
|
497
|
-
nightTexture: "sampler2d",
|
|
498
|
-
specularTexture: "sampler2d",
|
|
499
|
-
lightPosition: "vec3",
|
|
500
|
-
diffuse: "vec3",
|
|
501
|
-
ambient: "vec3",
|
|
502
|
-
specular: "vec4",
|
|
503
|
-
transmittanceTexture: "sampler2D",
|
|
504
|
-
scatteringTexture: "sampler2D",
|
|
505
|
-
camHeight: "float",
|
|
506
|
-
nightTextureCoefficient: "float",
|
|
507
|
-
maxMinOpacity: "vec2",
|
|
508
|
-
transitionOpacity: "float"
|
|
509
|
-
}, attributes: {
|
|
510
|
-
aVertexPositionHigh: "vec3",
|
|
511
|
-
aVertexPositionLow: "vec3",
|
|
512
|
-
aTextureCoord: "vec2"
|
|
513
|
-
},
|
|
514
|
-
vertexShader: `#version 300 es
|
|
515
|
-
|
|
516
|
-
precision highp float;
|
|
517
|
-
|
|
518
|
-
in vec3 aVertexPositionHigh;
|
|
519
|
-
in vec3 aVertexPositionLow;
|
|
520
|
-
in vec2 aTextureCoord;
|
|
521
|
-
|
|
522
|
-
uniform mat4 projectionMatrix;
|
|
523
|
-
uniform mat4 viewMatrix;
|
|
524
|
-
uniform vec4 uGlobalTextureCoord;
|
|
525
|
-
uniform vec3 uNormalMapBias;
|
|
526
|
-
uniform vec3 eyePositionHigh;
|
|
527
|
-
uniform vec3 eyePositionLow;
|
|
528
|
-
uniform float height;
|
|
529
|
-
|
|
530
|
-
out vec4 vTextureCoord;
|
|
531
|
-
out vec3 v_vertex;
|
|
532
|
-
out vec3 cameraPosition;
|
|
533
|
-
out vec2 vGlobalTextureCoord;
|
|
534
|
-
out float v_height;
|
|
535
|
-
|
|
536
|
-
void main(void) {
|
|
537
|
-
|
|
538
|
-
vec3 aVertexPosition = aVertexPositionHigh + aVertexPositionLow;
|
|
539
|
-
vec3 nh = height * normalize(aVertexPosition);
|
|
540
|
-
|
|
541
|
-
vTextureCoord.xy = aTextureCoord;
|
|
542
|
-
vGlobalTextureCoord = uGlobalTextureCoord.xy + (uGlobalTextureCoord.zw - uGlobalTextureCoord.xy) * aTextureCoord;
|
|
543
|
-
vTextureCoord.zw = uNormalMapBias.z * ( aTextureCoord + uNormalMapBias.xy );
|
|
544
|
-
|
|
545
|
-
cameraPosition = eyePositionHigh + eyePositionLow;
|
|
546
|
-
|
|
547
|
-
vec3 highDiff = aVertexPositionHigh - eyePositionHigh;
|
|
548
|
-
vec3 lowDiff = aVertexPositionLow - eyePositionLow + nh;
|
|
549
|
-
|
|
550
|
-
mat4 viewMatrixRTE = viewMatrix;
|
|
551
|
-
viewMatrixRTE[3] = vec4(0.0, 0.0, 0.0, 1.0);
|
|
552
|
-
|
|
553
|
-
v_height = height;
|
|
554
|
-
v_vertex = aVertexPosition + nh;
|
|
555
|
-
|
|
556
|
-
gl_Position = projectionMatrix * viewMatrixRTE * vec4(highDiff * step(1.0, length(highDiff)) + lowDiff, 1.0);
|
|
557
|
-
}`,
|
|
558
|
-
fragmentShader: `#version 300 es
|
|
559
|
-
|
|
560
|
-
precision highp float;
|
|
561
|
-
|
|
562
|
-
#define SLICE_SIZE ${SLICE_SIZE + 1}
|
|
563
|
-
|
|
564
|
-
uniform vec4 specular;
|
|
565
|
-
uniform vec3 diffuse;
|
|
566
|
-
uniform vec3 ambient;
|
|
567
|
-
|
|
568
|
-
uniform vec3 lightPosition;
|
|
569
|
-
|
|
570
|
-
uniform sampler2D uNormalMap;
|
|
571
|
-
uniform sampler2D nightTexture;
|
|
572
|
-
uniform sampler2D specularTexture;
|
|
573
|
-
uniform sampler2D transmittanceTexture;
|
|
574
|
-
uniform sampler2D scatteringTexture;
|
|
575
|
-
uniform sampler2D defaultTexture;
|
|
576
|
-
uniform sampler2D samplerArr[SLICE_SIZE];
|
|
577
|
-
|
|
578
|
-
uniform vec4 tileOffsetArr[SLICE_SIZE];
|
|
579
|
-
uniform float layerOpacityArr[SLICE_SIZE];
|
|
580
|
-
|
|
581
|
-
uniform int samplerCount;
|
|
582
|
-
uniform float nightTextureCoefficient;
|
|
583
|
-
|
|
584
|
-
uniform vec2 maxMinOpacity;
|
|
585
|
-
uniform float camHeight;
|
|
586
|
-
|
|
587
|
-
uniform float transitionOpacity;
|
|
588
|
-
|
|
589
|
-
in vec4 vTextureCoord;
|
|
590
|
-
in vec3 v_vertex;
|
|
591
|
-
in vec3 cameraPosition;
|
|
592
|
-
in vec2 vGlobalTextureCoord;
|
|
593
|
-
in float v_height;
|
|
594
|
-
|
|
595
|
-
vec3 sunPos;
|
|
596
|
-
|
|
597
|
-
layout(location = 0) out vec4 diffuseColor;
|
|
598
|
-
|
|
599
|
-
${NIGHT}
|
|
600
|
-
|
|
601
|
-
${DEF_BLEND}
|
|
602
|
-
|
|
603
|
-
${COMMON(atmosParams)}
|
|
604
|
-
|
|
605
|
-
vec3 transmittanceFromTexture(float height, float angle)
|
|
606
|
-
{
|
|
607
|
-
float u = (angle + 1.0) * 0.5;
|
|
608
|
-
float v = height / ATMOS_HEIGHT;
|
|
609
|
-
return texture(transmittanceTexture, vec2(u, v)).xyz;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
vec3 multipleScatteringContributionFromTexture(float height, float angle)
|
|
613
|
-
{
|
|
614
|
-
float u = (angle + 1.0) * 0.5;
|
|
615
|
-
float v = height / ATMOS_HEIGHT;
|
|
616
|
-
return texture(scatteringTexture, vec2(u, v)).xyz;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
void getSunIlluminance(in vec3 point, in vec3 lightDir, out vec3 sunIlluminance)
|
|
620
|
-
{
|
|
621
|
-
// float r = length(point);
|
|
622
|
-
// float mu_s = dot(point, sun_direction) / r;
|
|
623
|
-
// float height = r - BOTTOM_RADIUS;
|
|
624
|
-
|
|
625
|
-
float mu_s = dot(normalize(point), lightDir);
|
|
626
|
-
float height = length(point) - BOTTOM_RADIUS;
|
|
627
|
-
sunIlluminance = SUN_INTENSITY * transmittanceFromTexture(height, mu_s);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
void atmosGroundColor(out vec4 fragColor, in vec3 normal)
|
|
631
|
-
{
|
|
632
|
-
vec3 cameraPosition = cameraPosition;
|
|
633
|
-
|
|
634
|
-
if(length(cameraPosition * SPHERE_TO_ELLIPSOID_SCALE) < BOTTOM_RADIUS + 1.0){
|
|
635
|
-
cameraPosition = normalize(cameraPosition * SPHERE_TO_ELLIPSOID_SCALE) * (BOTTOM_RADIUS + 1.0) / SPHERE_TO_ELLIPSOID_SCALE;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
vec3 rayDirection = normalize(v_vertex - cameraPosition);
|
|
639
|
-
vec3 lightDir = normalize(sunPos);
|
|
640
|
-
|
|
641
|
-
rayDirection = normalize(rayDirection * SPHERE_TO_ELLIPSOID_SCALE);
|
|
642
|
-
vec3 camPos = cameraPosition * SPHERE_TO_ELLIPSOID_SCALE;
|
|
643
|
-
lightDir = normalize(lightDir * SPHERE_TO_ELLIPSOID_SCALE);
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
vec3 light = vec3(0.0);
|
|
647
|
-
vec3 transmittanceFromCameraToSpace = vec3(1.0);
|
|
648
|
-
float offset = 0.0;
|
|
649
|
-
float distanceToSpace = 0.0;
|
|
650
|
-
|
|
651
|
-
intersectSphere(camPos, rayDirection, TOP_RADIUS, offset, distanceToSpace);
|
|
652
|
-
|
|
653
|
-
vec3 rayOrigin = camPos;
|
|
654
|
-
|
|
655
|
-
// above atmosphere
|
|
656
|
-
if (offset > 0.0)
|
|
657
|
-
{
|
|
658
|
-
// intersection of camera ray with atmosphere
|
|
659
|
-
rayOrigin += rayDirection * offset;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
float height = length(rayOrigin) - BOTTOM_RADIUS;
|
|
663
|
-
float rayAngle = dot(rayOrigin, rayDirection) / length(rayOrigin);
|
|
664
|
-
bool cameraBelow = rayAngle < 0.0;
|
|
665
|
-
|
|
666
|
-
transmittanceFromCameraToSpace = transmittanceFromTexture(height, cameraBelow ? -rayAngle : rayAngle);
|
|
667
|
-
|
|
668
|
-
float phaseAngle = dot(lightDir, rayDirection);
|
|
669
|
-
float rayleighPhase = rayleighPhase(phaseAngle);
|
|
670
|
-
float miePhase = miePhase(phaseAngle);
|
|
671
|
-
|
|
672
|
-
float distanceToGround = 0.0;
|
|
673
|
-
|
|
674
|
-
bool hitGround = intersectSphere(camPos, rayDirection, BOTTOM_RADIUS, distanceToGround) && distanceToGround > 0.0;
|
|
675
|
-
//intersectSphere(camPos, rayDirection, BOTTOM_RADIUS, distanceToGround);
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
if(length(v_vertex * SPHERE_TO_ELLIPSOID_SCALE) > BOTTOM_RADIUS){
|
|
679
|
-
distanceToGround = distance(camPos, v_vertex * SPHERE_TO_ELLIPSOID_SCALE);
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
float segmentLength = (distanceToGround - max(offset, 0.0)) / float(SAMPLE_COUNT);
|
|
683
|
-
|
|
684
|
-
float t = segmentLength * 0.5;
|
|
685
|
-
|
|
686
|
-
vec3 transmittanceCamera;
|
|
687
|
-
vec3 transmittanceLight;
|
|
688
|
-
|
|
689
|
-
for (int i = 0; i < SAMPLE_COUNT; i++)
|
|
690
|
-
{
|
|
691
|
-
vec3 position = rayOrigin + t * rayDirection;
|
|
692
|
-
float height = length(position) - BOTTOM_RADIUS;
|
|
693
|
-
vec3 up = position / length(position);
|
|
694
|
-
float rayAngle = dot(up, rayDirection);
|
|
695
|
-
float lightAngle = dot(up, lightDir);
|
|
696
|
-
vec3 transmittanceToSpace = transmittanceFromTexture(height, cameraBelow ? -rayAngle : rayAngle);
|
|
697
|
-
transmittanceCamera = cameraBelow ? (transmittanceToSpace / transmittanceFromCameraToSpace) : (transmittanceFromCameraToSpace / transmittanceToSpace);
|
|
698
|
-
transmittanceLight = transmittanceFromTexture(height, lightAngle);
|
|
699
|
-
vec2 opticalDensity = exp(-height / rayleighMieHeights);
|
|
700
|
-
vec3 scatteredLight = transmittanceLight * (rayleighScatteringCoefficient * opticalDensity.x * rayleighPhase + mieScatteringCoefficient * opticalDensity.y * miePhase);
|
|
701
|
-
scatteredLight += multipleScatteringContributionFromTexture(height, lightAngle) * (rayleighScatteringCoefficient * opticalDensity.x + mieScatteringCoefficient * opticalDensity.y);
|
|
702
|
-
light += transmittanceCamera * scatteredLight * segmentLength;
|
|
703
|
-
t += segmentLength;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
light *= SUN_INTENSITY;
|
|
707
|
-
|
|
708
|
-
vec3 hitPoint = camPos + rayDirection * distanceToGround;
|
|
709
|
-
vec3 up = normalize(hitPoint);
|
|
710
|
-
float diffuseAngle = max(dot(up, lightDir), 0.0);
|
|
711
|
-
|
|
712
|
-
float lightAngle = dot(normal, lightDir);
|
|
713
|
-
vec3 tA = transmittanceCamera * GROUND_ALBEDO * SUN_INTENSITY;
|
|
714
|
-
vec3 scatteringLight = multipleScatteringContributionFromTexture(height, lightAngle);
|
|
715
|
-
vec3 diffuseTransmittanceLight = transmittanceLight * diffuseAngle;
|
|
716
|
-
light += tA * (scatteringLight + diffuseTransmittanceLight);
|
|
717
|
-
|
|
718
|
-
fragColor = vec4(pow(light * 8.0, vec3(1.0 / 2.2)), 1.0);
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
void getAtmosFadingOpacity(out float opacity)
|
|
722
|
-
{
|
|
723
|
-
float c = length(cameraPosition);
|
|
724
|
-
float maxDist = sqrt(c * c - BOTTOM_RADIUS * BOTTOM_RADIUS);
|
|
725
|
-
float minDist = c - BOTTOM_RADIUS;
|
|
726
|
-
float vertDist = distance(cameraPosition, v_vertex);
|
|
727
|
-
opacity = clamp(maxMinOpacity.y + ( maxMinOpacity.x - maxMinOpacity.y) * getLerpValue(minDist, maxDist, vertDist), 0.0, 1.0);
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
void main(void) {
|
|
731
|
-
|
|
732
|
-
sunPos = lightPosition;
|
|
733
|
-
|
|
734
|
-
vec3 texNormal = texture(uNormalMap, vTextureCoord.zw).rgb;
|
|
735
|
-
vec3 normal = normalize((texNormal - 0.5) * 2.0);
|
|
736
|
-
|
|
737
|
-
float minH = 1200000.0;
|
|
738
|
-
float maxH = minH * 3.0;
|
|
739
|
-
float nightCoef = getLerpValue(minH, maxH, camHeight) * nightTextureCoefficient;
|
|
740
|
-
|
|
741
|
-
// if(camHeight > 6000000.0)
|
|
742
|
-
// {
|
|
743
|
-
// normal = normalize(v_vertex);
|
|
744
|
-
// }
|
|
745
|
-
|
|
746
|
-
vec3 lightDir = normalize(sunPos);
|
|
747
|
-
vec3 viewDir = normalize(cameraPosition - v_vertex);
|
|
748
|
-
|
|
749
|
-
vec4 atmosColor;
|
|
750
|
-
atmosGroundColor(atmosColor, normal);
|
|
751
|
-
|
|
752
|
-
vec3 sunIlluminance;
|
|
753
|
-
getSunIlluminance(v_vertex * SPHERE_TO_ELLIPSOID_SCALE, lightDir * SPHERE_TO_ELLIPSOID_SCALE, sunIlluminance);
|
|
754
|
-
|
|
755
|
-
float overGround = 1.0 - step(0.1, v_height);
|
|
756
|
-
|
|
757
|
-
float shininess = texture( specularTexture, vGlobalTextureCoord.st ).r * 255.0 * overGround;
|
|
758
|
-
vec3 reflectionDirection = reflect(-lightDir, normal);
|
|
759
|
-
float reflection = max( dot(reflectionDirection, viewDir), 0.0);
|
|
760
|
-
vec3 spec = sunIlluminance * specular.rgb * pow( reflection, specular.w) * shininess;
|
|
761
|
-
float diffuseLightWeighting = max(dot(normal, lightDir), 0.0);
|
|
762
|
-
|
|
763
|
-
vec4 nightImageColor = texture( nightTexture, vGlobalTextureCoord.st );
|
|
764
|
-
vec3 night = nightStep * (.18 - diffuseLightWeighting * 3.0) * nightImageColor.rgb * nightCoef;
|
|
765
|
-
night *= overGround * step(0.0, night);
|
|
766
|
-
vec4 lightWeighting = vec4(ambient + sunIlluminance * diffuse * diffuseLightWeighting + night, 1.0);
|
|
767
|
-
|
|
768
|
-
float fadingOpacity;
|
|
769
|
-
getAtmosFadingOpacity(fadingOpacity);
|
|
770
|
-
|
|
771
|
-
getSunIlluminance(cameraPosition, viewDir * SPHERE_TO_ELLIPSOID_SCALE, sunIlluminance);
|
|
772
|
-
|
|
773
|
-
spec *= sunIlluminance;
|
|
774
|
-
|
|
775
|
-
diffuseColor = texture( defaultTexture, vTextureCoord.xy );
|
|
776
|
-
if( samplerCount == 0 ) {
|
|
777
|
-
diffuseColor = mix(diffuseColor * lightWeighting, atmosColor, fadingOpacity) + vec4(spec, 0.0);
|
|
778
|
-
diffuseColor *= transitionOpacity;
|
|
779
|
-
return;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
vec4 src;
|
|
783
|
-
|
|
784
|
-
blend(diffuseColor, samplerArr[0], tileOffsetArr[0], layerOpacityArr[0]);
|
|
785
|
-
if( samplerCount == 1 ) {
|
|
786
|
-
diffuseColor = mix(diffuseColor * lightWeighting, atmosColor * diffuseColor.a, fadingOpacity) + vec4(spec, 0.0);
|
|
787
|
-
diffuseColor *= transitionOpacity;
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
blend(diffuseColor, samplerArr[1], tileOffsetArr[1], layerOpacityArr[1]);
|
|
792
|
-
if( samplerCount == 2 ) {
|
|
793
|
-
diffuseColor = mix(diffuseColor * lightWeighting, atmosColor * diffuseColor.a, fadingOpacity) + vec4(spec, 0.0);
|
|
794
|
-
diffuseColor *= transitionOpacity;
|
|
795
|
-
return;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
blend(diffuseColor, samplerArr[2], tileOffsetArr[2], layerOpacityArr[2]);
|
|
799
|
-
if( samplerCount == 3 ) {
|
|
800
|
-
diffuseColor = mix(diffuseColor * lightWeighting, atmosColor * diffuseColor.a, fadingOpacity) + vec4(spec, 0.0);
|
|
801
|
-
diffuseColor *= transitionOpacity;
|
|
802
|
-
return;
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
blend(diffuseColor, samplerArr[3], tileOffsetArr[3], layerOpacityArr[3]);
|
|
806
|
-
if( samplerCount == 4 ) {
|
|
807
|
-
diffuseColor = mix(diffuseColor * lightWeighting, atmosColor * diffuseColor.a, fadingOpacity) + vec4(spec, 0.0);
|
|
808
|
-
diffuseColor *= transitionOpacity;
|
|
809
|
-
return;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
blend(diffuseColor, samplerArr[4], tileOffsetArr[4], layerOpacityArr[4]);
|
|
813
|
-
diffuseColor = mix(diffuseColor * lightWeighting, atmosColor * diffuseColor.a, fadingOpacity) + vec4(spec, 0.0);
|
|
814
|
-
diffuseColor *= transitionOpacity;
|
|
815
|
-
}`
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
export function drawnode_colorPicking() {
|
|
819
|
-
return new Program("drawnode_colorPicking", {
|
|
820
|
-
uniforms: {
|
|
821
|
-
projectionMatrix: "mat4",
|
|
822
|
-
viewMatrix: "mat4",
|
|
823
|
-
eyePositionHigh: "vec3",
|
|
824
|
-
eyePositionLow: "vec3",
|
|
825
|
-
samplerCount: "int",
|
|
826
|
-
tileOffsetArr: "vec4",
|
|
827
|
-
samplerArr: "sampler2darray",
|
|
828
|
-
pickingMaskArr: "sampler2darray",
|
|
829
|
-
pickingColorArr: "vec4",
|
|
830
|
-
height: "float"
|
|
831
|
-
}, attributes: {
|
|
832
|
-
aVertexPositionHigh: "vec3", aVertexPositionLow: "vec3", aTextureCoord: "vec2"
|
|
833
|
-
},
|
|
834
|
-
vertexShader: `precision highp float;
|
|
835
|
-
|
|
836
|
-
attribute vec3 aVertexPositionHigh;
|
|
837
|
-
attribute vec3 aVertexPositionLow;
|
|
838
|
-
attribute vec2 aTextureCoord;
|
|
839
|
-
|
|
840
|
-
uniform mat4 projectionMatrix;
|
|
841
|
-
uniform mat4 viewMatrix;
|
|
842
|
-
uniform vec3 eyePositionHigh;
|
|
843
|
-
uniform vec3 eyePositionLow;
|
|
844
|
-
uniform float height;
|
|
845
|
-
|
|
846
|
-
varying vec2 vTextureCoord;
|
|
847
|
-
|
|
848
|
-
void main(void) {
|
|
849
|
-
|
|
850
|
-
vTextureCoord = aTextureCoord;
|
|
851
|
-
|
|
852
|
-
mat4 viewMatrixRTE = viewMatrix;
|
|
853
|
-
viewMatrixRTE[3] = vec4(0.0, 0.0, 0.0, 1.0);
|
|
854
|
-
|
|
855
|
-
mat4 m = projectionMatrix * viewMatrixRTE;
|
|
856
|
-
|
|
857
|
-
vec3 nh = height * normalize(aVertexPositionHigh + aVertexPositionLow);
|
|
858
|
-
|
|
859
|
-
vec3 highDiff = aVertexPositionHigh - eyePositionHigh;
|
|
860
|
-
vec3 lowDiff = aVertexPositionLow - eyePositionLow + nh;
|
|
861
|
-
|
|
862
|
-
gl_Position = m * vec4(highDiff * step(1.0, length(highDiff)) + lowDiff, 1.0);
|
|
863
|
-
}`,
|
|
864
|
-
fragmentShader: `precision highp float;
|
|
865
|
-
#define SLICE_SIZE ${SLICE_SIZE + 1}
|
|
866
|
-
uniform vec4 tileOffsetArr[SLICE_SIZE];
|
|
867
|
-
uniform vec4 pickingColorArr[SLICE_SIZE];
|
|
868
|
-
uniform sampler2D samplerArr[SLICE_SIZE];
|
|
869
|
-
uniform sampler2D pickingMaskArr[SLICE_SIZE];
|
|
870
|
-
uniform int samplerCount;
|
|
871
|
-
varying vec2 vTextureCoord;
|
|
872
|
-
|
|
873
|
-
${DEF_BLEND_PICKING}
|
|
874
|
-
|
|
875
|
-
void main(void) {
|
|
876
|
-
gl_FragColor = vec4(0.0);
|
|
877
|
-
if( samplerCount == 0 ) return;
|
|
878
|
-
|
|
879
|
-
vec2 tc;
|
|
880
|
-
vec4 t;
|
|
881
|
-
vec4 p;
|
|
882
|
-
|
|
883
|
-
blendPicking(gl_FragColor, tileOffsetArr[0], samplerArr[0], pickingMaskArr[0], pickingColorArr[0], 1.0);
|
|
884
|
-
if( samplerCount == 1 ) return;
|
|
885
|
-
|
|
886
|
-
blendPicking(gl_FragColor, tileOffsetArr[1], samplerArr[1], pickingMaskArr[1], pickingColorArr[1], 1.0);
|
|
887
|
-
if( samplerCount == 2 ) return;
|
|
888
|
-
|
|
889
|
-
blendPicking(gl_FragColor, tileOffsetArr[2], samplerArr[2], pickingMaskArr[2], pickingColorArr[2], 1.0);
|
|
890
|
-
if( samplerCount == 3 ) return;
|
|
891
|
-
|
|
892
|
-
blendPicking(gl_FragColor, tileOffsetArr[3], samplerArr[3], pickingMaskArr[3], pickingColorArr[3], 1.0);
|
|
893
|
-
if( samplerCount == 4 ) return;
|
|
894
|
-
|
|
895
|
-
blendPicking(gl_FragColor, tileOffsetArr[4], samplerArr[4], pickingMaskArr[4], pickingColorArr[4], 1.0);
|
|
896
|
-
}`
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
export function drawnode_heightPicking() {
|
|
900
|
-
return new Program("drawnode_heightPicking", {
|
|
901
|
-
uniforms: {
|
|
902
|
-
projectionMatrix: "mat4",
|
|
903
|
-
viewMatrix: "mat4",
|
|
904
|
-
height: "float",
|
|
905
|
-
eyePositionHigh: "vec3",
|
|
906
|
-
eyePositionLow: "vec3"
|
|
907
|
-
}, attributes: {
|
|
908
|
-
aVertexPositionHigh: "vec3", aVertexPositionLow: "vec3"
|
|
909
|
-
},
|
|
910
|
-
vertexShader: `precision highp float;
|
|
911
|
-
|
|
912
|
-
attribute vec3 aVertexPositionHigh;
|
|
913
|
-
attribute vec3 aVertexPositionLow;
|
|
914
|
-
|
|
915
|
-
uniform mat4 projectionMatrix;
|
|
916
|
-
uniform mat4 viewMatrix;
|
|
917
|
-
uniform vec3 eyePositionHigh;
|
|
918
|
-
uniform vec3 eyePositionLow;
|
|
919
|
-
uniform float height;
|
|
920
|
-
|
|
921
|
-
varying vec4 vert;
|
|
922
|
-
|
|
923
|
-
void main(void) {
|
|
924
|
-
|
|
925
|
-
mat4 viewMatrixRTE = viewMatrix;
|
|
926
|
-
viewMatrixRTE[3] = vec4(0.0, 0.0, 0.0, 1.0);
|
|
927
|
-
|
|
928
|
-
vec3 nh = height * normalize(aVertexPositionHigh + aVertexPositionLow);
|
|
929
|
-
|
|
930
|
-
vec3 eyePosition = eyePositionHigh + eyePositionLow;
|
|
931
|
-
vec3 vertexPosition = aVertexPositionHigh + aVertexPositionLow;
|
|
932
|
-
|
|
933
|
-
vec3 highDiff = aVertexPositionHigh - eyePositionHigh;
|
|
934
|
-
vec3 lowDiff = aVertexPositionLow - eyePositionLow + nh;
|
|
935
|
-
|
|
936
|
-
vert = viewMatrixRTE * vec4(highDiff * step(1.0, length(highDiff)) + lowDiff, 1.0);
|
|
937
|
-
|
|
938
|
-
gl_Position = projectionMatrix * vert;
|
|
939
|
-
}`,
|
|
940
|
-
fragmentShader: `precision highp float;
|
|
941
|
-
|
|
942
|
-
varying vec4 vert;
|
|
943
|
-
|
|
944
|
-
${ENCODE24}
|
|
945
|
-
|
|
946
|
-
void main(void) {
|
|
947
|
-
gl_FragColor = vec4(encode24(length(vert.xyz)), 1.0);
|
|
948
|
-
}`
|
|
949
|
-
});
|
|
950
|
-
}
|
|
951
|
-
export function drawnode_depth() {
|
|
952
|
-
return new Program("drawnode_depth", {
|
|
953
|
-
uniforms: {
|
|
954
|
-
projectionMatrix: "mat4",
|
|
955
|
-
viewMatrix: "mat4",
|
|
956
|
-
height: "float",
|
|
957
|
-
eyePositionHigh: "vec3",
|
|
958
|
-
eyePositionLow: "vec3",
|
|
959
|
-
frustumPickingColor: "float"
|
|
960
|
-
}, attributes: {
|
|
961
|
-
aVertexPositionHigh: "vec3",
|
|
962
|
-
aVertexPositionLow: "vec3"
|
|
963
|
-
},
|
|
964
|
-
vertexShader: `#version 300 es
|
|
965
|
-
|
|
966
|
-
precision highp float;
|
|
967
|
-
|
|
968
|
-
in vec3 aVertexPositionHigh;
|
|
969
|
-
in vec3 aVertexPositionLow;
|
|
970
|
-
|
|
971
|
-
uniform mat4 projectionMatrix;
|
|
972
|
-
uniform mat4 viewMatrix;
|
|
973
|
-
uniform vec3 eyePositionHigh;
|
|
974
|
-
uniform vec3 eyePositionLow;
|
|
975
|
-
uniform float height;
|
|
976
|
-
|
|
977
|
-
void main(void) {
|
|
978
|
-
|
|
979
|
-
mat4 viewMatrixRTE = viewMatrix;
|
|
980
|
-
viewMatrixRTE[3] = vec4(0.0, 0.0, 0.0, 1.0);
|
|
981
|
-
|
|
982
|
-
mat4 m = projectionMatrix * viewMatrixRTE;
|
|
983
|
-
|
|
984
|
-
vec3 nh = height * normalize(aVertexPositionHigh + aVertexPositionLow);
|
|
985
|
-
|
|
986
|
-
vec3 eyePosition = eyePositionHigh + eyePositionLow;
|
|
987
|
-
vec3 vertexPosition = aVertexPositionHigh + aVertexPositionLow;
|
|
988
|
-
|
|
989
|
-
vec3 highDiff = aVertexPositionHigh - eyePositionHigh;
|
|
990
|
-
vec3 lowDiff = aVertexPositionLow - eyePositionLow + nh;
|
|
991
|
-
|
|
992
|
-
gl_Position = m * vec4(highDiff * step(1.0, length(highDiff)) + lowDiff, 1.0);
|
|
993
|
-
}`,
|
|
994
|
-
fragmentShader: `#version 300 es
|
|
995
|
-
|
|
996
|
-
precision highp float;
|
|
997
|
-
|
|
998
|
-
uniform float frustumPickingColor;
|
|
999
|
-
|
|
1000
|
-
layout(location = 0) out vec4 frustumColor;
|
|
1001
|
-
layout(location = 1) out vec4 depthColor;
|
|
1002
|
-
|
|
1003
|
-
void main(void) {
|
|
1004
|
-
frustumColor = vec4(frustumPickingColor, frustumPickingColor, frustumPickingColor, 1.0);
|
|
1005
|
-
depthColor = vec4(gl_FragCoord.z, gl_FragCoord.z, gl_FragCoord.z, 1.0);
|
|
1006
|
-
}`
|
|
1007
|
-
});
|
|
1008
|
-
}
|