@openglobus/og 0.18.0 → 0.18.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/README.md +8 -8
- package/lib/@openglobus/og.esm.js +2 -0
- package/lib/@openglobus/og.esm.js.map +1 -0
- package/lib/@openglobus/og.umd.js +2 -0
- package/lib/@openglobus/og.umd.js.map +1 -0
- package/lib/js/Clock.d.ts +106 -0
- package/{src/Clock.ts → lib/js/Clock.js} +31 -126
- package/lib/js/Deferred.d.ts +6 -0
- package/lib/js/Deferred.js +13 -0
- package/lib/js/Events.d.ts +90 -0
- package/{src/Events.ts → lib/js/Events.js} +29 -84
- package/lib/js/Extent.d.ts +145 -0
- package/{src/Extent.ts → lib/js/Extent.js} +74 -120
- package/lib/js/Globe.d.ts +132 -0
- package/{src/Globe.ts → lib/js/Globe.js} +61 -159
- package/lib/js/ImageCanvas.d.ts +128 -0
- package/{src/ImageCanvas.ts → lib/js/ImageCanvas.js} +24 -65
- package/lib/js/Lock.d.ts +15 -0
- package/{src/Lock.ts → lib/js/Lock.js} +7 -21
- package/lib/js/LonLat.d.ts +128 -0
- package/{src/LonLat.ts → lib/js/LonLat.js} +44 -75
- package/lib/js/Object3d.d.ts +49 -0
- package/{src/Object3d.ts → lib/js/Object3d.js} +64 -184
- package/lib/js/Popup.d.ts +46 -0
- package/{src/Popup.ts → lib/js/Popup.js} +42 -110
- package/lib/js/QueueArray.d.ts +16 -0
- package/{src/QueueArray.ts → lib/js/QueueArray.js} +12 -25
- package/lib/js/Rectangle.d.ts +76 -0
- package/{src/Rectangle.ts → lib/js/Rectangle.js} +12 -50
- package/lib/js/Stack.d.ts +20 -0
- package/{src/Stack.ts → lib/js/Stack.js} +13 -29
- package/lib/js/astro/astro.d.ts +39 -0
- package/{src/astro/astro.ts → lib/js/astro/astro.js} +2 -8
- package/lib/js/astro/earth.d.ts +8 -0
- package/{src/astro/earth.ts → lib/js/astro/earth.js} +3 -39
- package/lib/js/astro/jd.d.ts +234 -0
- package/{src/astro/jd.ts → lib/js/astro/jd.js} +55 -134
- package/lib/js/astro/orbit.d.ts +5 -0
- package/{src/astro/orbit.ts → lib/js/astro/orbit.js} +26 -39
- package/lib/js/astro/rotation.d.ts +2 -0
- package/{src/astro/rotation.ts → lib/js/astro/rotation.js} +2 -11
- package/lib/js/bv/Box.d.ts +32 -0
- package/{src/bv/Box.ts → lib/js/bv/Box.js} +7 -35
- package/lib/js/bv/Sphere.d.ts +37 -0
- package/{src/bv/Sphere.ts → lib/js/bv/Sphere.js} +6 -34
- package/{src/bv/index.ts → lib/js/bv/index.d.ts} +0 -1
- package/lib/js/bv/index.js +3 -0
- package/lib/js/camera/Camera.d.ts +314 -0
- package/{src/camera/Camera.ts → lib/js/camera/Camera.js} +77 -326
- package/lib/js/camera/Frustum.d.ts +139 -0
- package/{src/camera/Frustum.ts → lib/js/camera/Frustum.js} +66 -185
- package/lib/js/camera/PlanetCamera.d.ts +234 -0
- package/{src/camera/PlanetCamera.ts → lib/js/camera/PlanetCamera.js} +65 -338
- package/{src/camera/index.ts → lib/js/camera/index.d.ts} +0 -1
- package/lib/js/camera/index.js +3 -0
- package/lib/js/cons.d.ts +40 -0
- package/{src/cons.ts → lib/js/cons.js} +10 -22
- package/lib/js/control/Atmosphere.d.ts +16 -0
- package/{src/control/Atmosphere.ts → lib/js/control/Atmosphere.js} +33 -86
- package/lib/js/control/CompassButton.d.ts +16 -0
- package/{src/control/CompassButton.ts → lib/js/control/CompassButton.js} +18 -43
- package/lib/js/control/Control.d.ts +100 -0
- package/{src/control/Control.ts → lib/js/control/Control.js} +22 -89
- package/lib/js/control/DebugInfo.d.ts +25 -0
- package/{src/control/DebugInfo.ts → lib/js/control/DebugInfo.js} +38 -84
- package/lib/js/control/DrawingSwitcher.d.ts +13 -0
- package/{src/control/DrawingSwitcher.ts → lib/js/control/DrawingSwitcher.js} +13 -30
- package/lib/js/control/EarthCoordinates.d.ts +41 -0
- package/{src/control/EarthCoordinates.ts → lib/js/control/EarthCoordinates.js} +58 -119
- package/lib/js/control/EarthNavigation.d.ts +50 -0
- package/{src/control/EarthNavigation.ts → lib/js/control/EarthNavigation.js} +70 -161
- package/lib/js/control/GeoImageDragControl.d.ts +22 -0
- package/{src/control/GeoImageDragControl.ts → lib/js/control/GeoImageDragControl.js} +26 -49
- package/lib/js/control/KeyboardNavigation.d.ts +28 -0
- package/{src/control/KeyboardNavigation.ts → lib/js/control/KeyboardNavigation.js} +67 -92
- package/lib/js/control/LayerAnimation.d.ts +71 -0
- package/{src/control/LayerAnimation.ts → lib/js/control/LayerAnimation.js} +82 -162
- package/lib/js/control/LayerSwitcher.d.ts +21 -0
- package/{src/control/LayerSwitcher.ts → lib/js/control/LayerSwitcher.js} +16 -41
- package/lib/js/control/Lighting.d.ts +49 -0
- package/{src/control/Lighting.ts → lib/js/control/Lighting.js} +106 -219
- package/lib/js/control/MouseNavigation.d.ts +62 -0
- package/{src/control/MouseNavigation.ts → lib/js/control/MouseNavigation.js} +105 -211
- package/lib/js/control/MouseWheelZoomControl.d.ts +44 -0
- package/lib/js/control/MouseWheelZoomControl.js +181 -0
- package/lib/js/control/RulerSwitcher.d.ts +17 -0
- package/{src/control/RulerSwitcher.ts → lib/js/control/RulerSwitcher.js} +13 -28
- package/lib/js/control/ScaleControl.d.ts +24 -0
- package/lib/js/control/ScaleControl.js +91 -0
- package/lib/js/control/SegmentBoundVisualization.d.ts +12 -0
- package/lib/js/control/SegmentBoundVisualization.js +37 -0
- package/lib/js/control/ShowFps.d.ts +9 -0
- package/lib/js/control/ShowFps.js +20 -0
- package/lib/js/control/SimpleNavigation.d.ts +25 -0
- package/{src/control/SimpleNavigation.ts → lib/js/control/SimpleNavigation.js} +29 -51
- package/lib/js/control/SimpleSkyBackground.d.ts +15 -0
- package/{src/control/SimpleSkyBackground.ts → lib/js/control/SimpleSkyBackground.js} +21 -48
- package/lib/js/control/Sun.d.ts +33 -0
- package/{src/control/Sun.ts → lib/js/control/Sun.js} +34 -85
- package/lib/js/control/ToggleWireframe.d.ts +14 -0
- package/lib/js/control/ToggleWireframe.js +28 -0
- package/lib/js/control/TouchNavigation.d.ts +52 -0
- package/{src/control/TouchNavigation.ts → lib/js/control/TouchNavigation.js} +88 -193
- package/lib/js/control/ZoomControl.d.ts +27 -0
- package/{src/control/ZoomControl.ts → lib/js/control/ZoomControl.js} +25 -50
- package/lib/js/control/drawing/DrawingControl.d.ts +12 -0
- package/{src/control/drawing/DrawingControl.ts → lib/js/control/drawing/DrawingControl.js} +10 -20
- package/lib/js/control/drawing/LineStringDrawingScene.d.ts +15 -0
- package/{src/control/drawing/LineStringDrawingScene.ts → lib/js/control/drawing/LineStringDrawingScene.js} +28 -85
- package/lib/js/control/drawing/PolygonDrawingScene.d.ts +98 -0
- package/{src/control/drawing/PolygonDrawingScene.ts → lib/js/control/drawing/PolygonDrawingScene.js} +190 -388
- package/lib/js/control/elevationProfile/ElevationProfile.d.ts +61 -0
- package/{src/control/elevationProfile/ElevationProfile.ts → lib/js/control/elevationProfile/ElevationProfile.js} +56 -148
- package/lib/js/control/heightRuler/HeightRuler.d.ts +7 -0
- package/{src/control/heightRuler/HeightRuler.ts → lib/js/control/heightRuler/HeightRuler.js} +4 -9
- package/lib/js/control/heightRuler/HeightRulerScene.d.ts +35 -0
- package/{src/control/heightRuler/HeightRulerScene.ts → lib/js/control/heightRuler/HeightRulerScene.js} +47 -99
- package/lib/js/control/heightRuler/HeightRulerSwitcher.d.ts +6 -0
- package/{src/control/heightRuler/HeightRulerSwitcher.ts → lib/js/control/heightRuler/HeightRulerSwitcher.js} +2 -4
- package/{src/control/index.ts → lib/js/control/index.d.ts} +1 -18
- package/lib/js/control/index.js +28 -0
- package/lib/js/control/ruler/Ruler.d.ts +13 -0
- package/lib/js/control/ruler/Ruler.js +23 -0
- package/lib/js/control/ruler/RulerScene.d.ts +88 -0
- package/lib/js/control/ruler/RulerScene.js +324 -0
- package/lib/js/control/selection/Selection.d.ts +55 -0
- package/{src/control/selection/Selection.ts → lib/js/control/selection/Selection.js} +15 -34
- package/lib/js/control/selection/SelectionScene.d.ts +44 -0
- package/{src/control/selection/SelectionScene.ts → lib/js/control/selection/SelectionScene.js} +26 -113
- package/lib/js/control/timeline/TimelineControl.d.ts +18 -0
- package/{src/control/timeline/TimelineControl.ts → lib/js/control/timeline/TimelineControl.js} +13 -43
- package/lib/js/control/timeline/TimelineModel.d.ts +41 -0
- package/{src/control/timeline/TimelineModel.ts → lib/js/control/timeline/TimelineModel.js} +26 -74
- package/lib/js/control/timeline/TimelineView.d.ts +85 -0
- package/{src/control/timeline/TimelineView.ts → lib/js/control/timeline/TimelineView.js} +133 -281
- package/lib/js/control/timeline/timelineUtils.d.ts +12 -0
- package/lib/js/control/timeline/timelineUtils.js +112 -0
- package/lib/js/control/visibleExtent/Segment.d.ts +277 -0
- package/{src → lib/js}/control/visibleExtent/Segment.js +145 -698
- package/lib/js/control/visibleExtent/VisibleExtent.d.ts +5 -0
- package/{src → lib/js}/control/visibleExtent/VisibleExtent.js +1 -18
- package/lib/js/control/visibleExtent/drawnode.d.ts +7 -0
- package/{src/control/visibleExtent/drawnode.ts → lib/js/control/visibleExtent/drawnode.js} +1 -28
- package/lib/js/ellipsoid/Ellipsoid.d.ts +187 -0
- package/{src/ellipsoid/Ellipsoid.ts → lib/js/ellipsoid/Ellipsoid.js} +82 -267
- package/lib/js/ellipsoid/index.d.ts +3 -0
- package/lib/js/ellipsoid/index.js +3 -0
- package/lib/js/ellipsoid/wgs84.d.ts +6 -0
- package/{src/ellipsoid/wgs84.ts → lib/js/ellipsoid/wgs84.js} +1 -2
- package/lib/js/entity/BaseBillboard.d.ts +222 -0
- package/{src/entity/BaseBillboard.ts → lib/js/entity/BaseBillboard.js} +48 -165
- package/lib/js/entity/BaseBillboardHandler.d.ts +81 -0
- package/{src/entity/BaseBillboardHandler.ts → lib/js/entity/BaseBillboardHandler.js} +139 -365
- package/lib/js/entity/Billboard.d.ts +113 -0
- package/{src/entity/Billboard.ts → lib/js/entity/Billboard.js} +19 -83
- package/lib/js/entity/BillboardHandler.d.ts +15 -0
- package/{src/entity/BillboardHandler.ts → lib/js/entity/BillboardHandler.js} +27 -59
- package/lib/js/entity/Entity.d.ts +354 -0
- package/{src/entity/Entity.ts → lib/js/entity/Entity.js} +101 -373
- package/lib/js/entity/EntityCollection.d.ts +364 -0
- package/{src/entity/EntityCollection.ts → lib/js/entity/EntityCollection.js} +51 -353
- package/lib/js/entity/GeoObject.d.ts +138 -0
- package/{src/entity/GeoObject.ts → lib/js/entity/GeoObject.js} +41 -146
- package/lib/js/entity/GeoObjectHandler.d.ts +99 -0
- package/{src/entity/GeoObjectHandler.ts → lib/js/entity/GeoObjectHandler.js} +162 -423
- package/lib/js/entity/Geometry.d.ts +111 -0
- package/lib/js/entity/Geometry.js +283 -0
- package/lib/js/entity/GeometryHandler.d.ts +84 -0
- package/{src/entity/GeometryHandler.ts → lib/js/entity/GeometryHandler.js} +162 -657
- package/lib/js/entity/Label.d.ts +207 -0
- package/{src/entity/Label.ts → lib/js/entity/Label.js} +62 -164
- package/lib/js/entity/LabelHandler.d.ts +65 -0
- package/{src/entity/LabelHandler.ts → lib/js/entity/LabelHandler.js} +175 -408
- package/lib/js/entity/LabelWorker.d.ts +15 -0
- package/{src/entity/LabelWorker.ts → lib/js/entity/LabelWorker.js} +24 -45
- package/lib/js/entity/PointCloud.d.ts +179 -0
- package/{src/entity/PointCloud.ts → lib/js/entity/PointCloud.js} +65 -265
- package/lib/js/entity/PointCloudHandler.d.ts +42 -0
- package/{src/entity/PointCloudHandler.ts → lib/js/entity/PointCloudHandler.js} +19 -62
- package/lib/js/entity/Polyline.d.ts +337 -0
- package/{src/entity/Polyline.ts → lib/js/entity/Polyline.js} +289 -924
- package/lib/js/entity/PolylineHandler.d.ts +22 -0
- package/{src/entity/PolylineHandler.ts → lib/js/entity/PolylineHandler.js} +12 -37
- package/lib/js/entity/Ray.d.ts +133 -0
- package/{src/entity/Ray.ts → lib/js/entity/Ray.js} +26 -146
- package/lib/js/entity/RayHandler.d.ts +70 -0
- package/{src/entity/RayHandler.ts → lib/js/entity/RayHandler.js} +102 -342
- package/lib/js/entity/Strip.d.ts +127 -0
- package/{src/entity/Strip.ts → lib/js/entity/Strip.js} +102 -372
- package/lib/js/entity/StripHandler.d.ts +42 -0
- package/{src/entity/StripHandler.ts → lib/js/entity/StripHandler.js} +22 -74
- package/{src/entity/index.ts → lib/js/entity/index.d.ts} +1 -2
- package/lib/js/entity/index.js +11 -0
- package/lib/js/index.d.ts +33 -0
- package/lib/js/index.js +33 -0
- package/lib/js/input/KeyboardHandler.d.ts +33 -0
- package/{src/input/KeyboardHandler.ts → lib/js/input/KeyboardHandler.js} +45 -84
- package/lib/js/input/MouseHandler.d.ts +16 -0
- package/{src/input/MouseHandler.ts → lib/js/input/MouseHandler.js} +12 -36
- package/lib/js/input/TouchHandler.d.ts +11 -0
- package/{src/input/TouchHandler.ts → lib/js/input/TouchHandler.js} +11 -23
- package/lib/js/input/input.d.ts +3 -0
- package/{src/input/input.ts → lib/js/input/input.js} +1 -1
- package/lib/js/layer/BaseGeoImage.d.ts +145 -0
- package/{src/layer/BaseGeoImage.ts → lib/js/layer/BaseGeoImage.js} +70 -235
- package/lib/js/layer/CanvasTiles.d.ts +103 -0
- package/{src/layer/CanvasTiles.ts → lib/js/layer/CanvasTiles.js} +54 -146
- package/lib/js/layer/GeoImage.d.ts +61 -0
- package/{src/layer/GeoImage.ts → lib/js/layer/GeoImage.js} +24 -54
- package/lib/js/layer/GeoTexture2d.d.ts +17 -0
- package/lib/js/layer/GeoTexture2d.js +37 -0
- package/lib/js/layer/GeoVideo.d.ts +68 -0
- package/{src/layer/GeoVideo.ts → lib/js/layer/GeoVideo.js} +31 -61
- package/lib/js/layer/KML.d.ts +72 -0
- package/{src/layer/KML.ts → lib/js/layer/KML.js} +94 -138
- package/lib/js/layer/Layer.d.ts +401 -0
- package/{src/layer/Layer.ts → lib/js/layer/Layer.js} +92 -443
- package/lib/js/layer/Material.d.ts +34 -0
- package/{src/layer/Material.ts → lib/js/layer/Material.js} +9 -43
- package/lib/js/layer/Vector.d.ts +244 -0
- package/{src/layer/Vector.ts → lib/js/layer/Vector.js} +147 -418
- package/lib/js/layer/WMS.d.ts +75 -0
- package/{src/layer/WMS.ts → lib/js/layer/WMS.js} +18 -100
- package/lib/js/layer/XYZ.d.ts +149 -0
- package/{src/layer/XYZ.ts → lib/js/layer/XYZ.js} +71 -171
- package/lib/js/layer/index.d.ts +11 -0
- package/lib/js/layer/index.js +11 -0
- package/lib/js/light/LightSource.d.ts +174 -0
- package/{src/light/LightSource.ts → lib/js/light/LightSource.js} +22 -131
- package/lib/js/math/Line2.d.ts +11 -0
- package/{src/math/Line2.ts → lib/js/math/Line2.js} +5 -15
- package/lib/js/math/Line3.d.ts +28 -0
- package/lib/js/math/Line3.js +85 -0
- package/lib/js/math/Mat3.d.ts +77 -0
- package/{src/math/Mat3.ts → lib/js/math/Mat3.js} +22 -51
- package/lib/js/math/Mat4.d.ts +195 -0
- package/{src/math/Mat4.ts → lib/js/math/Mat4.js} +53 -219
- package/lib/js/math/Plane.d.ts +20 -0
- package/{src/math/Plane.ts → lib/js/math/Plane.js} +26 -40
- package/lib/js/math/Quat.d.ts +373 -0
- package/{src/math/Quat.ts → lib/js/math/Quat.js} +106 -319
- package/lib/js/math/Ray.d.ts +76 -0
- package/{src/math/Ray.ts → lib/js/math/Ray.js} +21 -66
- package/lib/js/math/Vec2.d.ts +310 -0
- package/{src/math/Vec2.ts → lib/js/math/Vec2.js} +55 -121
- package/lib/js/math/Vec3.d.ts +472 -0
- package/{src/math/Vec3.ts → lib/js/math/Vec3.js} +103 -236
- package/lib/js/math/Vec4.d.ts +163 -0
- package/{src/math/Vec4.ts → lib/js/math/Vec4.js} +23 -79
- package/lib/js/math/coder.d.ts +51 -0
- package/{src/math/coder.ts → lib/js/math/coder.js} +14 -20
- package/lib/js/math/index.d.ts +11 -0
- package/lib/js/math/index.js +11 -0
- package/lib/js/math.d.ts +266 -0
- package/{src/math.ts → lib/js/math.js} +37 -85
- package/lib/js/mercator.d.ts +92 -0
- package/{src/mercator.ts → lib/js/mercator.js} +13 -37
- package/lib/js/proj/EPSG3857.d.ts +9 -0
- package/{src/proj/EPSG3857.ts → lib/js/proj/EPSG3857.js} +0 -2
- package/lib/js/proj/EPSG4326.d.ts +9 -0
- package/{src/proj/EPSG4326.ts → lib/js/proj/EPSG4326.js} +0 -2
- package/lib/js/proj/Proj.d.ts +43 -0
- package/{src/proj/Proj.ts → lib/js/proj/Proj.js} +4 -29
- package/lib/js/quadTree/EPSG4326QuadTreeStrategy.d.ts +6 -0
- package/lib/js/quadTree/EPSG4326QuadTreeStrategy.js +17 -0
- package/lib/js/quadTree/EarthQuadTreeStrategy.d.ts +6 -0
- package/lib/js/quadTree/EarthQuadTreeStrategy.js +19 -0
- package/lib/js/quadTree/EntityCollectionNode.d.ts +54 -0
- package/{src/quadTree/EntityCollectionNode.ts → lib/js/quadTree/EntityCollectionNode.js} +83 -150
- package/lib/js/quadTree/MarsQuadTreeStrategy.d.ts +6 -0
- package/lib/js/quadTree/MarsQuadTreeStrategy.js +17 -0
- package/lib/js/quadTree/Node.d.ts +61 -0
- package/{src/quadTree/Node.ts → lib/js/quadTree/Node.js} +140 -357
- package/lib/js/quadTree/QuadTreeStrategy.d.ts +25 -0
- package/{src/quadTree/QuadTreeStrategy.ts → lib/js/quadTree/QuadTreeStrategy.js} +13 -44
- package/lib/js/quadTree/Wgs84QuadTreeStrategy.d.ts +6 -0
- package/lib/js/quadTree/Wgs84QuadTreeStrategy.js +15 -0
- package/lib/js/quadTree/index.d.ts +12 -0
- package/lib/js/quadTree/index.js +12 -0
- package/lib/js/quadTree/quadTree.d.ts +40 -0
- package/{src/quadTree/quadTree.ts → lib/js/quadTree/quadTree.js} +0 -9
- package/lib/js/renderer/Renderer.d.ts +311 -0
- package/{src/renderer/Renderer.ts → lib/js/renderer/Renderer.js} +169 -611
- package/lib/js/renderer/RendererEvents.d.ts +237 -0
- package/{src/renderer/RendererEvents.ts → lib/js/renderer/RendererEvents.js} +134 -471
- package/lib/js/scene/Axes.d.ts +12 -0
- package/lib/js/scene/Axes.js +59 -0
- package/lib/js/scene/BaseNode.d.ts +61 -0
- package/{src/scene/BaseNode.ts → lib/js/scene/BaseNode.js} +11 -57
- package/lib/js/scene/Planet.d.ts +623 -0
- package/{src/scene/Planet.ts → lib/js/scene/Planet.js} +251 -935
- package/lib/js/scene/RenderNode.d.ts +150 -0
- package/{src/scene/RenderNode.ts → lib/js/scene/RenderNode.js} +33 -138
- package/lib/js/scene/SkyBox.d.ts +13 -0
- package/{src/scene/SkyBox.ts → lib/js/scene/SkyBox.js} +16 -37
- package/{src/scene/index.ts → lib/js/scene/index.d.ts} +0 -1
- package/lib/js/scene/index.js +5 -0
- package/lib/js/segment/Segment.d.ts +278 -0
- package/{src/segment/Segment.ts → lib/js/segment/Segment.js} +242 -913
- package/lib/js/segment/SegmentLonLat.d.ts +48 -0
- package/{src/segment/SegmentLonLat.ts → lib/js/segment/SegmentLonLat.js} +58 -132
- package/lib/js/segment/SegmentLonLatWgs84.d.ts +10 -0
- package/lib/js/segment/SegmentLonLatWgs84.js +23 -0
- package/lib/js/segment/Slice.d.ts +13 -0
- package/{src/segment/Slice.ts → lib/js/segment/Slice.js} +4 -22
- package/lib/js/segment/segmentHelper.d.ts +18 -0
- package/{src/segment/segmentHelper.ts → lib/js/segment/segmentHelper.js} +30 -88
- package/lib/js/shaders/atmos.d.ts +4 -0
- package/{src/shaders/atmos.ts → lib/js/shaders/atmos.js} +8 -26
- package/lib/js/shaders/billboard.d.ts +3 -0
- package/{src/shaders/billboard.ts → lib/js/shaders/billboard.js} +9 -18
- package/lib/js/shaders/bloom.d.ts +2 -0
- package/{src/shaders/bloom.ts → lib/js/shaders/bloom.js} +5 -8
- package/lib/js/shaders/blur.d.ts +3 -0
- package/{src/shaders/blur.ts → lib/js/shaders/blur.js} +11 -19
- package/lib/js/shaders/depth.d.ts +2 -0
- package/{src/shaders/depth.ts → lib/js/shaders/depth.js} +3 -6
- package/lib/js/shaders/drawnode.d.ts +8 -0
- package/{src/shaders/drawnode.ts → lib/js/shaders/drawnode.js} +23 -75
- package/lib/js/shaders/geoObject.d.ts +3 -0
- package/{src/shaders/geoObject.ts → lib/js/shaders/geoObject.js} +51 -63
- package/lib/js/shaders/label.d.ts +4 -0
- package/{src/shaders/label.ts → lib/js/shaders/label.js} +12 -25
- package/lib/js/shaders/lumFilter.d.ts +2 -0
- package/{src/shaders/lumFilter.ts → lib/js/shaders/lumFilter.js} +4 -7
- package/lib/js/shaders/pickingMask.d.ts +2 -0
- package/{src/shaders/pickingMask.ts → lib/js/shaders/pickingMask.js} +5 -8
- package/lib/js/shaders/pointCloud.d.ts +2 -0
- package/{src/shaders/pointCloud.ts → lib/js/shaders/pointCloud.js} +4 -7
- package/lib/js/shaders/polyline.d.ts +3 -0
- package/{src/shaders/polyline.ts → lib/js/shaders/polyline.js} +7 -22
- package/lib/js/shaders/ray.d.ts +2 -0
- package/{src/shaders/ray.ts → lib/js/shaders/ray.js} +4 -7
- package/lib/js/shaders/screenFrame.d.ts +2 -0
- package/{src/shaders/screenFrame.ts → lib/js/shaders/screenFrame.js} +5 -8
- package/lib/js/shaders/skybox.d.ts +2 -0
- package/{src/shaders/skybox.ts → lib/js/shaders/skybox.js} +10 -13
- package/lib/js/shaders/toneMapping.d.ts +2 -0
- package/{src/shaders/toneMapping.ts → lib/js/shaders/toneMapping.js} +5 -8
- package/lib/js/shaders/utils.d.ts +1 -0
- package/{src/shaders/utils.ts → lib/js/shaders/utils.js} +1 -1
- package/lib/js/terrain/BilTerrain.d.ts +18 -0
- package/{src/terrain/BilTerrain.ts → lib/js/terrain/BilTerrain.js} +21 -118
- package/lib/js/terrain/EmptyTerrain.d.ts +106 -0
- package/{src/terrain/EmptyTerrain.ts → lib/js/terrain/EmptyTerrain.js} +20 -144
- package/lib/js/terrain/Geoid.d.ts +33 -0
- package/lib/js/terrain/Geoid.js +191 -0
- package/lib/js/terrain/GlobusTerrain.d.ts +134 -0
- package/{src/terrain/GlobusTerrain.ts → lib/js/terrain/GlobusTerrain.js} +82 -239
- package/lib/js/terrain/MapboxTerrain.d.ts +21 -0
- package/{src/terrain/MapboxTerrain.ts → lib/js/terrain/MapboxTerrain.js} +46 -215
- package/{src/terrain/index.ts → lib/js/terrain/index.d.ts} +0 -1
- package/lib/js/terrain/index.js +5 -0
- package/lib/js/ui/Button.d.ts +32 -0
- package/lib/js/ui/Button.js +78 -0
- package/lib/js/ui/ButtonGroup.d.ts +16 -0
- package/lib/js/ui/ButtonGroup.js +41 -0
- package/lib/js/ui/Dialog.d.ts +55 -0
- package/lib/js/ui/Dialog.js +173 -0
- package/lib/js/ui/Slider.d.ts +38 -0
- package/lib/js/ui/Slider.js +129 -0
- package/lib/js/ui/ToggleButton.d.ts +20 -0
- package/lib/js/ui/ToggleButton.js +42 -0
- package/lib/js/ui/View.d.ts +37 -0
- package/{src/ui/View.ts → lib/js/ui/View.js} +31 -77
- package/lib/js/ui/icons.d.ts +1 -0
- package/{src/ui/icons.ts → lib/js/ui/icons.js} +1 -1
- package/lib/js/utils/BaseWorker.d.ts +14 -0
- package/{src/utils/BaseWorker.ts → lib/js/utils/BaseWorker.js} +15 -28
- package/lib/js/utils/FontAtlas.d.ts +82 -0
- package/{src/utils/FontAtlas.ts → lib/js/utils/FontAtlas.js} +45 -181
- package/lib/js/utils/GeoImageCreator.d.ts +34 -0
- package/{src/utils/GeoImageCreator.ts → lib/js/utils/GeoImageCreator.js} +34 -91
- package/lib/js/utils/ImagesCacheManager.d.ts +22 -0
- package/{src/utils/ImagesCacheManager.ts → lib/js/utils/ImagesCacheManager.js} +16 -38
- package/lib/js/utils/Loader.d.ts +63 -0
- package/lib/js/utils/Loader.js +156 -0
- package/lib/js/utils/NormalMapCreator.d.ts +52 -0
- package/{src/utils/NormalMapCreator.ts → lib/js/utils/NormalMapCreator.js} +64 -195
- package/lib/js/utils/PlainSegmentWorker.d.ts +24 -0
- package/{src/utils/PlainSegmentWorker.ts → lib/js/utils/PlainSegmentWorker.js} +24 -56
- package/lib/js/utils/TerrainWorker.d.ts +28 -0
- package/{src/utils/TerrainWorker.ts → lib/js/utils/TerrainWorker.js} +19 -56
- package/lib/js/utils/TextureAtlas.d.ts +113 -0
- package/{src/utils/TextureAtlas.ts → lib/js/utils/TextureAtlas.js} +40 -131
- package/lib/js/utils/VectorTileCreator.d.ts +18 -0
- package/{src/utils/VectorTileCreator.ts → lib/js/utils/VectorTileCreator.js} +61 -147
- package/lib/js/utils/colorTable.d.ts +3 -0
- package/{src/utils/colorTable.ts → lib/js/utils/colorTable.js} +2 -2
- package/lib/js/utils/earcut.d.ts +7 -0
- package/{src/utils/earcut.ts → lib/js/utils/earcut.js} +95 -223
- package/lib/js/utils/objParser.d.ts +24 -0
- package/{src/utils/objParser.ts → lib/js/utils/objParser.js} +38 -93
- package/lib/js/utils/shared.d.ts +267 -0
- package/{src/utils/shared.ts → lib/js/utils/shared.js} +184 -341
- package/lib/js/utils/units.d.ts +16 -0
- package/lib/js/utils/units.js +61 -0
- package/lib/js/webgl/BaseFramebuffer.d.ts +53 -0
- package/{src/webgl/BaseFramebuffer.ts → lib/js/webgl/BaseFramebuffer.js} +22 -59
- package/lib/js/webgl/Framebuffer.d.ts +69 -0
- package/{src/webgl/Framebuffer.ts → lib/js/webgl/Framebuffer.js} +30 -87
- package/lib/js/webgl/Handler.d.ts +473 -0
- package/{src/webgl/Handler.ts → lib/js/webgl/Handler.js} +175 -586
- package/lib/js/webgl/Multisample.d.ts +27 -0
- package/lib/js/webgl/Multisample.js +77 -0
- package/lib/js/webgl/Program.d.ts +159 -0
- package/{src/webgl/Program.ts → lib/js/webgl/Program.js} +73 -210
- package/lib/js/webgl/ProgramController.d.ts +86 -0
- package/{src/webgl/ProgramController.ts → lib/js/webgl/ProgramController.js} +11 -45
- package/{src/webgl/index.ts → lib/js/webgl/index.d.ts} +1 -8
- package/lib/js/webgl/index.js +6 -0
- package/lib/js/webgl/types.d.ts +9 -0
- package/{src/webgl/types.ts → lib/js/webgl/types.js} +5 -8
- package/lib/js/webgl/variableHandlers.d.ts +22 -0
- package/lib/js/webgl/variableHandlers.js +78 -0
- package/package.json +23 -34
- package/dist/@openglobus/og.esm.js +0 -2
- package/dist/@openglobus/og.esm.js.map +0 -1
- package/dist/@openglobus/og.umd.js +0 -2
- package/dist/@openglobus/og.umd.js.map +0 -1
- package/src/Deferred.ts +0 -17
- package/src/control/MouseWheelZoomControl.ts +0 -269
- package/src/control/ScaleControl.ts +0 -131
- package/src/control/SegmentBoundVisualization.ts +0 -50
- package/src/control/ShowFps.ts +0 -28
- package/src/control/ToggleWireframe.ts +0 -35
- package/src/control/ruler/Ruler.ts +0 -35
- package/src/control/ruler/RulerScene.ts +0 -437
- package/src/control/timeline/timelineUtils.ts +0 -133
- package/src/ellipsoid/index.ts +0 -4
- package/src/entity/Geometry.ts +0 -486
- package/src/index.ts +0 -173
- package/src/layer/GeoTexture2d.ts +0 -56
- package/src/layer/index.ts +0 -12
- package/src/math/Line3.ts +0 -162
- package/src/math/index.ts +0 -26
- package/src/quadTree/EPSG4326QuadTreeStrategy.ts +0 -24
- package/src/quadTree/EarthQuadTreeStrategy.ts +0 -28
- package/src/quadTree/MarsQuadTreeStrategy.ts +0 -25
- package/src/quadTree/Wgs84QuadTreeStrategy.ts +0 -22
- package/src/quadTree/index.ts +0 -14
- package/src/scene/Axes.ts +0 -78
- package/src/segment/SegmentLonLatWgs84.ts +0 -33
- package/src/terrain/Geoid.ts +0 -273
- package/src/ui/Button.ts +0 -121
- package/src/ui/ButtonGroup.ts +0 -63
- package/src/ui/Dialog.ts +0 -244
- package/src/ui/Slider.ts +0 -188
- package/src/ui/ToggleButton.ts +0 -68
- package/src/utils/Loader.ts +0 -247
- package/src/utils/units.ts +0 -78
- package/src/webgl/Multisample.ts +0 -153
- package/src/webgl/variableHandlers.ts +0 -114
- /package/{dist → lib}/@openglobus/og.css +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/arial.js +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/arial.json +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/arial.ttf.cfg +0 -0
- /package/{dist → lib}/@openglobus/res/fonts/arial.ttf.png +0 -0
- /package/{dist → lib}/@openglobus/res/night-4326.png +0 -0
- /package/{dist → lib}/@openglobus/res/night.png +0 -0
- /package/{dist → lib}/@openglobus/res/spec.png +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EntityCollection } from "./EntityCollection";
|
|
2
|
+
import { Polyline } from "./Polyline";
|
|
3
|
+
import { Renderer } from "../renderer/Renderer";
|
|
4
|
+
import { RenderNode } from "../scene/RenderNode";
|
|
5
|
+
declare class PolylineHandler {
|
|
6
|
+
static __counter__: number;
|
|
7
|
+
protected __id: number;
|
|
8
|
+
_entityCollection: EntityCollection;
|
|
9
|
+
pickingEnabled: boolean;
|
|
10
|
+
protected _renderer: Renderer | null;
|
|
11
|
+
protected _polylines: Polyline[];
|
|
12
|
+
constructor(entityCollection: EntityCollection);
|
|
13
|
+
protected _initProgram(): void;
|
|
14
|
+
setRenderNode(renderNode: RenderNode): void;
|
|
15
|
+
add(polyline: Polyline): void;
|
|
16
|
+
remove(polyline: Polyline): void;
|
|
17
|
+
reindexPolylineArray(startIndex: number): void;
|
|
18
|
+
draw(): void;
|
|
19
|
+
drawPicking(): void;
|
|
20
|
+
clear(): void;
|
|
21
|
+
}
|
|
22
|
+
export { PolylineHandler };
|
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
import * as shaders from '../shaders/polyline';
|
|
2
|
-
import {EntityCollection} from "./EntityCollection";
|
|
3
|
-
import {Polyline} from "./Polyline";
|
|
4
|
-
import {Renderer} from "../renderer/Renderer";
|
|
5
|
-
import {RenderNode} from "../scene/RenderNode";
|
|
6
|
-
|
|
7
2
|
class PolylineHandler {
|
|
8
|
-
|
|
9
|
-
protected __id: number;
|
|
10
|
-
public _entityCollection: EntityCollection;
|
|
11
|
-
public pickingEnabled: boolean;
|
|
12
|
-
protected _renderer: Renderer | null;
|
|
13
|
-
protected _polylines: Polyline[];
|
|
14
|
-
|
|
15
|
-
constructor(entityCollection: EntityCollection) {
|
|
16
|
-
|
|
3
|
+
constructor(entityCollection) {
|
|
17
4
|
this.__id = PolylineHandler.__counter__++;
|
|
18
|
-
|
|
19
5
|
this._entityCollection = entityCollection;
|
|
20
|
-
|
|
21
6
|
this._renderer = null;
|
|
22
|
-
|
|
23
7
|
this._polylines = [];
|
|
24
|
-
|
|
25
8
|
this.pickingEnabled = true;
|
|
26
9
|
}
|
|
27
|
-
|
|
28
|
-
protected _initProgram() {
|
|
10
|
+
_initProgram() {
|
|
29
11
|
if (this._renderer && this._renderer.handler) {
|
|
30
12
|
if (!this._renderer.handler.programs.polyline_screen) {
|
|
31
13
|
this._renderer.handler.addProgram(shaders.polyline_screen());
|
|
@@ -35,26 +17,23 @@ class PolylineHandler {
|
|
|
35
17
|
}
|
|
36
18
|
}
|
|
37
19
|
}
|
|
38
|
-
|
|
39
|
-
public setRenderNode(renderNode: RenderNode) {
|
|
20
|
+
setRenderNode(renderNode) {
|
|
40
21
|
this._renderer = renderNode.renderer;
|
|
41
22
|
this._initProgram();
|
|
42
23
|
for (let i = 0; i < this._polylines.length; i++) {
|
|
43
24
|
this._polylines[i].setRenderNode(renderNode);
|
|
44
25
|
}
|
|
45
26
|
}
|
|
46
|
-
|
|
47
|
-
public add(polyline: Polyline) {
|
|
27
|
+
add(polyline) {
|
|
48
28
|
if (polyline._handlerIndex === -1) {
|
|
49
29
|
polyline._handler = this;
|
|
50
30
|
polyline._handlerIndex = this._polylines.length;
|
|
51
31
|
this._polylines.push(polyline);
|
|
52
32
|
this._entityCollection && this._entityCollection.renderNode &&
|
|
53
|
-
|
|
33
|
+
polyline.setRenderNode(this._entityCollection.renderNode);
|
|
54
34
|
}
|
|
55
35
|
}
|
|
56
|
-
|
|
57
|
-
public remove(polyline: Polyline) {
|
|
36
|
+
remove(polyline) {
|
|
58
37
|
let index = polyline._handlerIndex;
|
|
59
38
|
if (index !== -1) {
|
|
60
39
|
polyline._deleteBuffers();
|
|
@@ -64,22 +43,19 @@ class PolylineHandler {
|
|
|
64
43
|
this.reindexPolylineArray(index);
|
|
65
44
|
}
|
|
66
45
|
}
|
|
67
|
-
|
|
68
|
-
public reindexPolylineArray(startIndex: number) {
|
|
46
|
+
reindexPolylineArray(startIndex) {
|
|
69
47
|
let ls = this._polylines;
|
|
70
48
|
for (let i = startIndex; i < ls.length; i++) {
|
|
71
49
|
ls[i]._handlerIndex = i;
|
|
72
50
|
}
|
|
73
51
|
}
|
|
74
|
-
|
|
75
|
-
public draw() {
|
|
52
|
+
draw() {
|
|
76
53
|
let i = this._polylines.length;
|
|
77
54
|
while (i--) {
|
|
78
55
|
this._polylines[i].draw();
|
|
79
56
|
}
|
|
80
57
|
}
|
|
81
|
-
|
|
82
|
-
public drawPicking() {
|
|
58
|
+
drawPicking() {
|
|
83
59
|
if (this.pickingEnabled) {
|
|
84
60
|
let i = this._polylines.length;
|
|
85
61
|
while (i--) {
|
|
@@ -87,8 +63,7 @@ class PolylineHandler {
|
|
|
87
63
|
}
|
|
88
64
|
}
|
|
89
65
|
}
|
|
90
|
-
|
|
91
|
-
public clear() {
|
|
66
|
+
clear() {
|
|
92
67
|
let i = this._polylines.length;
|
|
93
68
|
while (i--) {
|
|
94
69
|
this._polylines[i]._deleteBuffers();
|
|
@@ -99,5 +74,5 @@ class PolylineHandler {
|
|
|
99
74
|
this._polylines = [];
|
|
100
75
|
}
|
|
101
76
|
}
|
|
102
|
-
|
|
103
|
-
export {PolylineHandler};
|
|
77
|
+
PolylineHandler.__counter__ = 0;
|
|
78
|
+
export { PolylineHandler };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { NumberArray3, Vec3 } from "../math/Vec3";
|
|
2
|
+
import { NumberArray4, Vec4 } from "../math/Vec4";
|
|
3
|
+
import { Entity } from "./Entity";
|
|
4
|
+
import { RayHandler } from "./RayHandler";
|
|
5
|
+
export interface IRayParams {
|
|
6
|
+
thickness?: number;
|
|
7
|
+
startPosition?: Vec3 | NumberArray3;
|
|
8
|
+
endPosition?: Vec3 | NumberArray3;
|
|
9
|
+
startColor?: string | NumberArray4;
|
|
10
|
+
endColor?: string | NumberArray4;
|
|
11
|
+
visibility?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Ray class.
|
|
15
|
+
* @class
|
|
16
|
+
* @param {Object} [options] - Options:
|
|
17
|
+
* @param {Vec3|Array.<number>} [options.startPosition] - Ray start point position.
|
|
18
|
+
* @param {Vec3|Array.<number>} [options.endPosition] - Ray end point position.
|
|
19
|
+
* @param {Vec3|Array.<number>} [options.startColor] - Ray start point color.
|
|
20
|
+
* @param {Vec3|Array.<number>} [options.endColor] - Ray end point color.
|
|
21
|
+
* @param {boolean} [options.visibility] - Visibility.
|
|
22
|
+
*/
|
|
23
|
+
declare class Ray {
|
|
24
|
+
static __counter__: number;
|
|
25
|
+
/**
|
|
26
|
+
* Object uniq identifier.
|
|
27
|
+
* @protected
|
|
28
|
+
* @type {number}
|
|
29
|
+
*/
|
|
30
|
+
protected __id: number;
|
|
31
|
+
_thickness: number;
|
|
32
|
+
protected _startPosition: Vec3;
|
|
33
|
+
_startPositionHigh: Vec3;
|
|
34
|
+
_startPositionLow: Vec3;
|
|
35
|
+
protected _endPosition: Vec3;
|
|
36
|
+
_endPositionHigh: Vec3;
|
|
37
|
+
_endPositionLow: Vec3;
|
|
38
|
+
_startColor: Vec4;
|
|
39
|
+
_endColor: Vec4;
|
|
40
|
+
/**
|
|
41
|
+
* Ray visibility.
|
|
42
|
+
* @protected
|
|
43
|
+
* @type {boolean}
|
|
44
|
+
*/
|
|
45
|
+
protected _visibility: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Entity instance that holds this billboard.
|
|
48
|
+
* @public
|
|
49
|
+
* @type {Entity}
|
|
50
|
+
*/
|
|
51
|
+
_entity: Entity | null;
|
|
52
|
+
/**
|
|
53
|
+
* Handler that stores and renders this billboard object.
|
|
54
|
+
* @public
|
|
55
|
+
* @type {BillboardHandler}
|
|
56
|
+
*/
|
|
57
|
+
_handler: RayHandler | null;
|
|
58
|
+
/**
|
|
59
|
+
* Billboard handler array index.
|
|
60
|
+
* @public
|
|
61
|
+
* @type {number}
|
|
62
|
+
*/
|
|
63
|
+
_handlerIndex: number;
|
|
64
|
+
constructor(options?: IRayParams);
|
|
65
|
+
/**
|
|
66
|
+
* Sets ray start position.
|
|
67
|
+
* @public
|
|
68
|
+
* @param {number} x - X coordinate.
|
|
69
|
+
* @param {number} y - Y coordinate.
|
|
70
|
+
* @param {number} z - Z coordinate.
|
|
71
|
+
*/
|
|
72
|
+
setStartPosition(x: number, y: number, z: number): void;
|
|
73
|
+
getLength(): number;
|
|
74
|
+
/**
|
|
75
|
+
* Sets ray start position.
|
|
76
|
+
* @public
|
|
77
|
+
* @param {Vec3} position - Cartesian coordinates.
|
|
78
|
+
*/
|
|
79
|
+
setStartPosition3v(position: Vec3): void;
|
|
80
|
+
/**
|
|
81
|
+
* Sets ray end position.
|
|
82
|
+
* @public
|
|
83
|
+
* @param {number} x - X coordinate.
|
|
84
|
+
* @param {number} y - Y coordinate.
|
|
85
|
+
* @param {number} z - Z coordinate.
|
|
86
|
+
*/
|
|
87
|
+
setEndPosition(x: number, y: number, z: number): void;
|
|
88
|
+
/**
|
|
89
|
+
* Sets ray end position.
|
|
90
|
+
* @public
|
|
91
|
+
* @param {Vec3} position - Cartesian coordinates.
|
|
92
|
+
*/
|
|
93
|
+
setEndPosition3v(position: Vec3): void;
|
|
94
|
+
setThickness(thickness: number): void;
|
|
95
|
+
setColors4v(startColor?: Vec4, endColor?: Vec4): void;
|
|
96
|
+
setColorsHTML(startColor?: string, endColor?: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* Returns ray start position.
|
|
99
|
+
* @public
|
|
100
|
+
* @returns {Vec3}
|
|
101
|
+
*/
|
|
102
|
+
getStartPosition(): Vec3;
|
|
103
|
+
/**
|
|
104
|
+
* Returns ray end position.
|
|
105
|
+
* @public
|
|
106
|
+
* @returns {Vec3}
|
|
107
|
+
*/
|
|
108
|
+
getEndPosition(): Vec3;
|
|
109
|
+
/**
|
|
110
|
+
* Sets visibility.
|
|
111
|
+
* @public
|
|
112
|
+
* @param {boolean} visibility - Visibility flag.
|
|
113
|
+
*/
|
|
114
|
+
setVisibility(visibility: boolean): void;
|
|
115
|
+
/**
|
|
116
|
+
* Returns visibility.
|
|
117
|
+
* @public
|
|
118
|
+
* @returns {boolean}
|
|
119
|
+
*/
|
|
120
|
+
getVisibility(): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Remove from handler.
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
remove(): void;
|
|
126
|
+
/**
|
|
127
|
+
* Set picking color.
|
|
128
|
+
* @public
|
|
129
|
+
* @param {Vec3} color - Picking color.
|
|
130
|
+
*/
|
|
131
|
+
setPickingColor3v(color: Vec3): void;
|
|
132
|
+
}
|
|
133
|
+
export { Ray };
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import * as utils from "../utils/shared";
|
|
2
|
-
import {
|
|
3
|
-
import {NumberArray4, Vec4} from "../math/Vec4";
|
|
4
|
-
import {Entity} from "./Entity";
|
|
5
|
-
import {RayHandler} from "./RayHandler";
|
|
6
|
-
|
|
7
|
-
export interface IRayParams {
|
|
8
|
-
thickness?: number;
|
|
9
|
-
startPosition?: Vec3 | NumberArray3;
|
|
10
|
-
endPosition?: Vec3 | NumberArray3;
|
|
11
|
-
startColor?: string | NumberArray4;
|
|
12
|
-
endColor?: string | NumberArray4;
|
|
13
|
-
visibility?: boolean;
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
2
|
+
import { Vec3 } from "../math/Vec3";
|
|
17
3
|
/**
|
|
18
4
|
* Ray class.
|
|
19
5
|
* @class
|
|
@@ -25,89 +11,24 @@ export interface IRayParams {
|
|
|
25
11
|
* @param {boolean} [options.visibility] - Visibility.
|
|
26
12
|
*/
|
|
27
13
|
class Ray {
|
|
28
|
-
|
|
29
|
-
static __counter__: number = 0;
|
|
30
|
-
/**
|
|
31
|
-
* Object uniq identifier.
|
|
32
|
-
* @protected
|
|
33
|
-
* @type {number}
|
|
34
|
-
*/
|
|
35
|
-
protected __id: number;
|
|
36
|
-
|
|
37
|
-
public _thickness: number;
|
|
38
|
-
|
|
39
|
-
protected _startPosition: Vec3;
|
|
40
|
-
public _startPositionHigh: Vec3;
|
|
41
|
-
public _startPositionLow: Vec3;
|
|
42
|
-
|
|
43
|
-
// RTE end position
|
|
44
|
-
protected _endPosition: Vec3;
|
|
45
|
-
public _endPositionHigh: Vec3;
|
|
46
|
-
public _endPositionLow: Vec3;
|
|
47
|
-
|
|
48
|
-
// start end point colors
|
|
49
|
-
public _startColor: Vec4;
|
|
50
|
-
public _endColor: Vec4;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Ray visibility.
|
|
54
|
-
* @protected
|
|
55
|
-
* @type {boolean}
|
|
56
|
-
*/
|
|
57
|
-
protected _visibility: boolean;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Entity instance that holds this billboard.
|
|
61
|
-
* @public
|
|
62
|
-
* @type {Entity}
|
|
63
|
-
*/
|
|
64
|
-
public _entity: Entity | null;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Handler that stores and renders this billboard object.
|
|
68
|
-
* @public
|
|
69
|
-
* @type {BillboardHandler}
|
|
70
|
-
*/
|
|
71
|
-
public _handler: RayHandler | null;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Billboard handler array index.
|
|
75
|
-
* @public
|
|
76
|
-
* @type {number}
|
|
77
|
-
*/
|
|
78
|
-
public _handlerIndex: number;
|
|
79
|
-
constructor(options: IRayParams = {}) {
|
|
80
|
-
|
|
14
|
+
constructor(options = {}) {
|
|
81
15
|
this.__id = Ray.__counter__++;
|
|
82
|
-
|
|
83
16
|
this._thickness = options.thickness || 2.0;
|
|
84
|
-
|
|
85
17
|
this._startPosition = utils.createVector3(options.startPosition);
|
|
86
18
|
this._startPositionHigh = new Vec3();
|
|
87
19
|
this._startPositionLow = new Vec3();
|
|
88
|
-
Vec3.doubleToTwoFloats(
|
|
89
|
-
this._startPosition,
|
|
90
|
-
this._startPositionHigh,
|
|
91
|
-
this._startPositionLow
|
|
92
|
-
);
|
|
93
|
-
|
|
20
|
+
Vec3.doubleToTwoFloats(this._startPosition, this._startPositionHigh, this._startPositionLow);
|
|
94
21
|
this._endPosition = utils.createVector3(options.endPosition);
|
|
95
22
|
this._endPositionHigh = new Vec3();
|
|
96
23
|
this._endPositionLow = new Vec3();
|
|
97
24
|
Vec3.doubleToTwoFloats(this._endPosition, this._endPositionHigh, this._endPositionLow);
|
|
98
|
-
|
|
99
25
|
this._startColor = utils.createColorRGBA(options.startColor);
|
|
100
26
|
this._endColor = utils.createColorRGBA(options.endColor);
|
|
101
|
-
|
|
102
27
|
this._visibility = options.visibility != undefined ? options.visibility : true;
|
|
103
|
-
|
|
104
28
|
this._entity = null;
|
|
105
|
-
|
|
106
29
|
this._handler = null;
|
|
107
|
-
|
|
108
30
|
this._handlerIndex = -1;
|
|
109
31
|
}
|
|
110
|
-
|
|
111
32
|
/**
|
|
112
33
|
* Sets ray start position.
|
|
113
34
|
* @public
|
|
@@ -115,49 +36,30 @@ class Ray {
|
|
|
115
36
|
* @param {number} y - Y coordinate.
|
|
116
37
|
* @param {number} z - Z coordinate.
|
|
117
38
|
*/
|
|
118
|
-
|
|
39
|
+
setStartPosition(x, y, z) {
|
|
119
40
|
this._startPosition.x = x;
|
|
120
41
|
this._startPosition.y = y;
|
|
121
42
|
this._startPosition.z = z;
|
|
122
|
-
Vec3.doubleToTwoFloats(
|
|
123
|
-
this._startPosition,
|
|
124
|
-
this._startPositionHigh,
|
|
125
|
-
this._startPositionLow
|
|
126
|
-
);
|
|
43
|
+
Vec3.doubleToTwoFloats(this._startPosition, this._startPositionHigh, this._startPositionLow);
|
|
127
44
|
this._handler &&
|
|
128
|
-
|
|
129
|
-
this._handlerIndex,
|
|
130
|
-
this._startPositionHigh,
|
|
131
|
-
this._startPositionLow
|
|
132
|
-
);
|
|
45
|
+
this._handler.setStartPositionArr(this._handlerIndex, this._startPositionHigh, this._startPositionLow);
|
|
133
46
|
}
|
|
134
|
-
|
|
135
|
-
public getLength(): number {
|
|
47
|
+
getLength() {
|
|
136
48
|
return this._startPosition.distance(this._endPosition);
|
|
137
49
|
}
|
|
138
|
-
|
|
139
50
|
/**
|
|
140
51
|
* Sets ray start position.
|
|
141
52
|
* @public
|
|
142
53
|
* @param {Vec3} position - Cartesian coordinates.
|
|
143
54
|
*/
|
|
144
|
-
|
|
55
|
+
setStartPosition3v(position) {
|
|
145
56
|
this._startPosition.x = position.x;
|
|
146
57
|
this._startPosition.y = position.y;
|
|
147
58
|
this._startPosition.z = position.z;
|
|
148
|
-
Vec3.doubleToTwoFloats(
|
|
149
|
-
this._startPosition,
|
|
150
|
-
this._startPositionHigh,
|
|
151
|
-
this._startPositionLow
|
|
152
|
-
);
|
|
59
|
+
Vec3.doubleToTwoFloats(this._startPosition, this._startPositionHigh, this._startPositionLow);
|
|
153
60
|
this._handler &&
|
|
154
|
-
|
|
155
|
-
this._handlerIndex,
|
|
156
|
-
this._startPositionHigh,
|
|
157
|
-
this._startPositionLow
|
|
158
|
-
);
|
|
61
|
+
this._handler.setStartPositionArr(this._handlerIndex, this._startPositionHigh, this._startPositionLow);
|
|
159
62
|
}
|
|
160
|
-
|
|
161
63
|
/**
|
|
162
64
|
* Sets ray end position.
|
|
163
65
|
* @public
|
|
@@ -165,127 +67,105 @@ class Ray {
|
|
|
165
67
|
* @param {number} y - Y coordinate.
|
|
166
68
|
* @param {number} z - Z coordinate.
|
|
167
69
|
*/
|
|
168
|
-
|
|
70
|
+
setEndPosition(x, y, z) {
|
|
169
71
|
this._endPosition.x = x;
|
|
170
72
|
this._endPosition.y = y;
|
|
171
73
|
this._endPosition.z = z;
|
|
172
74
|
Vec3.doubleToTwoFloats(this._endPosition, this._endPositionHigh, this._endPositionLow);
|
|
173
75
|
this._handler &&
|
|
174
|
-
|
|
175
|
-
this._handlerIndex,
|
|
176
|
-
this._endPositionHigh,
|
|
177
|
-
this._endPositionLow
|
|
178
|
-
);
|
|
76
|
+
this._handler.setEndPositionArr(this._handlerIndex, this._endPositionHigh, this._endPositionLow);
|
|
179
77
|
}
|
|
180
|
-
|
|
181
78
|
/**
|
|
182
79
|
* Sets ray end position.
|
|
183
80
|
* @public
|
|
184
81
|
* @param {Vec3} position - Cartesian coordinates.
|
|
185
82
|
*/
|
|
186
|
-
|
|
83
|
+
setEndPosition3v(position) {
|
|
187
84
|
this._endPosition.x = position.x;
|
|
188
85
|
this._endPosition.y = position.y;
|
|
189
86
|
this._endPosition.z = position.z;
|
|
190
87
|
Vec3.doubleToTwoFloats(this._endPosition, this._endPositionHigh, this._endPositionLow);
|
|
191
88
|
this._handler &&
|
|
192
|
-
|
|
193
|
-
this._handlerIndex,
|
|
194
|
-
this._endPositionHigh,
|
|
195
|
-
this._endPositionLow
|
|
196
|
-
);
|
|
89
|
+
this._handler.setEndPositionArr(this._handlerIndex, this._endPositionHigh, this._endPositionLow);
|
|
197
90
|
}
|
|
198
|
-
|
|
199
|
-
public setThickness(thickness: number) {
|
|
91
|
+
setThickness(thickness) {
|
|
200
92
|
this._thickness = thickness;
|
|
201
93
|
this._handler && this._handler.setThicknessArr(this._handlerIndex, thickness);
|
|
202
94
|
}
|
|
203
|
-
|
|
204
|
-
public setColors4v(startColor?: Vec4, endColor?: Vec4) {
|
|
95
|
+
setColors4v(startColor, endColor) {
|
|
205
96
|
if (startColor) {
|
|
206
97
|
this._startColor.x = startColor.x;
|
|
207
98
|
this._startColor.y = startColor.y;
|
|
208
99
|
this._startColor.z = startColor.z;
|
|
209
100
|
this._startColor.w = startColor.w;
|
|
210
101
|
}
|
|
211
|
-
|
|
212
102
|
if (endColor) {
|
|
213
103
|
this._endColor.x = endColor.x;
|
|
214
104
|
this._endColor.y = endColor.y;
|
|
215
105
|
this._endColor.z = endColor.z;
|
|
216
106
|
this._endColor.w = endColor.w;
|
|
217
107
|
}
|
|
218
|
-
|
|
219
108
|
this._handler &&
|
|
220
|
-
|
|
109
|
+
this._handler.setRgbaArr(this._handlerIndex, this._startColor, this._endColor);
|
|
221
110
|
}
|
|
222
|
-
|
|
223
|
-
public setColorsHTML(startColor?: string, endColor?: string) {
|
|
111
|
+
setColorsHTML(startColor, endColor) {
|
|
224
112
|
if (startColor) {
|
|
225
113
|
this._startColor = utils.htmlColorToRgba(startColor);
|
|
226
114
|
}
|
|
227
|
-
|
|
228
115
|
if (endColor) {
|
|
229
116
|
this._endColor = utils.htmlColorToRgba(endColor);
|
|
230
117
|
}
|
|
231
|
-
|
|
232
118
|
this._handler && this._handler.setRgbaArr(this._handlerIndex, this._startColor, this._endColor);
|
|
233
119
|
}
|
|
234
|
-
|
|
235
120
|
/**
|
|
236
121
|
* Returns ray start position.
|
|
237
122
|
* @public
|
|
238
123
|
* @returns {Vec3}
|
|
239
124
|
*/
|
|
240
|
-
|
|
125
|
+
getStartPosition() {
|
|
241
126
|
return this._startPosition;
|
|
242
127
|
}
|
|
243
|
-
|
|
244
128
|
/**
|
|
245
129
|
* Returns ray end position.
|
|
246
130
|
* @public
|
|
247
131
|
* @returns {Vec3}
|
|
248
132
|
*/
|
|
249
|
-
|
|
133
|
+
getEndPosition() {
|
|
250
134
|
return this._endPosition;
|
|
251
135
|
}
|
|
252
|
-
|
|
253
136
|
/**
|
|
254
137
|
* Sets visibility.
|
|
255
138
|
* @public
|
|
256
139
|
* @param {boolean} visibility - Visibility flag.
|
|
257
140
|
*/
|
|
258
|
-
|
|
141
|
+
setVisibility(visibility) {
|
|
259
142
|
this._visibility = visibility;
|
|
260
143
|
this._handler && this._handler.setVisibility(this._handlerIndex, visibility);
|
|
261
144
|
}
|
|
262
|
-
|
|
263
145
|
/**
|
|
264
146
|
* Returns visibility.
|
|
265
147
|
* @public
|
|
266
148
|
* @returns {boolean}
|
|
267
149
|
*/
|
|
268
|
-
|
|
150
|
+
getVisibility() {
|
|
269
151
|
return this._visibility;
|
|
270
152
|
}
|
|
271
|
-
|
|
272
153
|
/**
|
|
273
154
|
* Remove from handler.
|
|
274
155
|
* @public
|
|
275
156
|
*/
|
|
276
|
-
|
|
157
|
+
remove() {
|
|
277
158
|
this._entity = null;
|
|
278
159
|
this._handler && this._handler.remove(this);
|
|
279
160
|
}
|
|
280
|
-
|
|
281
161
|
/**
|
|
282
162
|
* Set picking color.
|
|
283
163
|
* @public
|
|
284
164
|
* @param {Vec3} color - Picking color.
|
|
285
165
|
*/
|
|
286
|
-
|
|
166
|
+
setPickingColor3v(color) {
|
|
287
167
|
this._handler && this._handler.setPickingColorArr(this._handlerIndex, color);
|
|
288
168
|
}
|
|
289
169
|
}
|
|
290
|
-
|
|
291
|
-
export {Ray};
|
|
170
|
+
Ray.__counter__ = 0;
|
|
171
|
+
export { Ray };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { TypedArray } from "../utils/shared";
|
|
2
|
+
import { EntityCollection } from "./EntityCollection";
|
|
3
|
+
import { Ray } from "./Ray";
|
|
4
|
+
import { Renderer } from "../renderer/Renderer";
|
|
5
|
+
import { Vec3 } from "../math/Vec3";
|
|
6
|
+
import { Vec4 } from "../math/Vec4";
|
|
7
|
+
import { WebGLBufferExt } from "../webgl/Handler";
|
|
8
|
+
declare class RayHandler {
|
|
9
|
+
static __counter__: number;
|
|
10
|
+
protected __id: number;
|
|
11
|
+
/**
|
|
12
|
+
* Picking rendering option.
|
|
13
|
+
* @public
|
|
14
|
+
* @type {boolean}
|
|
15
|
+
*/
|
|
16
|
+
pickingEnabled: boolean;
|
|
17
|
+
protected _entityCollection: EntityCollection;
|
|
18
|
+
protected _renderer: Renderer | null;
|
|
19
|
+
protected _rays: Ray[];
|
|
20
|
+
protected _vertexBuffer: WebGLBufferExt | null;
|
|
21
|
+
protected _startPositionHighBuffer: WebGLBufferExt | null;
|
|
22
|
+
protected _startPositionLowBuffer: WebGLBufferExt | null;
|
|
23
|
+
protected _endPositionHighBuffer: WebGLBufferExt | null;
|
|
24
|
+
protected _endPositionLowBuffer: WebGLBufferExt | null;
|
|
25
|
+
protected _thicknessBuffer: WebGLBufferExt | null;
|
|
26
|
+
protected _rgbaBuffer: WebGLBufferExt | null;
|
|
27
|
+
protected _pickingColorBuffer: WebGLBufferExt | null;
|
|
28
|
+
protected _vertexArr: TypedArray | number[];
|
|
29
|
+
protected _startPositionHighArr: TypedArray | number[];
|
|
30
|
+
protected _startPositionLowArr: TypedArray | number[];
|
|
31
|
+
protected _endPositionHighArr: TypedArray | number[];
|
|
32
|
+
protected _endPositionLowArr: TypedArray | number[];
|
|
33
|
+
protected _thicknessArr: TypedArray | number[];
|
|
34
|
+
protected _rgbaArr: TypedArray | number[];
|
|
35
|
+
protected _pickingColorArr: TypedArray | number[];
|
|
36
|
+
protected _buffersUpdateCallbacks: Function[];
|
|
37
|
+
protected _changedBuffers: boolean[];
|
|
38
|
+
constructor(entityCollection: EntityCollection);
|
|
39
|
+
static concArr(dest: number[], curr: number[]): void;
|
|
40
|
+
initProgram(): void;
|
|
41
|
+
setRenderer(renderer: Renderer): void;
|
|
42
|
+
refresh(): void;
|
|
43
|
+
protected _removeRays(): void;
|
|
44
|
+
clear(): void;
|
|
45
|
+
protected _deleteBuffers(): void;
|
|
46
|
+
update(): void;
|
|
47
|
+
add(ray: Ray): void;
|
|
48
|
+
protected _addRayToArrays(ray: Ray): void;
|
|
49
|
+
protected _displayPASS(): void;
|
|
50
|
+
protected _pickingPASS(): void;
|
|
51
|
+
draw(): void;
|
|
52
|
+
drawPicking(): void;
|
|
53
|
+
reindexRaysArray(startIndex: number): void;
|
|
54
|
+
protected _removeRay(ray: Ray): void;
|
|
55
|
+
remove(ray: Ray): void;
|
|
56
|
+
setStartPositionArr(index: number, positionHigh: Vec3, positionLow: Vec3): void;
|
|
57
|
+
setEndPositionArr(index: number, positionHigh: Vec3, positionLow: Vec3): void;
|
|
58
|
+
setPickingColorArr(index: number, color: Vec3): void;
|
|
59
|
+
setRgbaArr(index: number, startColor: Vec4, endColor: Vec4): void;
|
|
60
|
+
setThicknessArr(index: number, thickness: number): void;
|
|
61
|
+
setVisibility(index: number, visibility: boolean): void;
|
|
62
|
+
setVertexArr(index: number, vertexArr: number[]): void;
|
|
63
|
+
createStartPositionBuffer(): void;
|
|
64
|
+
createEndPositionBuffer(): void;
|
|
65
|
+
createRgbaBuffer(): void;
|
|
66
|
+
createThicknessBuffer(): void;
|
|
67
|
+
createVertexBuffer(): void;
|
|
68
|
+
createPickingColorBuffer(): void;
|
|
69
|
+
}
|
|
70
|
+
export { RayHandler };
|