@openglobus/og 0.19.3 → 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} +6 -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 +16 -1
- package/lib/js/Object3d.js +66 -1
- package/lib/js/astro/jd.js +26 -26
- 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/timeline/timelineUtils.js +32 -32
- package/lib/js/control/visibleExtent/drawnode.js +1 -1
- package/lib/js/entity/GeoObject.d.ts +20 -6
- package/lib/js/entity/GeoObject.js +44 -4
- package/lib/js/entity/GeoObjectHandler.d.ts +6 -1
- package/lib/js/entity/GeoObjectHandler.js +58 -6
- 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/Axes.js +4 -4
- 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 +10 -11
- 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/objParser.js +3 -3
- package/lib/js/utils/shared.d.ts +3 -9
- package/lib/js/utils/shared.js +24 -9
- package/package.json +26 -18
- package/lib/js/terrain/MapboxTerrain.js +0 -298
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { Camera } from "../camera/Camera";
|
|
2
|
+
import { Control } from "../control/Control";
|
|
3
|
+
import { RendererEventsHandler } from "./RendererEvents";
|
|
4
|
+
import { EntityCollection } from "../entity/EntityCollection";
|
|
5
|
+
import { Framebuffer, Multisample } from "../webgl/index";
|
|
6
|
+
import { FontAtlas } from "../utils/FontAtlas";
|
|
7
|
+
import { Handler, WebGLBufferExt } from "../webgl/Handler";
|
|
8
|
+
import { LabelWorker } from "../entity/LabelWorker";
|
|
9
|
+
import { RenderNode } from "../scene/RenderNode";
|
|
10
|
+
import { TextureAtlas } from "../utils/TextureAtlas";
|
|
11
|
+
import { Vec2 } from "../math/Vec2";
|
|
12
|
+
import { NumberArray3, Vec3 } from "../math/Vec3";
|
|
13
|
+
import { Vec4 } from "../math/Vec4";
|
|
14
|
+
interface IRendererParams {
|
|
15
|
+
controls?: Control[];
|
|
16
|
+
msaa?: number;
|
|
17
|
+
autoActivate?: boolean;
|
|
18
|
+
fontsSrc?: string;
|
|
19
|
+
}
|
|
20
|
+
interface IPickingObject {
|
|
21
|
+
_pickingColor?: Vec3;
|
|
22
|
+
_pickingColorU?: Float32Array;
|
|
23
|
+
}
|
|
24
|
+
interface IFrameCallbackHandler {
|
|
25
|
+
id: number;
|
|
26
|
+
callback: Function;
|
|
27
|
+
sender: any;
|
|
28
|
+
}
|
|
29
|
+
export interface HTMLDivElementExt extends HTMLDivElement {
|
|
30
|
+
attributions?: HTMLElement;
|
|
31
|
+
}
|
|
32
|
+
declare class Renderer {
|
|
33
|
+
/**
|
|
34
|
+
* Div element with WebGL canvas. Assigned in Globe class.
|
|
35
|
+
* @public
|
|
36
|
+
* @type {HTMLElement | null}
|
|
37
|
+
*/
|
|
38
|
+
div: HTMLDivElementExt | null;
|
|
39
|
+
/**
|
|
40
|
+
* WebGL handler context.
|
|
41
|
+
* @public
|
|
42
|
+
* @type {Handler}
|
|
43
|
+
*/
|
|
44
|
+
handler: Handler;
|
|
45
|
+
exposure: number;
|
|
46
|
+
gamma: number;
|
|
47
|
+
whitepoint: number;
|
|
48
|
+
brightThreshold: number;
|
|
49
|
+
/**
|
|
50
|
+
* Render nodes drawing queue.
|
|
51
|
+
* @public
|
|
52
|
+
* @type {Array.<RenderNode>}
|
|
53
|
+
*/
|
|
54
|
+
_renderNodesArr: RenderNode[];
|
|
55
|
+
/**
|
|
56
|
+
* Render nodes store for the comfortable access by the node name.
|
|
57
|
+
* @public
|
|
58
|
+
* @type {Object.<RenderNode>}
|
|
59
|
+
*/
|
|
60
|
+
renderNodes: Record<string, RenderNode>;
|
|
61
|
+
/**
|
|
62
|
+
* Current active camera.
|
|
63
|
+
* @public
|
|
64
|
+
* @type {Camera}
|
|
65
|
+
*/
|
|
66
|
+
activeCamera: Camera | null;
|
|
67
|
+
/**
|
|
68
|
+
* Renderer events. Represents interface for setting events like mousemove, draw, keypress etc.
|
|
69
|
+
* @public
|
|
70
|
+
* @type {RendererEvents}
|
|
71
|
+
*/
|
|
72
|
+
events: RendererEventsHandler;
|
|
73
|
+
/**
|
|
74
|
+
* Controls array.
|
|
75
|
+
* @public
|
|
76
|
+
* @type {Object}
|
|
77
|
+
*/
|
|
78
|
+
controls: Record<string, Control>;
|
|
79
|
+
/**
|
|
80
|
+
* Provides exchange between controls.
|
|
81
|
+
* @public
|
|
82
|
+
* @type {any}
|
|
83
|
+
*/
|
|
84
|
+
controlsBag: any;
|
|
85
|
+
/**
|
|
86
|
+
* Hash table for drawing objects.
|
|
87
|
+
* @public
|
|
88
|
+
* @type {Map<string, any>}
|
|
89
|
+
*/
|
|
90
|
+
colorObjects: Map<string, any>;
|
|
91
|
+
/**
|
|
92
|
+
* Color picking objects rendering queue.
|
|
93
|
+
* @type {Function[]}
|
|
94
|
+
*/
|
|
95
|
+
protected _pickingCallbacks: IFrameCallbackHandler[];
|
|
96
|
+
/**
|
|
97
|
+
* Picking objects(labels and billboards) framebuffer.
|
|
98
|
+
* @public
|
|
99
|
+
* @type {Framebuffer}
|
|
100
|
+
*/
|
|
101
|
+
pickingFramebuffer: Framebuffer | null;
|
|
102
|
+
protected _tempPickingPix_: Uint8Array;
|
|
103
|
+
/**
|
|
104
|
+
* @public
|
|
105
|
+
* @type {Framebuffer}
|
|
106
|
+
*/
|
|
107
|
+
distanceFramebuffer: Framebuffer | null;
|
|
108
|
+
/**
|
|
109
|
+
* @type {Function[]}
|
|
110
|
+
*/
|
|
111
|
+
protected _distanceCallbacks: IFrameCallbackHandler[];
|
|
112
|
+
protected _tempDistancePix_: Uint8Array;
|
|
113
|
+
/**
|
|
114
|
+
* Depth objects rendering queue.
|
|
115
|
+
* @type {Function[]}
|
|
116
|
+
*/
|
|
117
|
+
protected _depthCallbacks: IFrameCallbackHandler[];
|
|
118
|
+
depthFramebuffer: Framebuffer | null;
|
|
119
|
+
protected _msaa: number;
|
|
120
|
+
protected _internalFormat: string;
|
|
121
|
+
protected _format: string;
|
|
122
|
+
protected _type: string;
|
|
123
|
+
sceneFramebuffer: Framebuffer | Multisample | null;
|
|
124
|
+
protected blitFramebuffer: Framebuffer | null;
|
|
125
|
+
protected toneMappingFramebuffer: Framebuffer | null;
|
|
126
|
+
protected _initialized: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Texture atlas for the billboards images. One atlas per node.
|
|
129
|
+
* @public
|
|
130
|
+
* @type {TextureAtlas}
|
|
131
|
+
*/
|
|
132
|
+
billboardsTextureAtlas: TextureAtlas;
|
|
133
|
+
/**
|
|
134
|
+
* Texture atlas for the billboards images. One atlas per node.
|
|
135
|
+
* @public
|
|
136
|
+
* @type {TextureAtlas}
|
|
137
|
+
*/
|
|
138
|
+
geoObjectsTextureAtlas: TextureAtlas;
|
|
139
|
+
/**
|
|
140
|
+
* Texture font atlas for the font families and styles. One atlas per node.
|
|
141
|
+
* @public
|
|
142
|
+
* @type {FontAtlas}
|
|
143
|
+
*/
|
|
144
|
+
fontAtlas: FontAtlas;
|
|
145
|
+
protected _entityCollections: EntityCollection[];
|
|
146
|
+
protected _currentOutput: string;
|
|
147
|
+
protected _fnScreenFrame: Function | null;
|
|
148
|
+
labelWorker: LabelWorker;
|
|
149
|
+
__useDistanceFramebuffer__: boolean;
|
|
150
|
+
screenDepthFramebuffer: Framebuffer | null;
|
|
151
|
+
screenFramePositionBuffer: WebGLBufferExt | null;
|
|
152
|
+
screenTexture: Record<string, WebGLTexture>;
|
|
153
|
+
outputTexture: WebGLTexture | null;
|
|
154
|
+
protected _skipDistanceFrame: boolean;
|
|
155
|
+
protected _distancePixelBuffer: WebGLBuffer | null;
|
|
156
|
+
protected _skipPickingFrame: boolean;
|
|
157
|
+
protected _pickingPixelBuffer: WebGLBuffer | null;
|
|
158
|
+
protected _readDistanceBuffer: () => void;
|
|
159
|
+
protected _readPickingBuffer: () => void;
|
|
160
|
+
constructor(handler: Handler, params?: IRendererParams);
|
|
161
|
+
enableBlendOneSrcAlpha(): void;
|
|
162
|
+
enableBlendDefault(): void;
|
|
163
|
+
/**
|
|
164
|
+
* Sets renderer events activity.
|
|
165
|
+
* @param {Boolean} activity - Events activity.
|
|
166
|
+
*/
|
|
167
|
+
setEventsActivity(activity: boolean): void;
|
|
168
|
+
addDepthCallback(sender: any, callback: Function): number;
|
|
169
|
+
removeDepthCallback(id: number): void;
|
|
170
|
+
addDistanceCallback(sender: any, callback: Function): number;
|
|
171
|
+
removeDistanceCallback(id: number): void;
|
|
172
|
+
/**
|
|
173
|
+
* Adds picking rendering callback function.
|
|
174
|
+
* @param {object} sender - Callback context.
|
|
175
|
+
* @param {Function} callback - Rendering callback.
|
|
176
|
+
* @returns {Number} Handler id
|
|
177
|
+
*/
|
|
178
|
+
addPickingCallback(sender: any, callback: Function): number;
|
|
179
|
+
/**
|
|
180
|
+
* Removes picking rendering callback function.
|
|
181
|
+
* @param {Number} id - Handler id to remove.
|
|
182
|
+
*/
|
|
183
|
+
removePickingCallback(id: number): void;
|
|
184
|
+
getPickingObject<T>(r: number, g: number, b: number): T;
|
|
185
|
+
getPickingObjectArr<T>(arr: NumberArray3 | Uint8Array): T;
|
|
186
|
+
getPickingObject3v<T>(vec: Vec3 | Vec4): T;
|
|
187
|
+
/**
|
|
188
|
+
* Assign picking color to the object.
|
|
189
|
+
* @public
|
|
190
|
+
* @param {Object} obj - Object that presume to be picked.
|
|
191
|
+
*/
|
|
192
|
+
assignPickingColor<T>(obj: T & IPickingObject): void;
|
|
193
|
+
/**
|
|
194
|
+
* Removes picking color from object.
|
|
195
|
+
* @public
|
|
196
|
+
* @param {Object} obj - Object to remove picking color.
|
|
197
|
+
*/
|
|
198
|
+
clearPickingColor<T>(obj: T & IPickingObject): void;
|
|
199
|
+
/**
|
|
200
|
+
* Get the client width.
|
|
201
|
+
* @public
|
|
202
|
+
* @returns {number} -
|
|
203
|
+
*/
|
|
204
|
+
getWidth(): number;
|
|
205
|
+
/**
|
|
206
|
+
* Get the client height.
|
|
207
|
+
* @public
|
|
208
|
+
* @returns {number} -
|
|
209
|
+
*/
|
|
210
|
+
getHeight(): number;
|
|
211
|
+
/**
|
|
212
|
+
* Get center of the canvas
|
|
213
|
+
* @public
|
|
214
|
+
* @returns {Vec2} -
|
|
215
|
+
*/
|
|
216
|
+
getCenter(): Vec2;
|
|
217
|
+
/**
|
|
218
|
+
* Get center of the screen viewport
|
|
219
|
+
* @public
|
|
220
|
+
* @returns {Vec2} -
|
|
221
|
+
*/
|
|
222
|
+
getClientCenter(): Vec2;
|
|
223
|
+
/**
|
|
224
|
+
* Add the given control to the renderer.
|
|
225
|
+
* @param {Control} control - Control.
|
|
226
|
+
*/
|
|
227
|
+
addControl(control: Control): void;
|
|
228
|
+
/**
|
|
229
|
+
* Add the given controls array to the planet node.
|
|
230
|
+
* @param {Array.<Control>} cArr - Control array.
|
|
231
|
+
*/
|
|
232
|
+
addControls(cArr: Control[]): void;
|
|
233
|
+
/**
|
|
234
|
+
* Remove control from the renderer.
|
|
235
|
+
* @param {Control} control - Control.
|
|
236
|
+
*/
|
|
237
|
+
removeControl(control: Control): void;
|
|
238
|
+
isInitialized(): boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Renderer initialization.
|
|
241
|
+
* @public
|
|
242
|
+
*/
|
|
243
|
+
initialize(): void;
|
|
244
|
+
_initReadPixelsBuffers(): void;
|
|
245
|
+
_initializeControls(): void;
|
|
246
|
+
resize(): void;
|
|
247
|
+
setCurrentScreen(screenName: string): void;
|
|
248
|
+
_resizeStart(): void;
|
|
249
|
+
_resizeEnd(): void;
|
|
250
|
+
removeNode(renderNode: RenderNode): void;
|
|
251
|
+
/**
|
|
252
|
+
* Adds render node to the renderer.
|
|
253
|
+
* @public
|
|
254
|
+
* @param {RenderNode} renderNode - Render node.
|
|
255
|
+
*/
|
|
256
|
+
addNode(renderNode: RenderNode): void;
|
|
257
|
+
protected _initializeRenderNodes(): void;
|
|
258
|
+
/**
|
|
259
|
+
* Adds render node to the renderer before specific node.
|
|
260
|
+
* @public
|
|
261
|
+
* @param {RenderNode} renderNode - Render node.
|
|
262
|
+
* @param {RenderNode} renderNodeBefore - Insert before the renderNodeBefore node.
|
|
263
|
+
*/
|
|
264
|
+
addNodeBefore(renderNode: RenderNode, renderNodeBefore: RenderNode): void;
|
|
265
|
+
/**
|
|
266
|
+
* Adds render nodes array to the renderer.
|
|
267
|
+
* @public
|
|
268
|
+
* @param {Array.<RenderNode>} nodesArr - Render nodes array.
|
|
269
|
+
*/
|
|
270
|
+
addNodes(nodesArr: RenderNode[]): void;
|
|
271
|
+
getMaxMSAA(internalFormat: string): any;
|
|
272
|
+
getMSAA(): number;
|
|
273
|
+
/**
|
|
274
|
+
* TODO: replace with cache friendly linked list by BillboardHandler, LabelHandler etc.
|
|
275
|
+
*/
|
|
276
|
+
enqueueEntityCollectionsToDraw(ecArr: EntityCollection[]): void;
|
|
277
|
+
/**
|
|
278
|
+
* Draws opaque items entity collections.
|
|
279
|
+
* @protected
|
|
280
|
+
*/
|
|
281
|
+
protected _drawOpaqueEntityCollections(): void;
|
|
282
|
+
/**
|
|
283
|
+
* Draws transparent items entity collections.
|
|
284
|
+
* @protected
|
|
285
|
+
*/
|
|
286
|
+
protected _drawTransparentEntityCollections(): void;
|
|
287
|
+
protected _clearEntityCollectionQueue(): void;
|
|
288
|
+
/**
|
|
289
|
+
* Draw nodes.
|
|
290
|
+
* @public
|
|
291
|
+
*/
|
|
292
|
+
draw(): void;
|
|
293
|
+
protected _screenFrameMSAA(): void;
|
|
294
|
+
protected _screenFrameNoMSAA(): void;
|
|
295
|
+
/**
|
|
296
|
+
* Draw picking objects framebuffer.
|
|
297
|
+
* @private
|
|
298
|
+
*/
|
|
299
|
+
protected _drawPickingBuffer(): void;
|
|
300
|
+
/**
|
|
301
|
+
* Draw picking objects framebuffer.
|
|
302
|
+
* @protected
|
|
303
|
+
*/
|
|
304
|
+
protected _drawDistanceBuffer(): void;
|
|
305
|
+
protected _drawDepthBuffer(): void;
|
|
306
|
+
protected _readPickingBuffer_webgl1: () => void;
|
|
307
|
+
protected _readPickingBuffer_webgl2: () => void;
|
|
308
|
+
protected _readDistanceBuffer_webgl1: () => void;
|
|
309
|
+
protected _readDistanceBuffer_webgl2: () => void;
|
|
310
|
+
readPickingColor(x: number, y: number, outColor: NumberArray3 | Uint8Array): void;
|
|
311
|
+
readDistanceColor(x: number, y: number, outColor: NumberArray3 | Uint8Array): void;
|
|
312
|
+
/**
|
|
313
|
+
* Function starts renderer
|
|
314
|
+
* @public
|
|
315
|
+
*/
|
|
316
|
+
start(): void;
|
|
317
|
+
destroy(): void;
|
|
318
|
+
}
|
|
319
|
+
export { Renderer };
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { Events, EventsHandler, EventCallback } from "../Events";
|
|
2
|
+
import { KeyboardHandler } from "../input/KeyboardHandler";
|
|
3
|
+
import { MouseHandler, MouseHandlerEvent, MouseEventExt } from "../input/MouseHandler";
|
|
4
|
+
import { Renderer } from "./Renderer";
|
|
5
|
+
import { TouchEventExt, TouchHandler } from "../input/TouchHandler";
|
|
6
|
+
import { Vec2 } from "../math/Vec2";
|
|
7
|
+
import { Vec3 } from "../math/Vec3";
|
|
8
|
+
export type RendererEventsHandler = RendererEvents & EventsHandler<RendererEventsType>;
|
|
9
|
+
export declare function createRendererEvents(renderer: Renderer): RendererEvents;
|
|
10
|
+
export type RendererEventsType = [
|
|
11
|
+
"draw",
|
|
12
|
+
"drawtransparent",
|
|
13
|
+
"postdraw",
|
|
14
|
+
"resize",
|
|
15
|
+
"resizeend",
|
|
16
|
+
"mouseenter",
|
|
17
|
+
"mouseleave",
|
|
18
|
+
"mousemove",
|
|
19
|
+
"mousestop",
|
|
20
|
+
"lclick",
|
|
21
|
+
"rclick",
|
|
22
|
+
"mclick",
|
|
23
|
+
"ldblclick",
|
|
24
|
+
"rdblclick",
|
|
25
|
+
"mdblclick",
|
|
26
|
+
"lup",
|
|
27
|
+
"rup",
|
|
28
|
+
"mup",
|
|
29
|
+
"ldown",
|
|
30
|
+
"rdown",
|
|
31
|
+
"mdown",
|
|
32
|
+
"lhold",
|
|
33
|
+
"rhold",
|
|
34
|
+
"mhold",
|
|
35
|
+
"mousewheel",
|
|
36
|
+
"touchstart",
|
|
37
|
+
"touchend",
|
|
38
|
+
"touchcancel",
|
|
39
|
+
"touchmove",
|
|
40
|
+
"doubletouch",
|
|
41
|
+
"touchleave",
|
|
42
|
+
"touchenter"
|
|
43
|
+
];
|
|
44
|
+
export interface IBaseInputState {
|
|
45
|
+
/** Current screen mouse X position. */
|
|
46
|
+
clientX: number;
|
|
47
|
+
/** Current screen mouse Y position. */
|
|
48
|
+
clientY: number;
|
|
49
|
+
/** Current screen mouse position. */
|
|
50
|
+
pos: Vec2;
|
|
51
|
+
/** Current touch X - coordinate. */
|
|
52
|
+
x: number;
|
|
53
|
+
/** Current touch Y - coordinate. */
|
|
54
|
+
y: number;
|
|
55
|
+
/** Current touch X - coordinate from 0 to 1 */
|
|
56
|
+
nx: number;
|
|
57
|
+
/** Current touch Y - coordinate from 0 to 1 */
|
|
58
|
+
ny: number;
|
|
59
|
+
/** Previous touch X coordinate. */
|
|
60
|
+
prev_x: number;
|
|
61
|
+
/** Previous touch Y coordinate. */
|
|
62
|
+
prev_y: number;
|
|
63
|
+
/** Screen touch position world direction. */
|
|
64
|
+
direction: Vec3;
|
|
65
|
+
/** Current touched(picking) object. */
|
|
66
|
+
pickingObject: any | null;
|
|
67
|
+
/** Renderer instance. */
|
|
68
|
+
renderer: Renderer;
|
|
69
|
+
/** Touching is moving now. */
|
|
70
|
+
moving: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface IMouseState extends IBaseInputState {
|
|
73
|
+
/** Left mouse button has stopped pushing down right now.*/
|
|
74
|
+
leftButtonUp: boolean;
|
|
75
|
+
/** Right mouse button has stopped pushing down right now.*/
|
|
76
|
+
rightButtonUp: boolean;
|
|
77
|
+
/** Middle mouse button has stopped pushing down right now.*/
|
|
78
|
+
middleButtonUp: boolean;
|
|
79
|
+
/** Left mouse button has pushed now.*/
|
|
80
|
+
leftButtonDown: boolean;
|
|
81
|
+
/** Right mouse button has pushed now.*/
|
|
82
|
+
rightButtonDown: boolean;
|
|
83
|
+
/** Middle mouse button has pushed now.*/
|
|
84
|
+
middleButtonDown: boolean;
|
|
85
|
+
/** Left mouse button is pushing.*/
|
|
86
|
+
leftButtonHold: boolean;
|
|
87
|
+
/** Right mouse button is pushing.*/
|
|
88
|
+
rightButtonHold: boolean;
|
|
89
|
+
/** Middle mouse button is pushing.*/
|
|
90
|
+
middleButtonHold: boolean;
|
|
91
|
+
/** Left mouse button has clicked twice now.*/
|
|
92
|
+
leftButtonDoubleClick: boolean;
|
|
93
|
+
/** Right mouse button has clicked twice now.*/
|
|
94
|
+
rightButtonDoubleClick: boolean;
|
|
95
|
+
/** Middle mouse button has clicked twice now.*/
|
|
96
|
+
middleButtonDoubleClick: boolean;
|
|
97
|
+
/** Left mouse button has clicked now. */
|
|
98
|
+
leftButtonClick: boolean;
|
|
99
|
+
/** Right mouse button has clicked now. */
|
|
100
|
+
rightButtonClick: boolean;
|
|
101
|
+
/** Middle mouse button has clicked now. */
|
|
102
|
+
middleButtonClick: boolean;
|
|
103
|
+
/** Mouse has just stopped now. */
|
|
104
|
+
justStopped: boolean;
|
|
105
|
+
/** Mose double click delay response time.*/
|
|
106
|
+
doubleClickDelay: number;
|
|
107
|
+
/** Mose click delay response time.*/
|
|
108
|
+
clickDelay: number;
|
|
109
|
+
/** Mouse wheel. */
|
|
110
|
+
wheelDelta: number;
|
|
111
|
+
/** JavaScript mouse system event message. */
|
|
112
|
+
sys: MouseEvent | null;
|
|
113
|
+
}
|
|
114
|
+
export interface ITouchState extends IBaseInputState {
|
|
115
|
+
/** Touch has ended right now.*/
|
|
116
|
+
touchEnd: boolean;
|
|
117
|
+
/** Touch has started right now.*/
|
|
118
|
+
touchStart: boolean;
|
|
119
|
+
/** Touch canceled.*/
|
|
120
|
+
touchCancel: boolean;
|
|
121
|
+
/** Touched twice.*/
|
|
122
|
+
doubleTouch: boolean;
|
|
123
|
+
/** Double touching responce delay.*/
|
|
124
|
+
doubleTouchDelay: number;
|
|
125
|
+
/** Double touching responce radius in screen pixels.*/
|
|
126
|
+
doubleTouchRadius: number;
|
|
127
|
+
/** JavaScript mouse system event message. */
|
|
128
|
+
sys: TouchEventExt | null;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Renderer events handler.
|
|
132
|
+
* @class
|
|
133
|
+
* @param {Renderer} renderer - Renderer object, events that works for.
|
|
134
|
+
*/
|
|
135
|
+
declare class RendererEvents extends Events<RendererEventsType> implements RendererEventsHandler {
|
|
136
|
+
/**
|
|
137
|
+
* Assigned renderer.
|
|
138
|
+
* @public
|
|
139
|
+
* @type {Renderer}
|
|
140
|
+
*/
|
|
141
|
+
renderer: Renderer;
|
|
142
|
+
/**
|
|
143
|
+
* Low level touch events handler.
|
|
144
|
+
* @protected
|
|
145
|
+
* @type {TouchHandler}
|
|
146
|
+
*/
|
|
147
|
+
protected _touchHandler: TouchHandler;
|
|
148
|
+
/**
|
|
149
|
+
* Low level mouse events handler.
|
|
150
|
+
* @protected
|
|
151
|
+
* @type {MouseHandler}
|
|
152
|
+
*/
|
|
153
|
+
protected _mouseHandler: MouseHandler;
|
|
154
|
+
/**
|
|
155
|
+
* Low level keyboard events handler.
|
|
156
|
+
* @protected
|
|
157
|
+
* @type {KeyboardHandler}
|
|
158
|
+
*/
|
|
159
|
+
protected _keyboardHandler: KeyboardHandler;
|
|
160
|
+
protected _active: boolean;
|
|
161
|
+
clickRadius: number;
|
|
162
|
+
/**
|
|
163
|
+
* Current mouse state.
|
|
164
|
+
* @public
|
|
165
|
+
* @type {IMouseState}
|
|
166
|
+
*/
|
|
167
|
+
mouseState: IMouseState;
|
|
168
|
+
/**
|
|
169
|
+
* Current touch state.
|
|
170
|
+
* @public
|
|
171
|
+
* @type {ITouchState}
|
|
172
|
+
*/
|
|
173
|
+
touchState: ITouchState;
|
|
174
|
+
protected _dblTchCoords: Vec2;
|
|
175
|
+
protected _oneTouchStart: boolean;
|
|
176
|
+
protected _dblTchBegins: number;
|
|
177
|
+
protected _mousestopThread: any | null;
|
|
178
|
+
protected _ldblClkBegins: number;
|
|
179
|
+
protected _rdblClkBegins: number;
|
|
180
|
+
protected _mdblClkBegins: number;
|
|
181
|
+
protected _lClkBegins: number;
|
|
182
|
+
protected _rClkBegins: number;
|
|
183
|
+
protected _mClkBegins: number;
|
|
184
|
+
protected _lclickX: number;
|
|
185
|
+
protected _lclickY: number;
|
|
186
|
+
protected _rclickX: number;
|
|
187
|
+
protected _rclickY: number;
|
|
188
|
+
protected _mclickX: number;
|
|
189
|
+
protected _mclickY: number;
|
|
190
|
+
protected _isMouseInside: boolean;
|
|
191
|
+
protected _entityPickingEventsActive: boolean;
|
|
192
|
+
constructor(renderer: Renderer);
|
|
193
|
+
pointerEvent(): boolean;
|
|
194
|
+
get active(): boolean;
|
|
195
|
+
set active(isActive: boolean);
|
|
196
|
+
/**
|
|
197
|
+
* Used in render node frame.
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
handleEvents(): void;
|
|
201
|
+
on(name: string, p0: EventCallback | number, p1?: number | EventCallback, p2?: any, keyPriority?: number): void;
|
|
202
|
+
off(name: string, p1?: EventCallback | number | null, p2?: EventCallback): void;
|
|
203
|
+
/**
|
|
204
|
+
* Check key is pressed.
|
|
205
|
+
* @public
|
|
206
|
+
* @param {number} keyCode - Key code
|
|
207
|
+
* @return {boolean}
|
|
208
|
+
*/
|
|
209
|
+
isKeyPressed(keyCode: number): boolean;
|
|
210
|
+
releaseKeys(): void;
|
|
211
|
+
/**
|
|
212
|
+
* Renderer events initialization.
|
|
213
|
+
* @public
|
|
214
|
+
*/
|
|
215
|
+
initialize(): void;
|
|
216
|
+
/**
|
|
217
|
+
* @protected
|
|
218
|
+
*/
|
|
219
|
+
protected onMouseWheel(event: MouseEventExt): void;
|
|
220
|
+
updateButtonsStates(buttons: number): void;
|
|
221
|
+
protected onMouseMove(sys: MouseEvent, event?: MouseHandlerEvent): void;
|
|
222
|
+
protected onMouseLeave(sys: MouseEvent): void;
|
|
223
|
+
protected onMouseEnter(sys: MouseEvent): void;
|
|
224
|
+
protected onMouseDown(sys: MouseEvent, event?: MouseHandlerEvent): void;
|
|
225
|
+
protected onMouseUp(sys: MouseEvent, event?: MouseHandlerEvent): void;
|
|
226
|
+
protected onTouchStart(event: TouchEventExt): void;
|
|
227
|
+
/**
|
|
228
|
+
* @protected
|
|
229
|
+
*/
|
|
230
|
+
protected onTouchEnd(event: TouchEventExt): void;
|
|
231
|
+
protected onTouchCancel(event: TouchEventExt): void;
|
|
232
|
+
protected onTouchMove(event: TouchEventExt): void;
|
|
233
|
+
protected entityPickingEvents(): void;
|
|
234
|
+
protected handleMouseEvents(): void;
|
|
235
|
+
/**
|
|
236
|
+
* @protected
|
|
237
|
+
*/
|
|
238
|
+
protected handleTouchEvents(): void;
|
|
239
|
+
}
|
|
240
|
+
export { RendererEvents };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RenderNode } from './RenderNode';
|
|
2
|
+
import { WebGLBufferExt } from "../webgl/Handler";
|
|
3
|
+
declare class Axes extends RenderNode {
|
|
4
|
+
size: number;
|
|
5
|
+
axesBuffer: WebGLBufferExt | null;
|
|
6
|
+
axesColorBuffer: WebGLBufferExt | null;
|
|
7
|
+
constructor(size?: number);
|
|
8
|
+
init(): void;
|
|
9
|
+
frame(): void;
|
|
10
|
+
createAxesBuffer(gridSize: number): void;
|
|
11
|
+
}
|
|
12
|
+
export { Axes };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scene node base class.
|
|
3
|
+
* @class
|
|
4
|
+
* @param {string} name - Node name.
|
|
5
|
+
*/
|
|
6
|
+
declare class BaseNode {
|
|
7
|
+
static __counter__: number;
|
|
8
|
+
protected __id: number;
|
|
9
|
+
/**
|
|
10
|
+
* Node name.
|
|
11
|
+
* @public
|
|
12
|
+
* @type {string}
|
|
13
|
+
*/
|
|
14
|
+
protected _name: string;
|
|
15
|
+
/**
|
|
16
|
+
* Top scene tree node pointer.
|
|
17
|
+
* @public
|
|
18
|
+
* @type {BaseNode}
|
|
19
|
+
*/
|
|
20
|
+
topNode: BaseNode;
|
|
21
|
+
protected _dictionary: Record<string, BaseNode>;
|
|
22
|
+
/**
|
|
23
|
+
* Children nodes.
|
|
24
|
+
* @public
|
|
25
|
+
* @type {Array.<BaseNode>}
|
|
26
|
+
*/
|
|
27
|
+
childNodes: BaseNode[];
|
|
28
|
+
/**
|
|
29
|
+
* Parent node pointer.
|
|
30
|
+
* @public
|
|
31
|
+
* @type {BaseNode}
|
|
32
|
+
*/
|
|
33
|
+
parentNode: BaseNode | null;
|
|
34
|
+
constructor(name?: string);
|
|
35
|
+
get name(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Adds node to the current hierarchy.
|
|
38
|
+
* @public
|
|
39
|
+
* @type {BaseNode}
|
|
40
|
+
*/
|
|
41
|
+
addNode(node: BaseNode): void;
|
|
42
|
+
/**
|
|
43
|
+
* Destroy node.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
destroy(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Gets node by name in the current.
|
|
49
|
+
* @public
|
|
50
|
+
* @param {string} name - Node name.
|
|
51
|
+
* @return {RenderNode} Node object in the current node.
|
|
52
|
+
*/
|
|
53
|
+
getNodeByName(name: string): BaseNode;
|
|
54
|
+
/**
|
|
55
|
+
* Clear current node.
|
|
56
|
+
* @protected
|
|
57
|
+
*/
|
|
58
|
+
protected _clear(): void;
|
|
59
|
+
isEqual(node: BaseNode): boolean;
|
|
60
|
+
}
|
|
61
|
+
export { BaseNode };
|