@openglobus/og 0.19.4 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/css/og.css +18 -4
- package/lib/@openglobus/js/Clock.d.ts +106 -0
- package/lib/@openglobus/js/Deferred.d.ts +6 -0
- package/lib/@openglobus/js/Events.d.ts +90 -0
- package/lib/@openglobus/js/Extent.d.ts +145 -0
- package/lib/@openglobus/js/Globe.d.ts +134 -0
- package/lib/@openglobus/js/ImageCanvas.d.ts +128 -0
- package/lib/@openglobus/js/Lock.d.ts +15 -0
- package/lib/@openglobus/js/LonLat.d.ts +128 -0
- package/lib/@openglobus/js/Object3d.d.ts +64 -0
- package/lib/@openglobus/js/Popup.d.ts +46 -0
- package/lib/@openglobus/js/QueueArray.d.ts +16 -0
- package/lib/@openglobus/js/Rectangle.d.ts +76 -0
- package/lib/@openglobus/js/Stack.d.ts +20 -0
- package/lib/@openglobus/js/astro/astro.d.ts +39 -0
- package/lib/@openglobus/js/astro/earth.d.ts +8 -0
- package/lib/@openglobus/js/astro/jd.d.ts +234 -0
- package/lib/@openglobus/js/astro/orbit.d.ts +5 -0
- package/lib/@openglobus/js/astro/rotation.d.ts +2 -0
- package/lib/@openglobus/js/bv/Box.d.ts +32 -0
- package/lib/@openglobus/js/bv/Sphere.d.ts +37 -0
- package/lib/@openglobus/js/bv/index.d.ts +3 -0
- package/lib/@openglobus/js/camera/Camera.d.ts +314 -0
- package/lib/@openglobus/js/camera/Frustum.d.ts +139 -0
- package/lib/@openglobus/js/camera/PlanetCamera.d.ts +234 -0
- package/lib/@openglobus/js/camera/index.d.ts +3 -0
- package/lib/@openglobus/js/cons.d.ts +40 -0
- package/lib/@openglobus/js/control/Atmosphere.d.ts +16 -0
- package/lib/@openglobus/js/control/CompassButton.d.ts +16 -0
- package/lib/@openglobus/js/control/Control.d.ts +100 -0
- package/lib/@openglobus/js/control/DebugInfo.d.ts +25 -0
- package/lib/@openglobus/js/control/DrawingSwitcher.d.ts +13 -0
- package/lib/@openglobus/js/control/EarthCoordinates.d.ts +41 -0
- package/lib/@openglobus/js/control/EarthNavigation.d.ts +50 -0
- package/lib/@openglobus/js/control/GeoImageDragControl.d.ts +22 -0
- package/lib/@openglobus/js/control/KeyboardNavigation.d.ts +28 -0
- package/lib/@openglobus/js/control/LayerAnimation.d.ts +71 -0
- package/lib/@openglobus/js/control/LayerSwitcher.d.ts +36 -0
- package/lib/@openglobus/js/control/Lighting.d.ts +53 -0
- package/lib/@openglobus/js/control/MouseNavigation.d.ts +64 -0
- package/lib/@openglobus/js/control/MouseWheelZoomControl.d.ts +44 -0
- package/lib/@openglobus/js/control/RulerSwitcher.d.ts +17 -0
- package/lib/@openglobus/js/control/ScaleControl.d.ts +24 -0
- package/lib/@openglobus/js/control/SegmentBoundVisualization.d.ts +12 -0
- package/lib/@openglobus/js/control/ShowFps.d.ts +9 -0
- package/lib/@openglobus/js/control/SimpleNavigation.d.ts +25 -0
- package/lib/@openglobus/js/control/SimpleSkyBackground.d.ts +17 -0
- package/lib/@openglobus/js/control/Sun.d.ts +33 -0
- package/lib/@openglobus/js/control/ToggleWireframe.d.ts +14 -0
- package/lib/@openglobus/js/control/TouchNavigation.d.ts +52 -0
- package/lib/@openglobus/js/control/ZoomControl.d.ts +27 -0
- package/lib/@openglobus/js/control/drawing/DrawingControl.d.ts +12 -0
- package/lib/@openglobus/js/control/drawing/LineStringDrawingScene.d.ts +15 -0
- package/lib/@openglobus/js/control/drawing/PolygonDrawingScene.d.ts +98 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfile.d.ts +77 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileButtonsView.d.ts +14 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileControl.d.ts +33 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileLegend.d.ts +20 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileScene.d.ts +80 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileView.d.ts +63 -0
- package/lib/@openglobus/js/control/elevationProfile/PointListDialog.d.ts +12 -0
- package/lib/@openglobus/js/control/heightRuler/HeightRuler.d.ts +7 -0
- package/lib/@openglobus/js/control/heightRuler/HeightRulerScene.d.ts +35 -0
- package/lib/@openglobus/js/control/heightRuler/HeightRulerSwitcher.d.ts +6 -0
- package/lib/@openglobus/js/control/index.d.ts +29 -0
- package/lib/@openglobus/js/control/ruler/Ruler.d.ts +13 -0
- package/lib/@openglobus/js/control/ruler/RulerScene.d.ts +88 -0
- package/lib/@openglobus/js/control/selection/Selection.d.ts +55 -0
- package/lib/@openglobus/js/control/selection/SelectionScene.d.ts +44 -0
- package/lib/@openglobus/js/control/timeline/TimelineControl.d.ts +18 -0
- package/lib/@openglobus/js/control/timeline/TimelineModel.d.ts +41 -0
- package/lib/@openglobus/js/control/timeline/TimelineView.d.ts +85 -0
- package/lib/@openglobus/js/control/timeline/timelineUtils.d.ts +12 -0
- package/lib/@openglobus/js/control/visibleExtent/drawnode.d.ts +7 -0
- package/lib/@openglobus/js/ellipsoid/Ellipsoid.d.ts +193 -0
- package/lib/@openglobus/js/ellipsoid/index.d.ts +3 -0
- package/lib/@openglobus/js/ellipsoid/wgs84.d.ts +6 -0
- package/lib/@openglobus/js/entity/BaseBillboard.d.ts +222 -0
- package/lib/@openglobus/js/entity/BaseBillboardHandler.d.ts +81 -0
- package/lib/@openglobus/js/entity/Billboard.d.ts +113 -0
- package/lib/@openglobus/js/entity/BillboardHandler.d.ts +15 -0
- package/lib/@openglobus/js/entity/Entity.d.ts +354 -0
- package/lib/@openglobus/js/entity/EntityCollection.d.ts +363 -0
- package/lib/@openglobus/js/entity/GeoObject.d.ts +152 -0
- package/lib/@openglobus/js/entity/GeoObjectHandler.d.ts +104 -0
- package/lib/@openglobus/js/entity/Geometry.d.ts +124 -0
- package/lib/@openglobus/js/entity/GeometryHandler.d.ts +84 -0
- package/lib/@openglobus/js/entity/Label.d.ts +214 -0
- package/lib/@openglobus/js/entity/LabelHandler.d.ts +65 -0
- package/lib/@openglobus/js/entity/LabelWorker.d.ts +15 -0
- package/lib/@openglobus/js/entity/PointCloud.d.ts +179 -0
- package/lib/@openglobus/js/entity/PointCloudHandler.d.ts +42 -0
- package/lib/@openglobus/js/entity/Polyline.d.ts +345 -0
- package/lib/@openglobus/js/entity/PolylineHandler.d.ts +22 -0
- package/lib/@openglobus/js/entity/Ray.d.ts +133 -0
- package/lib/@openglobus/js/entity/RayHandler.d.ts +70 -0
- package/lib/@openglobus/js/entity/Strip.d.ts +139 -0
- package/lib/@openglobus/js/entity/StripHandler.d.ts +42 -0
- package/lib/@openglobus/js/entity/index.d.ts +10 -0
- package/lib/@openglobus/js/index.d.ts +33 -0
- package/lib/@openglobus/js/input/KeyboardHandler.d.ts +33 -0
- package/lib/@openglobus/js/input/MouseHandler.d.ts +16 -0
- package/lib/@openglobus/js/input/TouchHandler.d.ts +11 -0
- package/lib/@openglobus/js/input/input.d.ts +3 -0
- package/lib/@openglobus/js/layer/BaseGeoImage.d.ts +145 -0
- package/lib/@openglobus/js/layer/Bing.d.ts +4 -0
- package/lib/@openglobus/js/layer/CanvasTiles.d.ts +103 -0
- package/lib/@openglobus/js/layer/GeoImage.d.ts +61 -0
- package/lib/@openglobus/js/layer/GeoTexture2d.d.ts +17 -0
- package/lib/@openglobus/js/layer/GeoVideo.d.ts +68 -0
- package/lib/@openglobus/js/layer/KML.d.ts +72 -0
- package/lib/@openglobus/js/layer/Layer.d.ts +415 -0
- package/lib/@openglobus/js/layer/Material.d.ts +34 -0
- package/lib/@openglobus/js/layer/OpenStreetMap.d.ts +4 -0
- package/lib/@openglobus/js/layer/Vector.d.ts +246 -0
- package/lib/@openglobus/js/layer/WMS.d.ts +75 -0
- package/lib/@openglobus/js/layer/XYZ.d.ts +148 -0
- package/lib/@openglobus/js/layer/index.d.ts +12 -0
- package/lib/@openglobus/js/light/LightSource.d.ts +174 -0
- package/lib/@openglobus/js/math/Line2.d.ts +11 -0
- package/lib/@openglobus/js/math/Line3.d.ts +28 -0
- package/lib/@openglobus/js/math/Mat3.d.ts +77 -0
- package/lib/@openglobus/js/math/Mat4.d.ts +195 -0
- package/lib/@openglobus/js/math/Plane.d.ts +20 -0
- package/lib/@openglobus/js/math/Quat.d.ts +373 -0
- package/lib/@openglobus/js/math/Ray.d.ts +76 -0
- package/lib/@openglobus/js/math/Vec2.d.ts +310 -0
- package/lib/@openglobus/js/math/Vec3.d.ts +472 -0
- package/lib/@openglobus/js/math/Vec4.d.ts +163 -0
- package/lib/@openglobus/js/math/coder.d.ts +51 -0
- package/lib/@openglobus/js/math/index.d.ts +11 -0
- package/lib/@openglobus/js/math.d.ts +266 -0
- package/lib/@openglobus/js/mercator.d.ts +92 -0
- package/lib/@openglobus/js/proj/EPSG3857.d.ts +9 -0
- package/lib/@openglobus/js/proj/EPSG4326.d.ts +9 -0
- package/lib/@openglobus/js/proj/Proj.d.ts +43 -0
- package/lib/@openglobus/js/quadTree/EPSG4326QuadTreeStrategy.d.ts +6 -0
- package/lib/@openglobus/js/quadTree/EarthQuadTreeStrategy.d.ts +9 -0
- package/lib/@openglobus/js/quadTree/EntityCollectionNode.d.ts +54 -0
- package/lib/@openglobus/js/quadTree/MarsQuadTreeStrategy.d.ts +11 -0
- package/lib/@openglobus/js/quadTree/Node.d.ts +80 -0
- package/lib/@openglobus/js/quadTree/QuadTreeStrategy.d.ts +28 -0
- package/lib/@openglobus/js/quadTree/Wgs84QuadTreeStrategy.d.ts +6 -0
- package/lib/@openglobus/js/quadTree/index.d.ts +12 -0
- package/lib/@openglobus/js/quadTree/quadTree.d.ts +40 -0
- package/lib/@openglobus/js/renderer/Renderer.d.ts +319 -0
- package/lib/@openglobus/js/renderer/RendererEvents.d.ts +240 -0
- package/lib/@openglobus/js/scene/Axes.d.ts +12 -0
- package/lib/@openglobus/js/scene/BaseNode.d.ts +61 -0
- package/lib/@openglobus/js/scene/Planet.d.ts +652 -0
- package/lib/@openglobus/js/scene/RenderNode.d.ts +150 -0
- package/lib/@openglobus/js/scene/SkyBox.d.ts +13 -0
- package/lib/@openglobus/js/scene/index.d.ts +5 -0
- package/lib/@openglobus/js/segment/Segment.d.ts +288 -0
- package/lib/@openglobus/js/segment/SegmentLonLat.d.ts +44 -0
- package/lib/@openglobus/js/segment/SegmentLonLatWgs84.d.ts +10 -0
- package/lib/@openglobus/js/segment/Slice.d.ts +13 -0
- package/lib/@openglobus/js/segment/segmentHelper.d.ts +18 -0
- package/lib/@openglobus/js/shaders/atmos.d.ts +4 -0
- package/lib/@openglobus/js/shaders/billboard.d.ts +3 -0
- package/lib/@openglobus/js/shaders/bloom.d.ts +2 -0
- package/lib/@openglobus/js/shaders/blur.d.ts +3 -0
- package/lib/@openglobus/js/shaders/depth.d.ts +2 -0
- package/lib/@openglobus/js/shaders/drawnode.d.ts +8 -0
- package/lib/@openglobus/js/shaders/geoObject.d.ts +3 -0
- package/lib/@openglobus/js/shaders/label.d.ts +4 -0
- package/lib/@openglobus/js/shaders/lumFilter.d.ts +2 -0
- package/lib/@openglobus/js/shaders/pointCloud.d.ts +2 -0
- package/lib/@openglobus/js/shaders/polyline.d.ts +3 -0
- package/lib/@openglobus/js/shaders/ray.d.ts +2 -0
- package/lib/@openglobus/js/shaders/screenFrame.d.ts +2 -0
- package/lib/@openglobus/js/shaders/skybox.d.ts +2 -0
- package/lib/@openglobus/js/shaders/toneMapping.d.ts +2 -0
- package/lib/@openglobus/js/shaders/utils.d.ts +1 -0
- package/lib/@openglobus/js/terrain/BilTerrain.d.ts +18 -0
- package/lib/@openglobus/js/terrain/EmptyTerrain.d.ts +113 -0
- package/lib/@openglobus/js/terrain/Geoid.d.ts +33 -0
- package/lib/@openglobus/js/terrain/GlobusRgbTerrain.d.ts +6 -0
- package/lib/@openglobus/js/terrain/GlobusTerrain.d.ts +137 -0
- package/lib/{js/terrain/MapboxTerrain.d.ts → @openglobus/js/terrain/RgbTerrain.d.ts} +5 -5
- package/lib/@openglobus/js/terrain/index.d.ts +6 -0
- package/lib/@openglobus/js/ui/Button.d.ts +32 -0
- package/lib/@openglobus/js/ui/ButtonGroup.d.ts +16 -0
- package/lib/@openglobus/js/ui/Color.d.ts +22 -0
- package/lib/@openglobus/js/ui/Dialog.d.ts +55 -0
- package/lib/@openglobus/js/ui/Slider.d.ts +38 -0
- package/lib/@openglobus/js/ui/ToggleButton.d.ts +20 -0
- package/lib/@openglobus/js/ui/View.d.ts +37 -0
- package/lib/@openglobus/js/ui/icons.d.ts +1 -0
- package/lib/@openglobus/js/utils/BaseWorker.d.ts +14 -0
- package/lib/@openglobus/js/utils/FontAtlas.d.ts +82 -0
- package/lib/@openglobus/js/utils/GeoImageCreator.d.ts +34 -0
- package/lib/@openglobus/js/utils/ImagesCacheManager.d.ts +22 -0
- package/lib/@openglobus/js/utils/Loader.d.ts +63 -0
- package/lib/@openglobus/js/utils/NormalMapCreator.d.ts +52 -0
- package/lib/@openglobus/js/utils/PlainSegmentWorker.d.ts +24 -0
- package/lib/@openglobus/js/utils/TerrainWorker.d.ts +28 -0
- package/lib/@openglobus/js/utils/TextureAtlas.d.ts +113 -0
- package/lib/@openglobus/js/utils/VectorTileCreator.d.ts +18 -0
- package/lib/@openglobus/js/utils/colorTable.d.ts +3 -0
- package/lib/@openglobus/js/utils/earcut.d.ts +7 -0
- package/lib/@openglobus/js/utils/objParser.d.ts +24 -0
- package/lib/@openglobus/js/utils/shared.d.ts +263 -0
- package/lib/@openglobus/js/utils/units.d.ts +16 -0
- package/lib/@openglobus/js/webgl/BaseFramebuffer.d.ts +53 -0
- package/lib/@openglobus/js/webgl/Framebuffer.d.ts +69 -0
- package/lib/@openglobus/js/webgl/Handler.d.ts +473 -0
- package/lib/@openglobus/js/webgl/Multisample.d.ts +27 -0
- package/lib/@openglobus/js/webgl/Program.d.ts +159 -0
- package/lib/@openglobus/js/webgl/ProgramController.d.ts +86 -0
- package/lib/@openglobus/js/webgl/index.d.ts +6 -0
- package/lib/@openglobus/js/webgl/types.d.ts +9 -0
- package/lib/@openglobus/js/webgl/variableHandlers.d.ts +22 -0
- package/lib/@openglobus/og.css +1 -1
- package/lib/@openglobus/og.esm.js +1 -1
- package/lib/@openglobus/og.esm.js.map +1 -1
- package/lib/@openglobus/og.umd.js +1 -1
- package/lib/@openglobus/og.umd.js.map +1 -1
- package/lib/js/Extent.js +2 -2
- package/lib/js/Globe.d.ts +1 -1
- package/lib/js/Object3d.d.ts +8 -1
- package/lib/js/Object3d.js +12 -2
- package/lib/js/camera/Frustum.d.ts +1 -1
- package/lib/js/camera/Frustum.js +3 -2
- package/lib/js/control/DebugInfo.js +19 -18
- package/lib/js/control/Lighting.d.ts +4 -0
- package/lib/js/control/Lighting.js +51 -12
- package/lib/js/control/SimpleSkyBackground.d.ts +2 -0
- package/lib/js/control/SimpleSkyBackground.js +13 -3
- package/lib/js/control/drawing/PolygonDrawingScene.js +2 -2
- package/lib/js/control/visibleExtent/drawnode.js +1 -1
- package/lib/js/entity/GeoObject.d.ts +12 -3
- package/lib/js/entity/GeoObject.js +34 -2
- package/lib/js/entity/GeoObjectHandler.d.ts +5 -0
- package/lib/js/entity/GeoObjectHandler.js +47 -0
- package/lib/js/entity/Geometry.d.ts +24 -11
- package/lib/js/entity/Geometry.js +17 -9
- package/lib/js/entity/GeometryHandler.js +5 -5
- package/lib/js/entity/Label.d.ts +7 -0
- package/lib/js/entity/Label.js +11 -0
- package/lib/js/entity/Polyline.d.ts +15 -7
- package/lib/js/entity/Polyline.js +54 -6
- package/lib/js/entity/Strip.d.ts +12 -0
- package/lib/js/entity/Strip.js +16 -0
- package/lib/js/entity/StripHandler.js +1 -1
- package/lib/js/entity/index.d.ts +10 -11
- package/lib/js/entity/index.js +10 -11
- package/lib/js/index.d.ts +5 -5
- package/lib/js/index.js +5 -5
- package/lib/js/layer/Bing.d.ts +4 -0
- package/lib/js/layer/Bing.js +40 -0
- package/lib/js/layer/GeoImage.d.ts +1 -1
- package/lib/js/layer/GeoVideo.d.ts +1 -1
- package/lib/js/layer/Layer.d.ts +1 -1
- package/lib/js/layer/Layer.js +2 -2
- package/lib/js/layer/OpenStreetMap.d.ts +4 -0
- package/lib/js/layer/OpenStreetMap.js +19 -0
- package/lib/js/layer/Vector.d.ts +3 -0
- package/lib/js/layer/Vector.js +3 -3
- package/lib/js/layer/index.d.ts +12 -11
- package/lib/js/layer/index.js +12 -11
- package/lib/js/math/Mat4.js +18 -17
- package/lib/js/mercator.js +2 -1
- package/lib/js/quadTree/EPSG4326QuadTreeStrategy.js +4 -5
- package/lib/js/quadTree/EarthQuadTreeStrategy.d.ts +3 -0
- package/lib/js/quadTree/EarthQuadTreeStrategy.js +40 -5
- package/lib/js/quadTree/EntityCollectionNode.d.ts +2 -2
- package/lib/js/quadTree/EntityCollectionNode.js +13 -14
- package/lib/js/quadTree/MarsQuadTreeStrategy.d.ts +5 -0
- package/lib/js/quadTree/MarsQuadTreeStrategy.js +31 -5
- package/lib/js/quadTree/Node.d.ts +2 -1
- package/lib/js/quadTree/Node.js +38 -28
- package/lib/js/quadTree/QuadTreeStrategy.d.ts +3 -0
- package/lib/js/quadTree/QuadTreeStrategy.js +17 -0
- package/lib/js/quadTree/Wgs84QuadTreeStrategy.js +3 -3
- package/lib/js/renderer/Renderer.js +1 -0
- package/lib/js/scene/Planet.js +6 -4
- package/lib/js/segment/Segment.d.ts +12 -9
- package/lib/js/segment/Segment.js +47 -24
- package/lib/js/segment/SegmentLonLat.d.ts +1 -5
- package/lib/js/segment/SegmentLonLat.js +8 -100
- package/lib/js/segment/SegmentLonLatWgs84.js +5 -3
- package/lib/js/shaders/billboard.js +4 -4
- package/lib/js/shaders/drawnode.js +16 -19
- package/lib/js/shaders/geoObject.js +4 -5
- package/lib/js/shaders/ray.js +7 -3
- package/lib/js/terrain/BilTerrain.d.ts +1 -1
- package/lib/js/terrain/BilTerrain.js +7 -6
- package/lib/js/terrain/EmptyTerrain.d.ts +7 -0
- package/lib/js/terrain/EmptyTerrain.js +7 -0
- package/lib/js/terrain/GlobusRgbTerrain.d.ts +6 -0
- package/lib/js/terrain/GlobusRgbTerrain.js +25 -0
- package/lib/js/terrain/GlobusTerrain.d.ts +5 -5
- package/lib/js/terrain/GlobusTerrain.js +35 -30
- package/lib/js/terrain/RgbTerrain.d.ts +22 -0
- package/lib/js/terrain/RgbTerrain.js +415 -0
- package/lib/js/terrain/index.d.ts +3 -2
- package/lib/js/terrain/index.js +3 -2
- package/lib/js/ui/Color.d.ts +22 -0
- package/lib/js/ui/Color.js +58 -0
- package/lib/js/utils/GeoImageCreator.js +1 -1
- package/lib/js/utils/NormalMapCreator.js +1 -1
- package/lib/js/utils/VectorTileCreator.js +3 -3
- package/lib/js/utils/shared.d.ts +1 -8
- package/lib/js/utils/shared.js +17 -8
- package/package.json +2 -1
- package/lib/js/terrain/MapboxTerrain.js +0 -305
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { LonLat } from "../LonLat";
|
|
2
|
+
import { Quat } from "../math/Quat";
|
|
3
|
+
import { Vec3 } from "../math/Vec3";
|
|
4
|
+
export interface IInverseResult {
|
|
5
|
+
distance: number;
|
|
6
|
+
initialAzimuth: number;
|
|
7
|
+
finalAzimuth: number;
|
|
8
|
+
}
|
|
9
|
+
export interface IDirectResult {
|
|
10
|
+
destination: LonLat;
|
|
11
|
+
finalAzimuth: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Class represents a plant ellipsoid.
|
|
15
|
+
* @class
|
|
16
|
+
* @param {number} equatorialSize - Equatorial ellipsoid size.
|
|
17
|
+
* @param {number} polarSize - Polar ellipsoid size.
|
|
18
|
+
*/
|
|
19
|
+
declare class Ellipsoid {
|
|
20
|
+
/**
|
|
21
|
+
* Equatorial size
|
|
22
|
+
* @type {number}
|
|
23
|
+
* @protected
|
|
24
|
+
*/
|
|
25
|
+
protected _a: number;
|
|
26
|
+
/**
|
|
27
|
+
* Polar size
|
|
28
|
+
* @type {number}
|
|
29
|
+
* @protected
|
|
30
|
+
*/
|
|
31
|
+
protected _b: number;
|
|
32
|
+
protected _flattening: number;
|
|
33
|
+
protected _f: number;
|
|
34
|
+
protected _a2: number;
|
|
35
|
+
protected _b2: number;
|
|
36
|
+
protected _e: number;
|
|
37
|
+
protected _e2: number;
|
|
38
|
+
protected _e22: number;
|
|
39
|
+
protected _k: number;
|
|
40
|
+
protected _k2: number;
|
|
41
|
+
protected _radii: Vec3;
|
|
42
|
+
protected _radii2: Vec3;
|
|
43
|
+
protected _invRadii: Vec3;
|
|
44
|
+
_invRadii2: Vec3;
|
|
45
|
+
constructor(equatorialSize?: number, polarSize?: number);
|
|
46
|
+
/**
|
|
47
|
+
* Returns the distance travelling from ‘this’ point to destination point along a rhumb line.
|
|
48
|
+
* @param {LonLat} startLonLat coordinates.
|
|
49
|
+
* @param {LonLat} endLonLat coordinates
|
|
50
|
+
* @returns {number} Distance in m between this point and destination point (same units as radius).
|
|
51
|
+
*/
|
|
52
|
+
rhumbDistanceTo(startLonLat: LonLat, endLonLat: LonLat): number;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the point at given fraction between two points on the great circle.
|
|
55
|
+
* @param {LonLat} lonLat1 - Longitude/Latitude of source point.
|
|
56
|
+
* @param {LonLat} lonLat2 - Longitude/Latitude of destination point.
|
|
57
|
+
* @param {number} fraction - Fraction between the two points (0 = source point, 1 = destination point).
|
|
58
|
+
* @returns {LonLat} Intermediate point between points.
|
|
59
|
+
*/
|
|
60
|
+
getIntermediatePointOnGreatCircle(lonLat1: LonLat, lonLat2: LonLat, fraction: number): LonLat;
|
|
61
|
+
/**
|
|
62
|
+
* REMOVE ASAP after
|
|
63
|
+
* @param lonLat1
|
|
64
|
+
* @param lonLat2
|
|
65
|
+
* @returns {number}
|
|
66
|
+
*/
|
|
67
|
+
static getBearing(lonLat1: LonLat, lonLat2: LonLat): number;
|
|
68
|
+
getFlattening(): number;
|
|
69
|
+
/**
|
|
70
|
+
* Gets ellipsoid equatorial size.
|
|
71
|
+
* @public
|
|
72
|
+
* @returns {number} -
|
|
73
|
+
*/
|
|
74
|
+
getEquatorialSize(): number;
|
|
75
|
+
get equatorialSize(): number;
|
|
76
|
+
get equatorialSizeSqr(): number;
|
|
77
|
+
/**
|
|
78
|
+
* Gets ellipsoid polar size.
|
|
79
|
+
* @public
|
|
80
|
+
* @returns {number} -
|
|
81
|
+
*/
|
|
82
|
+
getPolarSize(): number;
|
|
83
|
+
get polarSize(): number;
|
|
84
|
+
get polarSizeSqr(): number;
|
|
85
|
+
/**
|
|
86
|
+
* Calculate cartesian coordinates by its ECEF geodetic coordinates.
|
|
87
|
+
* @public
|
|
88
|
+
* @param {LonLat} lonlat - Geodetic coordinates.
|
|
89
|
+
* @returns {Vec3} -
|
|
90
|
+
*/
|
|
91
|
+
lonLatToCartesian(lonlat: LonLat): Vec3;
|
|
92
|
+
/**
|
|
93
|
+
* Calculate cartesian coordinates by its ECEF geodetic coordinates.
|
|
94
|
+
* @public
|
|
95
|
+
* @param {LonLat} lonlat - Geodetic coordinates.
|
|
96
|
+
* @param {Vec3} res - Output variable reference.
|
|
97
|
+
* @returns {Vec3} -
|
|
98
|
+
*/
|
|
99
|
+
lonLatToCartesianRes(lonlat: LonLat, res: Vec3): Vec3;
|
|
100
|
+
/**
|
|
101
|
+
* Gets cartesian ECEF from Wgs84 geodetic coordinates.
|
|
102
|
+
* @public
|
|
103
|
+
* @param {Number} lon - Longitude.
|
|
104
|
+
* @param {Number} lat - Latitude.
|
|
105
|
+
* @param {Number} height - Height.
|
|
106
|
+
* @param {Vec3} res - Output result variable.
|
|
107
|
+
* @returns {Vec3} -
|
|
108
|
+
*/
|
|
109
|
+
geodeticToCartesian(lon: number, lat: number, height?: number, res?: Vec3): Vec3;
|
|
110
|
+
/**
|
|
111
|
+
* Gets Wgs84 geodetic coordinates from cartesian ECEF.
|
|
112
|
+
* @public
|
|
113
|
+
* @param {Vec3} p - Cartesian coordinates.
|
|
114
|
+
* @returns {LonLat} -
|
|
115
|
+
*/
|
|
116
|
+
projToSurface(p: Vec3): Vec3;
|
|
117
|
+
/**
|
|
118
|
+
* Converts 3d cartesian coordinates to geodetic
|
|
119
|
+
* @param {Vec3} cart - Cartesian coordinates
|
|
120
|
+
* @returns {LonLat} - Geodetic coordinates
|
|
121
|
+
*/
|
|
122
|
+
cartesianToLonLat(cart: Vec3): LonLat;
|
|
123
|
+
/**
|
|
124
|
+
* Converts 3d cartesian coordinates to geodetic
|
|
125
|
+
* @param {Vec3} cart - Cartesian coordinates
|
|
126
|
+
* @param {LonLat} res - Link geodetic coordinates variable
|
|
127
|
+
* @returns {LonLat} - Geodetic coordinates
|
|
128
|
+
*/
|
|
129
|
+
cartesianToLonLatRes(cart: Vec3, res?: LonLat): LonLat;
|
|
130
|
+
/**
|
|
131
|
+
* Gets ellipsoid surface normal.
|
|
132
|
+
* @public
|
|
133
|
+
* @param {Vec3} coord - Spatial coordinates.
|
|
134
|
+
* @return {Vec3} -
|
|
135
|
+
*/
|
|
136
|
+
getSurfaceNormal3v(coord: Vec3): Vec3;
|
|
137
|
+
getGreatCircleDistance(lonLat1: LonLat, lonLat2: LonLat): number;
|
|
138
|
+
/**
|
|
139
|
+
* Calculates the destination point given start point lat / lon, azimuth(deg) and distance (m).
|
|
140
|
+
* Source: http://movable-type.co.uk/scripts/latlong-vincenty-direct.html and optimized / cleaned up by Mathias Bynens <http://mathiasbynens.be/>
|
|
141
|
+
* Based on the Vincenty direct formula by T. Vincenty, “Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations”, Survey Review, vol XXII no 176, 1975 <http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf>
|
|
142
|
+
* @param {LonLat} lonLat - Origin coordinates
|
|
143
|
+
* @param {number} azimuth - View azimuth in degrees
|
|
144
|
+
* @param {number} dist - Distance to the destination point coordinates in meters
|
|
145
|
+
* @returns {LonLat} - Destination point coordinates
|
|
146
|
+
*/
|
|
147
|
+
getGreatCircleDestination(lonLat: LonLat, azimuth: number, dist: number): LonLat;
|
|
148
|
+
/**
|
|
149
|
+
* Returns inverse Geodesic solution for two points
|
|
150
|
+
* @param {LonLat} lonLat1 - start coordinates point
|
|
151
|
+
* @param {LonLat} lonLat2 - end coordinates point
|
|
152
|
+
* @returns {IInverseResult} - Contains distance, initialAzimuth, and finalAzimuth values
|
|
153
|
+
*/
|
|
154
|
+
inverse(lonLat1: LonLat, lonLat2: LonLat): IInverseResult;
|
|
155
|
+
/**
|
|
156
|
+
* Calculates the destination point given start point lat / lon, azimuth(deg) and distance (m).
|
|
157
|
+
* Source: http://movable-type.co.uk/scripts/latlong-vincenty-direct.html and optimized / cleaned up by Mathias Bynens <http://mathiasbynens.be/>
|
|
158
|
+
* Based on the Vincenty direct formula by T. Vincenty, “Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations”, Survey Review, vol XXII no 176, 1975 <http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf>
|
|
159
|
+
* @param {LonLat} lonLat - Origin coordinates
|
|
160
|
+
* @param {number} azimuth - View azimuth in degrees
|
|
161
|
+
* @param {number} dist - Distance to the destination point coordinates in meters
|
|
162
|
+
* @returns {{ destination: LonLat; finalAzimuth: number }} - Destination point coordinates
|
|
163
|
+
*/
|
|
164
|
+
direct(lonLat: LonLat, azimuth: number, dist: number): IDirectResult;
|
|
165
|
+
/**
|
|
166
|
+
* Returns cartesian coordinates of the intersection of a ray and an ellipsoid.
|
|
167
|
+
* If the ray doesn't hit ellipsoid returns null.
|
|
168
|
+
* @public
|
|
169
|
+
* @param {Vec3} origin - Ray origin point.
|
|
170
|
+
* @param {Vec3} direction - Ray direction.
|
|
171
|
+
* @returns {Vec3} -
|
|
172
|
+
*/
|
|
173
|
+
hitRay(origin: Vec3, direction: Vec3): Vec3 | undefined;
|
|
174
|
+
getNorthFrameRotation(cartesian: Vec3): Quat;
|
|
175
|
+
/**
|
|
176
|
+
* @todo this is not precise function, needs to be replaced or removed
|
|
177
|
+
* @param lonLat1
|
|
178
|
+
* @param bearing
|
|
179
|
+
* @param distance
|
|
180
|
+
* @returns {LonLat}
|
|
181
|
+
*/
|
|
182
|
+
getBearingDestination(lonLat1: LonLat, bearing?: number, distance?: number): LonLat;
|
|
183
|
+
/**
|
|
184
|
+
* Returns the point at given fraction between two points on the great circle.
|
|
185
|
+
* @param {LonLat} lonLat1 - Longitude/Latitude of source point.
|
|
186
|
+
* @param {LonLat} lonLat2 - Longitude/Latitude of destination point.
|
|
187
|
+
* @param {number} fraction - Fraction between the two points (0 = source point, 1 = destination point).
|
|
188
|
+
* @returns {LonLat} Intermediate point between points.
|
|
189
|
+
*/
|
|
190
|
+
static getIntermediatePointOnGreatCircle(lonLat1: LonLat, lonLat2: LonLat, fraction: number): LonLat;
|
|
191
|
+
static getRhumbBearing(lonLat1: LonLat, lonLat2: LonLat): number;
|
|
192
|
+
}
|
|
193
|
+
export { Ellipsoid };
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { Entity } from "./Entity";
|
|
2
|
+
import { NumberArray2, Vec2 } from "../math/Vec2";
|
|
3
|
+
import { NumberArray3, Vec3 } from "../math/Vec3";
|
|
4
|
+
import { NumberArray4, Vec4 } from "../math/Vec4";
|
|
5
|
+
import { BaseBillboardHandler } from "./BaseBillboardHandler";
|
|
6
|
+
export interface IBaseBillboardParams {
|
|
7
|
+
position?: NumberArray3 | Vec3;
|
|
8
|
+
rotation?: number;
|
|
9
|
+
color?: string | NumberArray4 | Vec4;
|
|
10
|
+
alignedAxis?: NumberArray3 | Vec3;
|
|
11
|
+
offset?: NumberArray2 | NumberArray3 | Vec2 | Vec3;
|
|
12
|
+
visibility?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Base prototype for billboard and label classes.
|
|
16
|
+
* @class
|
|
17
|
+
* @param {Object} [options] - Options:
|
|
18
|
+
* @param {Vec3|Array.<number>} [options.position] - Billboard position.
|
|
19
|
+
* @param {number} [options.rotation] - Screen angle rotation.
|
|
20
|
+
* @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
|
|
21
|
+
* @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
|
|
22
|
+
* @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
|
|
23
|
+
* @param {boolean} [options.visibility] - Visibility.
|
|
24
|
+
*/
|
|
25
|
+
declare class BaseBillboard {
|
|
26
|
+
static __counter__: number;
|
|
27
|
+
__id: number;
|
|
28
|
+
/**
|
|
29
|
+
* Billboard center cartesian position.
|
|
30
|
+
* @protected
|
|
31
|
+
* @type {Vec3}
|
|
32
|
+
*/
|
|
33
|
+
protected _position: Vec3;
|
|
34
|
+
_positionHigh: Vec3;
|
|
35
|
+
_positionLow: Vec3;
|
|
36
|
+
/**
|
|
37
|
+
* Screen space rotation angle.
|
|
38
|
+
* @public
|
|
39
|
+
* @type {number}
|
|
40
|
+
*/
|
|
41
|
+
_rotation: number;
|
|
42
|
+
/**
|
|
43
|
+
* RGBA color.
|
|
44
|
+
* @public
|
|
45
|
+
* @type {Vec4}
|
|
46
|
+
*/
|
|
47
|
+
_color: Vec4;
|
|
48
|
+
/**
|
|
49
|
+
* Cartesian aligned axis vector.
|
|
50
|
+
* @protected
|
|
51
|
+
* @type {Vec3}
|
|
52
|
+
*/
|
|
53
|
+
protected _alignedAxis: Vec3;
|
|
54
|
+
/**
|
|
55
|
+
* Billboard center screen space offset. Where x,y - screen space offset and z - depth offset.
|
|
56
|
+
* @public
|
|
57
|
+
* @type {Vec3}
|
|
58
|
+
*/
|
|
59
|
+
_offset: Vec3;
|
|
60
|
+
/**
|
|
61
|
+
* Billboard visibility.
|
|
62
|
+
* @protected
|
|
63
|
+
* @type {boolean}
|
|
64
|
+
*/
|
|
65
|
+
protected _visibility: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Entity instance that holds this billboard.
|
|
68
|
+
* @public
|
|
69
|
+
* @type {Entity}
|
|
70
|
+
*/
|
|
71
|
+
_entity: Entity | null;
|
|
72
|
+
/**
|
|
73
|
+
* Handler that stores and renders this billboard object.
|
|
74
|
+
* @public
|
|
75
|
+
* @type {BillboardHandler | null}
|
|
76
|
+
*/
|
|
77
|
+
_handler: BaseBillboardHandler | null;
|
|
78
|
+
/**
|
|
79
|
+
* Billboard handler array index.
|
|
80
|
+
* @public
|
|
81
|
+
* @type {number}
|
|
82
|
+
*/
|
|
83
|
+
_handlerIndex: number;
|
|
84
|
+
/**
|
|
85
|
+
* An indication that the object is ready to draw
|
|
86
|
+
* @public
|
|
87
|
+
* @type {number}
|
|
88
|
+
*/
|
|
89
|
+
_isReady: boolean;
|
|
90
|
+
_lockId: number;
|
|
91
|
+
constructor(options?: IBaseBillboardParams);
|
|
92
|
+
/**
|
|
93
|
+
* Sets billboard position.
|
|
94
|
+
* @public
|
|
95
|
+
* @param {number} x - X coordinate.
|
|
96
|
+
* @param {number} y - Y coordinate.
|
|
97
|
+
* @param {number} z - Z coordinate.
|
|
98
|
+
*/
|
|
99
|
+
setPosition(x: number, y: number, z: number): void;
|
|
100
|
+
/**
|
|
101
|
+
* Sets billboard position.
|
|
102
|
+
* @public
|
|
103
|
+
* @param {Vec3} position - Cartesian coordinates.
|
|
104
|
+
*/
|
|
105
|
+
setPosition3v(position: Vec3): void;
|
|
106
|
+
/**
|
|
107
|
+
* Returns billboard position.
|
|
108
|
+
* @public
|
|
109
|
+
* @returns {Vec3}
|
|
110
|
+
*/
|
|
111
|
+
getPosition(): Vec3;
|
|
112
|
+
/**
|
|
113
|
+
* Sets screen space offset.
|
|
114
|
+
* @public
|
|
115
|
+
* @param {number} x - X offset.
|
|
116
|
+
* @param {number} y - Y offset.
|
|
117
|
+
* @param {number} [z] - Z offset.
|
|
118
|
+
*/
|
|
119
|
+
setOffset(x: number, y: number, z?: number): void;
|
|
120
|
+
/**
|
|
121
|
+
* Sets screen space offset.
|
|
122
|
+
* @public
|
|
123
|
+
* @param {Vec2} offset - Offset size.
|
|
124
|
+
*/
|
|
125
|
+
setOffset3v(offset: Vec3): void;
|
|
126
|
+
/**
|
|
127
|
+
* Returns billboard screen space offset size.
|
|
128
|
+
* @public
|
|
129
|
+
* @returns {Vec3}
|
|
130
|
+
*/
|
|
131
|
+
getOffset(): Vec3;
|
|
132
|
+
/**
|
|
133
|
+
* Sets billboard screen space rotation in radians.
|
|
134
|
+
* @public
|
|
135
|
+
* @param {number} rotation - Screen space rotation in radians.
|
|
136
|
+
*/
|
|
137
|
+
setRotation(rotation: number): void;
|
|
138
|
+
/**
|
|
139
|
+
* Gets screen space rotation.
|
|
140
|
+
* @public
|
|
141
|
+
* @returns {number}
|
|
142
|
+
*/
|
|
143
|
+
getRotation(): number;
|
|
144
|
+
/**
|
|
145
|
+
* Sets billboard opacity.
|
|
146
|
+
* @public
|
|
147
|
+
* @param {number} a - Billboard opacity.
|
|
148
|
+
*/
|
|
149
|
+
setOpacity(a: number): void;
|
|
150
|
+
/**
|
|
151
|
+
* Sets RGBA color. Each channel from 0.0 to 1.0.
|
|
152
|
+
* @public
|
|
153
|
+
* @param {number} r - Red.
|
|
154
|
+
* @param {number} g - Green.
|
|
155
|
+
* @param {number} b - Blue.
|
|
156
|
+
* @param {number} a - Alpha.
|
|
157
|
+
*/
|
|
158
|
+
setColor(r: number, g: number, b: number, a?: number): void;
|
|
159
|
+
/**
|
|
160
|
+
* Sets RGBA color. Each channel from 0.0 to 1.0.
|
|
161
|
+
* @public
|
|
162
|
+
* @param {Vec4} color - RGBA vector.
|
|
163
|
+
*/
|
|
164
|
+
setColor4v(color: Vec4): void;
|
|
165
|
+
/**
|
|
166
|
+
* Sets billboard color.
|
|
167
|
+
* @public
|
|
168
|
+
* @param {string} color - HTML style color.
|
|
169
|
+
*/
|
|
170
|
+
setColorHTML(color: string): void;
|
|
171
|
+
/**
|
|
172
|
+
* Returns RGBA color.
|
|
173
|
+
* @public
|
|
174
|
+
* @returns {Vec4}
|
|
175
|
+
*/
|
|
176
|
+
getColor(): Vec4;
|
|
177
|
+
/**
|
|
178
|
+
* Sets billboard visibility.
|
|
179
|
+
* @public
|
|
180
|
+
* @param {boolean} visibility - Visibility flag.
|
|
181
|
+
*/
|
|
182
|
+
setVisibility(visibility: boolean): void;
|
|
183
|
+
/**
|
|
184
|
+
* Returns billboard visibility.
|
|
185
|
+
* @public
|
|
186
|
+
* @returns {boolean}
|
|
187
|
+
*/
|
|
188
|
+
getVisibility(): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Sets billboard cartesian aligned vector.
|
|
191
|
+
* @public
|
|
192
|
+
* @param {number} x - Aligned vector X coordinate.
|
|
193
|
+
* @param {number} y - Aligned vector Y coordinate.
|
|
194
|
+
* @param {number} z - Aligned vector Z coordinate.
|
|
195
|
+
*/
|
|
196
|
+
setAlignedAxis(x: number, y: number, z: number): void;
|
|
197
|
+
/**
|
|
198
|
+
* Sets billboard aligned vector.
|
|
199
|
+
* @public
|
|
200
|
+
* @param {Vec3} alignedAxis - Align direction.
|
|
201
|
+
*/
|
|
202
|
+
setAlignedAxis3v(alignedAxis: Vec3): void;
|
|
203
|
+
/**
|
|
204
|
+
* Returns aligned vector.
|
|
205
|
+
* @public
|
|
206
|
+
* @returns {Vec3}
|
|
207
|
+
*/
|
|
208
|
+
getAlignedAxis(): Vec3;
|
|
209
|
+
/**
|
|
210
|
+
* Removes billboard from handler.
|
|
211
|
+
* @public
|
|
212
|
+
*/
|
|
213
|
+
remove(): void;
|
|
214
|
+
/**
|
|
215
|
+
* Sets billboard picking color.
|
|
216
|
+
* @public
|
|
217
|
+
* @param {Vec3} color - Picking color.
|
|
218
|
+
*/
|
|
219
|
+
setPickingColor3v(color: Vec3): void;
|
|
220
|
+
serializeWorkerData(workerId: number): Float32Array | null;
|
|
221
|
+
}
|
|
222
|
+
export { BaseBillboard };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { TypedArray } from "../utils/shared";
|
|
2
|
+
import { EntityCollection } from "./EntityCollection";
|
|
3
|
+
import { Renderer } from "../renderer/Renderer";
|
|
4
|
+
import { Vec3 } from "../math/Vec3";
|
|
5
|
+
import { Vec4 } from "../math/Vec4";
|
|
6
|
+
import { WebGLBufferExt } from "../webgl/Handler";
|
|
7
|
+
import { BaseBillboard } from "./BaseBillboard";
|
|
8
|
+
/**
|
|
9
|
+
* @class BaseBillboardHandler
|
|
10
|
+
*/
|
|
11
|
+
declare class BaseBillboardHandler {
|
|
12
|
+
static __counter__: number;
|
|
13
|
+
__id: number;
|
|
14
|
+
/**
|
|
15
|
+
* Picking rendering option.
|
|
16
|
+
* @public
|
|
17
|
+
* @type {boolean}
|
|
18
|
+
*/
|
|
19
|
+
pickingEnabled: boolean;
|
|
20
|
+
_entityCollection: EntityCollection;
|
|
21
|
+
protected _renderer: Renderer | null;
|
|
22
|
+
protected _billboards: BaseBillboard[];
|
|
23
|
+
protected _positionHighBuffer: WebGLBufferExt | null;
|
|
24
|
+
protected _positionLowBuffer: WebGLBufferExt | null;
|
|
25
|
+
protected _sizeBuffer: WebGLBufferExt | null;
|
|
26
|
+
protected _offsetBuffer: WebGLBufferExt | null;
|
|
27
|
+
protected _rgbaBuffer: WebGLBufferExt | null;
|
|
28
|
+
protected _rotationBuffer: WebGLBufferExt | null;
|
|
29
|
+
protected _texCoordBuffer: WebGLBufferExt | null;
|
|
30
|
+
protected _vertexBuffer: WebGLBufferExt | null;
|
|
31
|
+
protected _texCoordArr: Float32Array;
|
|
32
|
+
protected _vertexArr: Float32Array;
|
|
33
|
+
protected _positionHighArr: Float32Array;
|
|
34
|
+
protected _positionLowArr: Float32Array;
|
|
35
|
+
protected _sizeArr: Float32Array;
|
|
36
|
+
protected _offsetArr: Float32Array;
|
|
37
|
+
protected _rgbaArr: Float32Array;
|
|
38
|
+
protected _rotationArr: Float32Array;
|
|
39
|
+
protected _pickingColorBuffer: WebGLBufferExt | null;
|
|
40
|
+
protected _pickingColorArr: Float32Array;
|
|
41
|
+
protected _buffersUpdateCallbacks: Function[];
|
|
42
|
+
protected _changedBuffers: boolean[];
|
|
43
|
+
constructor(entityCollection: EntityCollection);
|
|
44
|
+
isEqual(handler: BaseBillboardHandler): boolean;
|
|
45
|
+
static concArr(dest: number[], curr: number[]): void;
|
|
46
|
+
initProgram(): void;
|
|
47
|
+
setRenderer(renderer: Renderer): void;
|
|
48
|
+
refresh(): void;
|
|
49
|
+
protected _removeBillboards(): void;
|
|
50
|
+
clear(): void;
|
|
51
|
+
protected _deleteBuffers(): void;
|
|
52
|
+
update(): void;
|
|
53
|
+
add(billboard: BaseBillboard): void;
|
|
54
|
+
protected _displayPASS(): void;
|
|
55
|
+
protected _pickingPASS(): void;
|
|
56
|
+
draw(): void;
|
|
57
|
+
drawPicking(): void;
|
|
58
|
+
reindexBillboardsArray(startIndex: number): void;
|
|
59
|
+
protected _removeBillboard(billboard: BaseBillboard): void;
|
|
60
|
+
setAlignedAxisArr(index: number, alignedAxis: Vec3): void;
|
|
61
|
+
remove(billboard: BaseBillboard): void;
|
|
62
|
+
setPositionArr(index: number, positionHigh: Vec3, positionLow: Vec3): void;
|
|
63
|
+
setPickingColorArr(index: number, color: Vec3): void;
|
|
64
|
+
setSizeArr(index: number, width: number, height: number): void;
|
|
65
|
+
setOffsetArr(index: number, offset: Vec3): void;
|
|
66
|
+
setRgbaArr(index: number, rgba: Vec4): void;
|
|
67
|
+
setRotationArr(index: number, rotation: number): void;
|
|
68
|
+
setTexCoordArr(index: number, tcoordArr: number[] | TypedArray): void;
|
|
69
|
+
setVisibility(index: number, visibility: boolean): void;
|
|
70
|
+
setVertexArr(index: number, vertexArr: number[] | Float32Array): void;
|
|
71
|
+
createPositionBuffer(): void;
|
|
72
|
+
createSizeBuffer(): void;
|
|
73
|
+
createOffsetBuffer(): void;
|
|
74
|
+
createRgbaBuffer(): void;
|
|
75
|
+
createRotationBuffer(): void;
|
|
76
|
+
createVertexBuffer(): void;
|
|
77
|
+
createTexCoordBuffer(): void;
|
|
78
|
+
createPickingColorBuffer(): void;
|
|
79
|
+
refreshTexCoordsArr(): void;
|
|
80
|
+
}
|
|
81
|
+
export { BaseBillboardHandler };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { BaseBillboard, IBaseBillboardParams } from "./BaseBillboard";
|
|
2
|
+
import { BillboardHandler } from "./BillboardHandler";
|
|
3
|
+
import { HTMLImageElementExt } from "../utils/ImagesCacheManager";
|
|
4
|
+
export interface IBillboardParams extends IBaseBillboardParams {
|
|
5
|
+
src?: string;
|
|
6
|
+
image?: HTMLImageElement;
|
|
7
|
+
size?: [number, number];
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Represents basic quad billboard image.
|
|
13
|
+
* @class
|
|
14
|
+
* @extends {BaseBillboard}
|
|
15
|
+
* @param {Object} [options] - Options:
|
|
16
|
+
* @param {Vec3|Array.<number>} [options.position] - Billboard spatial position.
|
|
17
|
+
* @param {number} [options.rotation] - Screen angle rotation.
|
|
18
|
+
* @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
|
|
19
|
+
* @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
|
|
20
|
+
* @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
|
|
21
|
+
* @param {boolean} [options.visibility] - Visibility.
|
|
22
|
+
* @param {string} [options.src] - Billboard image url source.
|
|
23
|
+
* @param {Image} [options.image] - Billboard image object.
|
|
24
|
+
* @param {number} [options.width] - Screen width.
|
|
25
|
+
* @param {number} [options.height] - Screen height.
|
|
26
|
+
* @param {number} [options.scale] - Billboard scale.
|
|
27
|
+
*/
|
|
28
|
+
declare class Billboard extends BaseBillboard {
|
|
29
|
+
_handler: BillboardHandler | null;
|
|
30
|
+
/**
|
|
31
|
+
* Image src.
|
|
32
|
+
* @protected
|
|
33
|
+
* @type {string}
|
|
34
|
+
*/
|
|
35
|
+
protected _src: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Image object.
|
|
38
|
+
* @protected
|
|
39
|
+
* @type {Object}
|
|
40
|
+
*/
|
|
41
|
+
protected _image: HTMLImageElement & {
|
|
42
|
+
__nodeIndex?: number;
|
|
43
|
+
} | null;
|
|
44
|
+
protected _scale: number;
|
|
45
|
+
/**
|
|
46
|
+
* Billboard screen width.
|
|
47
|
+
* @public
|
|
48
|
+
* @type {number}
|
|
49
|
+
*/
|
|
50
|
+
_width: number;
|
|
51
|
+
/**
|
|
52
|
+
* Billboard screen height.
|
|
53
|
+
* @public
|
|
54
|
+
* @type {number}
|
|
55
|
+
*/
|
|
56
|
+
_height: number;
|
|
57
|
+
constructor(options?: IBillboardParams);
|
|
58
|
+
/**
|
|
59
|
+
* Sets billboard image url source.
|
|
60
|
+
* @public
|
|
61
|
+
* @param {string} src - Image url.
|
|
62
|
+
*/
|
|
63
|
+
setSrc(src: string | null): void;
|
|
64
|
+
getSrc(): string | null;
|
|
65
|
+
/**
|
|
66
|
+
* Sets image object.
|
|
67
|
+
* @public
|
|
68
|
+
* @param {Object} image - JavaScript image object.
|
|
69
|
+
*/
|
|
70
|
+
setImage(image: HTMLImageElement): void;
|
|
71
|
+
getImage(): HTMLImageElementExt | null;
|
|
72
|
+
/**
|
|
73
|
+
* Sets billboard screen size in pixels.
|
|
74
|
+
* @public
|
|
75
|
+
* @param {number} width - Billboard width.
|
|
76
|
+
* @param {number} height - Billboard height.
|
|
77
|
+
*/
|
|
78
|
+
setSize(width: number, height: number): void;
|
|
79
|
+
/**
|
|
80
|
+
* Returns billboard screen size.
|
|
81
|
+
* @public
|
|
82
|
+
* @returns {Object}
|
|
83
|
+
*/
|
|
84
|
+
getSize(): {
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Sets billboard screen width.
|
|
90
|
+
* @public
|
|
91
|
+
* @param {number} width - Width.
|
|
92
|
+
*/
|
|
93
|
+
setWidth(width: number): void;
|
|
94
|
+
/**
|
|
95
|
+
* Gets billboard screen width.
|
|
96
|
+
* @public
|
|
97
|
+
* @returns {number}
|
|
98
|
+
*/
|
|
99
|
+
getWidth(): number;
|
|
100
|
+
/**
|
|
101
|
+
* Sets billboard screen heigh.
|
|
102
|
+
* @public
|
|
103
|
+
* @param {number} height - Height.
|
|
104
|
+
*/
|
|
105
|
+
setHeight(height: number): void;
|
|
106
|
+
/**
|
|
107
|
+
* Gets billboard screen height.
|
|
108
|
+
* @public
|
|
109
|
+
* @returns {number}
|
|
110
|
+
*/
|
|
111
|
+
getHeight(): number;
|
|
112
|
+
}
|
|
113
|
+
export { Billboard };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseBillboardHandler } from "./BaseBillboardHandler";
|
|
2
|
+
import { Billboard } from "./Billboard";
|
|
3
|
+
import { EntityCollection } from "./EntityCollection";
|
|
4
|
+
/**
|
|
5
|
+
* @class BillboardHandler
|
|
6
|
+
*/
|
|
7
|
+
declare class BillboardHandler extends BaseBillboardHandler {
|
|
8
|
+
protected _billboards: Billboard[];
|
|
9
|
+
constructor(props: EntityCollection);
|
|
10
|
+
add(billboard: Billboard): void;
|
|
11
|
+
protected _addBillboardToArrays(billboard: Billboard): void;
|
|
12
|
+
get billboards(): Billboard[];
|
|
13
|
+
refreshTexCoordsArr(): void;
|
|
14
|
+
}
|
|
15
|
+
export { BillboardHandler };
|