@openglobus/og 0.17.1 → 0.18.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 +75 -46
- package/dist/@openglobus/og.esm.js +1 -20
- package/dist/@openglobus/og.esm.js.map +1 -1
- package/dist/@openglobus/og.umd.js +1 -20
- package/dist/@openglobus/og.umd.js.map +1 -1
- package/dist/@openglobus/res/fonts/Karla-Bold.json +5252 -0
- package/dist/@openglobus/res/fonts/Karla-Bold.ttf.cfg +920 -0
- package/dist/@openglobus/res/fonts/Karla-Bold.ttf.png +0 -0
- package/dist/@openglobus/res/fonts/Karla-Light.json +5252 -0
- package/dist/@openglobus/res/fonts/Karla-Light.ttf.cfg +830 -0
- package/dist/@openglobus/res/fonts/Karla-Light.ttf.png +0 -0
- package/dist/@openglobus/res/fonts/Karla-Medium.json +5252 -0
- package/dist/@openglobus/res/fonts/Karla-Medium.ttf.cfg +1196 -0
- package/dist/@openglobus/res/fonts/Karla-Medium.ttf.png +0 -0
- package/dist/@openglobus/res/fonts/NotoSansArabic-Regular.json +3332 -0
- package/dist/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.cfg +1370 -0
- package/dist/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.png +0 -0
- package/dist/@openglobus/res/fonts/Roboto-Regular.json +37147 -0
- package/dist/@openglobus/res/fonts/Roboto-Regular.ttf.cfg +1340 -0
- package/dist/@openglobus/res/fonts/Roboto-Regular.ttf.png +0 -0
- package/dist/@openglobus/res/fonts/arial.json +4321 -0
- package/dist/@openglobus/res/fonts/arial.ttf.cfg +1570 -0
- package/dist/@openglobus/res/fonts/arial.ttf.png +0 -0
- package/dist/@openglobus/res/night-4326.png +0 -0
- package/dist/@openglobus/res/night.png +0 -0
- package/dist/@openglobus/res/spec.png +0 -0
- package/package.json +25 -23
- package/src/{og/Clock.js → Clock.ts} +100 -78
- package/src/Deferred.ts +17 -0
- package/src/Events.ts +200 -0
- package/src/{og/Extent.js → Extent.ts} +324 -352
- package/src/Globe.ts +363 -0
- package/src/{og/ImageCanvas.js → ImageCanvas.ts} +244 -236
- package/src/Lock.ts +41 -0
- package/src/{og/LonLat.js → LonLat.ts} +50 -47
- package/src/{og/Object3d.js → Object3d.ts} +89 -55
- package/src/Popup.ts +228 -0
- package/src/{og/QueueArray.js → QueueArray.ts} +76 -75
- package/src/{og/Rectangle.js → Rectangle.ts} +115 -111
- package/src/Stack.ts +58 -0
- package/src/{og/astro/astro.js → astro/astro.ts} +49 -51
- package/src/{og/astro/earth.js → astro/earth.ts} +8 -9
- package/src/{og/astro/jd.js → astro/jd.ts} +92 -111
- package/src/{og/astro/orbit.js → astro/orbit.ts} +35 -37
- package/src/{og/astro/rotation.js → astro/rotation.ts} +4 -6
- package/src/{og/bv/Box.js → bv/Box.ts} +21 -17
- package/src/{og/bv/Sphere.js → bv/Sphere.ts} +21 -19
- package/src/bv/index.ts +4 -0
- package/src/{og/camera/Camera.js → camera/Camera.ts} +254 -197
- package/src/{og/camera/Frustum.js → camera/Frustum.ts} +137 -111
- package/src/{og/camera/PlanetCamera.js → camera/PlanetCamera.ts} +248 -185
- package/src/camera/index.ts +4 -0
- package/src/{og/cons.js → cons.ts} +14 -18
- package/src/{og/control/Atmosphere.js → control/Atmosphere.ts} +50 -50
- package/src/{og/control/CompassButton.js → control/CompassButton.ts} +27 -30
- package/src/{og/control/Control.js → control/Control.ts} +76 -70
- package/src/{og/control/DebugInfo.js → control/DebugInfo.ts} +130 -62
- package/src/{og/control/DrawingSwitcher.js → control/DrawingSwitcher.ts} +16 -22
- package/src/control/EarthCoordinates.ts +222 -0
- package/src/control/EarthNavigation.ts +293 -0
- package/src/{og/control/GeoImageDragControl.js → control/GeoImageDragControl.ts} +37 -29
- package/src/control/KeyboardNavigation.ts +168 -0
- package/src/{og/control/LayerAnimation.js → control/LayerAnimation.ts} +74 -90
- package/src/control/LayerSwitcher.ts +76 -0
- package/src/{og/control/Lighting.js → control/Lighting.ts} +158 -120
- package/src/control/MouseNavigation.ts +468 -0
- package/src/control/MouseWheelZoomControl.ts +269 -0
- package/src/{og/control/RulerSwitcher.js → control/RulerSwitcher.ts} +18 -20
- package/src/control/ScaleControl.ts +131 -0
- package/src/control/SegmentBoundVisualization.ts +50 -0
- package/src/control/ShowFps.ts +28 -0
- package/src/control/SimpleNavigation.ts +118 -0
- package/src/{og/control/SimpleSkyBackground.js → control/SimpleSkyBackground.ts} +36 -38
- package/src/{og/control/Sun.js → control/Sun.ts} +56 -64
- package/src/control/ToggleWireframe.ts +35 -0
- package/src/control/TouchNavigation.ts +368 -0
- package/src/control/ZoomControl.ts +111 -0
- package/src/control/drawing/DrawingControl.ts +45 -0
- package/src/{og/control/drawing/LineStringDrawingScene.js → control/drawing/LineStringDrawingScene.ts} +28 -35
- package/src/{og/control/drawing/PolygonDrawingScene.js → control/drawing/PolygonDrawingScene.ts} +148 -201
- package/src/{og/control/elevationProfile/ElevationProfile.js → control/elevationProfile/ElevationProfile.ts} +70 -36
- package/src/control/heightRuler/HeightRuler.ts +16 -0
- package/src/{og/control/heightRuler/HeightRulerScene.js → control/heightRuler/HeightRulerScene.ts} +92 -87
- package/src/{og/control/heightRuler/HeightRulerSwitcher.js → control/heightRuler/HeightRulerSwitcher.ts} +3 -3
- package/src/control/index.ts +45 -0
- package/src/control/ruler/Ruler.ts +35 -0
- package/src/{og/control/ruler/RulerScene.js → control/ruler/RulerScene.ts} +163 -121
- package/src/{og/control/selection/Selection.js → control/selection/Selection.ts} +23 -21
- package/src/{og/control/selection/SelectionScene.js → control/selection/SelectionScene.ts} +64 -50
- package/src/{og/control/timeline/TimelineControl.js → control/timeline/TimelineControl.ts} +37 -28
- package/src/{og/control/timeline/TimelineModel.js → control/timeline/TimelineModel.ts} +50 -35
- package/src/{og/control/timeline/TimelineView.js → control/timeline/TimelineView.ts} +162 -113
- package/src/{og/control/timeline/timelineUtils.js → control/timeline/timelineUtils.ts} +11 -10
- package/src/{og/control → control}/visibleExtent/Segment.js +5 -5
- package/src/{og/control → control}/visibleExtent/VisibleExtent.js +8 -15
- package/src/{og/control/visibleExtent/drawnode.js → control/visibleExtent/drawnode.ts} +1 -3
- package/src/{og/ellipsoid/Ellipsoid.js → ellipsoid/Ellipsoid.ts} +113 -59
- package/src/ellipsoid/index.ts +4 -0
- package/src/{og/ellipsoid/wgs84.js → ellipsoid/wgs84.ts} +1 -3
- package/src/{og/entity/BaseBillboard.js → entity/BaseBillboard.ts} +128 -102
- package/src/entity/BaseBillboardHandler.ts +772 -0
- package/src/{og/entity/Billboard.js → entity/Billboard.ts} +77 -47
- package/src/entity/BillboardHandler.ts +135 -0
- package/src/{og/entity/Entity.js → entity/Entity.ts} +285 -226
- package/src/{og/entity/EntityCollection.js → entity/EntityCollection.ts} +340 -247
- package/src/{og/entity/GeoObject.js → entity/GeoObject.ts} +122 -67
- package/src/{og/entity/GeoObjectHandler.js → entity/GeoObjectHandler.ts} +273 -198
- package/src/entity/Geometry.ts +486 -0
- package/src/{og/entity/GeometryHandler.js → entity/GeometryHandler.ts} +383 -541
- package/src/{og/entity/Label.js → entity/Label.ts} +131 -83
- package/src/{og/entity/LabelHandler.js → entity/LabelHandler.ts} +289 -255
- package/src/{og/entity/LabelWorker.js → entity/LabelWorker.ts} +26 -36
- package/src/{og/entity/PointCloud.js → entity/PointCloud.ts} +200 -164
- package/src/entity/PointCloudHandler.ts +125 -0
- package/src/{og/entity/Polyline.js → entity/Polyline.ts} +517 -539
- package/src/{og/entity/PolylineHandler.js → entity/PolylineHandler.ts} +29 -31
- package/src/{og/entity/Ray.js → entity/Ray.ts} +89 -60
- package/src/{og/entity/RayHandler.js → entity/RayHandler.ts} +201 -306
- package/src/{og/entity/Strip.js → entity/Strip.ts} +143 -100
- package/src/{og/entity/StripHandler.js → entity/StripHandler.ts} +76 -72
- package/src/entity/index.ts +12 -0
- package/src/index.ts +173 -0
- package/src/input/KeyboardHandler.ts +196 -0
- package/src/{og/input/MouseHandler.js → input/MouseHandler.ts} +46 -35
- package/src/input/TouchHandler.ts +54 -0
- package/src/{og/input/input.js → input/input.ts} +1 -3
- package/src/{og/layer/BaseGeoImage.js → layer/BaseGeoImage.ts} +174 -107
- package/src/{og/layer/CanvasTiles.js → layer/CanvasTiles.ts} +139 -105
- package/src/{og/layer/GeoImage.js → layer/GeoImage.ts} +62 -52
- package/src/layer/GeoTexture2d.ts +56 -0
- package/src/{og/layer/GeoVideo.js → layer/GeoVideo.ts} +53 -53
- package/src/{og/layer/KML.js → layer/KML.ts} +63 -74
- package/src/{og/layer/Layer.js → layer/Layer.ts} +399 -223
- package/src/{og/layer/Material.js → layer/Material.ts} +40 -35
- package/src/{og/layer/Vector.js → layer/Vector.ts} +319 -267
- package/src/{og/layer/WMS.js → layer/WMS.ts} +76 -64
- package/src/{og/layer/XYZ.js → layer/XYZ.ts} +123 -98
- package/src/layer/index.ts +12 -0
- package/src/{og/light/LightSource.js → light/LightSource.ts} +132 -93
- package/src/{og/math/Line2.js → math/Line2.ts} +11 -8
- package/src/{og/math/Line3.js → math/Line3.ts} +49 -27
- package/src/{og/math/Mat3.js → math/Mat3.ts} +43 -27
- package/src/{og/math/Mat4.js → math/Mat4.ts} +110 -77
- package/src/{og/math/Plane.js → math/Plane.ts} +28 -23
- package/src/{og/math/Quat.js → math/Quat.ts} +238 -222
- package/src/{og/math/Ray.js → math/Ray.ts} +59 -63
- package/src/{og/math/Vec2.js → math/Vec2.ts} +85 -76
- package/src/{og/math/Vec3.js → math/Vec3.ts} +141 -140
- package/src/{og/math/Vec4.js → math/Vec4.ts} +64 -53
- package/src/{og/math/coder.js → math/coder.ts} +30 -27
- package/src/math/index.ts +26 -0
- package/src/{og/math.js → math.ts} +46 -49
- package/src/{og/mercator.js → mercator.ts} +143 -149
- package/src/{og/proj/EPSG3857.js → proj/EPSG3857.ts} +1 -3
- package/src/{og/proj/EPSG4326.js → proj/EPSG4326.ts} +11 -13
- package/src/{og/proj/Proj.js → proj/Proj.ts} +27 -23
- package/src/{og/quadTree/EPSG4326QuadTreeStrategy.js → quadTree/EPSG4326QuadTreeStrategy.ts} +10 -13
- package/src/{og/quadTree/EarthQuadTreeStrategy.js → quadTree/EarthQuadTreeStrategy.ts} +11 -13
- package/src/quadTree/EntityCollectionNode.ts +395 -0
- package/src/{og/quadTree/MarsQuadTreeStrategy.js → quadTree/MarsQuadTreeStrategy.ts} +10 -13
- package/src/{og/quadTree/Node.js → quadTree/Node.ts} +283 -191
- package/src/{og/quadTree/QuadTreeStrategy.js → quadTree/QuadTreeStrategy.ts} +35 -29
- package/src/quadTree/Wgs84QuadTreeStrategy.ts +22 -0
- package/src/quadTree/index.ts +14 -0
- package/src/{og/quadTree/quadTree.js → quadTree/quadTree.ts} +75 -77
- package/src/{og/renderer/Renderer.js → renderer/Renderer.ts} +454 -298
- package/src/{og/renderer/RendererEvents.js → renderer/RendererEvents.ts} +347 -270
- package/src/{og/scene/Axes.js → scene/Axes.ts} +26 -22
- package/src/{og/scene/BaseNode.js → scene/BaseNode.ts} +53 -47
- package/src/{og/scene/Planet.js → scene/Planet.ts} +777 -595
- package/src/{og/scene/RenderNode.js → scene/RenderNode.ts} +105 -91
- package/src/{og/scene/SkyBox.js → scene/SkyBox.ts} +29 -25
- package/src/scene/index.ts +6 -0
- package/src/{og/segment/Segment.js → segment/Segment.ts} +497 -371
- package/src/{og/segment/SegmentLonLat.js → segment/SegmentLonLat.ts} +81 -87
- package/src/{og/segment/SegmentLonLatWgs84.js → segment/SegmentLonLatWgs84.ts} +9 -16
- package/src/{og/segment/Slice.js → segment/Slice.ts} +15 -9
- package/src/{og/segment/segmentHelper.js → segment/segmentHelper.ts} +57 -49
- package/src/{og/shaders/atmos.js → shaders/atmos.ts} +4 -6
- package/src/{og/shaders/billboard.js → shaders/billboard.ts} +3 -5
- package/src/{og/shaders/bloom.js → shaders/bloom.ts} +2 -4
- package/src/{og/shaders/blur.js → shaders/blur.ts} +4 -7
- package/src/{og/shaders/depth.js → shaders/depth.ts} +1 -3
- package/src/{og/shaders/drawnode.js → shaders/drawnode.ts} +19 -21
- package/src/{og/shaders/geoObject.js → shaders/geoObject.ts} +17 -19
- package/src/{og/shaders/label.js → shaders/label.ts} +4 -6
- package/src/{og/shaders/lumFilter.js → shaders/lumFilter.ts} +2 -4
- package/src/{og/shaders/pickingMask.js → shaders/pickingMask.ts} +2 -4
- package/src/{og/shaders/pointCloud.js → shaders/pointCloud.ts} +7 -10
- package/src/{og/shaders/polyline.js → shaders/polyline.ts} +3 -200
- package/src/{og/shaders/ray.js → shaders/ray.ts} +2 -4
- package/src/{og/shaders/screenFrame.js → shaders/screenFrame.ts} +2 -4
- package/src/{og/shaders/skybox.js → shaders/skybox.ts} +7 -9
- package/src/{og/shaders/toneMapping.js → shaders/toneMapping.ts} +2 -4
- package/src/{og/shaders/utils.js → shaders/utils.ts} +0 -2
- package/src/{og/terrain/BilTerrain.js → terrain/BilTerrain.ts} +38 -32
- package/src/terrain/EmptyTerrain.ts +230 -0
- package/src/{og/terrain/Geoid.js → terrain/Geoid.ts} +67 -41
- package/src/{og/terrain/GlobusTerrain.js → terrain/GlobusTerrain.ts} +159 -153
- package/src/{og/terrain/MapboxTerrain.js → terrain/MapboxTerrain.ts} +58 -61
- package/src/terrain/index.ts +6 -0
- package/src/ui/Button.ts +121 -0
- package/src/ui/ButtonGroup.ts +63 -0
- package/src/ui/Dialog.ts +244 -0
- package/src/ui/Slider.ts +188 -0
- package/src/ui/ToggleButton.ts +68 -0
- package/src/{og/ui/View.js → ui/View.ts} +66 -59
- package/src/utils/BaseWorker.ts +60 -0
- package/src/utils/FontAtlas.ts +356 -0
- package/src/{og/utils/GeoImageCreator.js → utils/GeoImageCreator.ts} +45 -29
- package/src/{og/utils/ImagesCacheManager.js → utils/ImagesCacheManager.ts} +85 -70
- package/src/utils/Loader.ts +247 -0
- package/src/{og/utils/NormalMapCreator.js → utils/NormalMapCreator.ts} +114 -77
- package/src/{og/utils/PlainSegmentWorker.js → utils/PlainSegmentWorker.ts} +41 -24
- package/src/{og/utils/TerrainWorker.js → utils/TerrainWorker.ts} +51 -36
- package/src/utils/TextureAtlas.ts +322 -0
- package/src/{og/utils/VectorTileCreator.js → utils/VectorTileCreator.ts} +67 -52
- package/src/{og/utils/colorTable.js → utils/colorTable.ts} +142 -144
- package/src/{og/utils/earcut.js → utils/earcut.ts} +664 -661
- package/src/{og/utils/objParser.js → utils/objParser.ts} +66 -37
- package/src/{og/utils/shared.js → utils/shared.ts} +267 -206
- package/src/utils/units.ts +78 -0
- package/src/webgl/BaseFramebuffer.ts +125 -0
- package/src/webgl/Framebuffer.ts +206 -0
- package/src/webgl/Handler.ts +1414 -0
- package/src/webgl/Multisample.ts +153 -0
- package/src/webgl/Program.ts +451 -0
- package/src/{og/webgl/ProgramController.js → webgl/ProgramController.ts} +44 -43
- package/src/webgl/index.ts +13 -0
- package/src/{og/webgl/types.js → webgl/types.ts} +29 -31
- package/src/webgl/variableHandlers.ts +114 -0
- package/src/og/Deferred.js +0 -11
- package/src/og/Events.js +0 -185
- package/src/og/Globe.js +0 -342
- package/src/og/Lock.js +0 -44
- package/src/og/Popup.js +0 -187
- package/src/og/Stack.js +0 -49
- package/src/og/bv/index.js +0 -4
- package/src/og/camera/index.js +0 -4
- package/src/og/control/EarthCoordinates.js +0 -214
- package/src/og/control/EarthNavigation.js +0 -258
- package/src/og/control/KeyboardNavigation.js +0 -149
- package/src/og/control/LayerSwitcher.js +0 -424
- package/src/og/control/MouseNavigation.js +0 -436
- package/src/og/control/MouseWheelZoomControl.js +0 -253
- package/src/og/control/ScaleControl.js +0 -119
- package/src/og/control/SegmentBoundVisualization.js +0 -54
- package/src/og/control/ShowFps.js +0 -40
- package/src/og/control/SimpleNavigation.js +0 -123
- package/src/og/control/ToggleWireframe.js +0 -35
- package/src/og/control/TouchNavigation.js +0 -350
- package/src/og/control/ZoomControl.js +0 -115
- package/src/og/control/drawing/DrawingControl.js +0 -51
- package/src/og/control/heightRuler/HeightRuler.js +0 -12
- package/src/og/control/index.js +0 -56
- package/src/og/control/ruler/Ruler.js +0 -39
- package/src/og/ellipsoid/index.js +0 -4
- package/src/og/entity/BillboardHandler.js +0 -883
- package/src/og/entity/Geometry.js +0 -320
- package/src/og/entity/PointCloudHandler.js +0 -122
- package/src/og/entity/index.js +0 -9
- package/src/og/index.js +0 -112
- package/src/og/input/KeyboardHandler.js +0 -128
- package/src/og/input/TouchHandler.js +0 -59
- package/src/og/layer/GeoTexture2d.js +0 -50
- package/src/og/layer/index.js +0 -11
- package/src/og/math/index.js +0 -23
- package/src/og/quadTree/EntityCollectionNode.js +0 -391
- package/src/og/quadTree/Wgs84QuadTreeStrategy.js +0 -27
- package/src/og/quadTree/index.js +0 -14
- package/src/og/res/images.js +0 -8
- package/src/og/scene/index.js +0 -5
- package/src/og/terrain/EmptyTerrain.js +0 -174
- package/src/og/terrain/index.js +0 -6
- package/src/og/ui/Button.js +0 -107
- package/src/og/ui/ButtonGroup.js +0 -57
- package/src/og/ui/Dialog.js +0 -239
- package/src/og/ui/Slider.js +0 -170
- package/src/og/ui/ToggleButton.js +0 -51
- package/src/og/ui/UIhelpers.js +0 -155
- package/src/og/utils/BaseWorker.js +0 -46
- package/src/og/utils/FontAtlas.js +0 -218
- package/src/og/utils/Loader.js +0 -188
- package/src/og/utils/TextureAtlas.js +0 -291
- package/src/og/utils/functionComposition.js +0 -13
- package/src/og/utils/units.js +0 -78
- package/src/og/webgl/Framebuffer.js +0 -311
- package/src/og/webgl/Handler.js +0 -1168
- package/src/og/webgl/Multisample.js +0 -275
- package/src/og/webgl/Program.js +0 -407
- package/src/og/webgl/callbacks.js +0 -98
- package/src/og/webgl/index.js +0 -13
- package/src/og.jsdoc +0 -3
- package/types/Clock.d.ts +0 -99
- package/types/Deferred.d.ts +0 -6
- package/types/Events.d.ts +0 -78
- package/types/Extent.d.ts +0 -166
- package/types/Globe.d.ts +0 -108
- package/types/ImageCanvas.d.ts +0 -128
- package/types/Lock.d.ts +0 -12
- package/types/LonLat.d.ts +0 -127
- package/types/Object3d.d.ts +0 -35
- package/types/Popup.d.ts +0 -29
- package/types/QueueArray.d.ts +0 -19
- package/types/Rectangle.d.ts +0 -80
- package/types/Stack.d.ts +0 -19
- package/types/arial.d.ts +0 -49
- package/types/astro/astro.d.ts +0 -38
- package/types/astro/earth.d.ts +0 -7
- package/types/astro/jd.d.ts +0 -254
- package/types/bv/Box.d.ts +0 -30
- package/types/bv/Sphere.d.ts +0 -38
- package/types/bv/index.d.ts +0 -3
- package/types/camera/Camera.d.ts +0 -314
- package/types/camera/Frustum.d.ts +0 -133
- package/types/camera/PlanetCamera.d.ts +0 -219
- package/types/camera/index.d.ts +0 -3
- package/types/cons.d.ts +0 -40
- package/types/control/Atmosphere.d.ts +0 -15
- package/types/control/CompassButton.d.ts +0 -16
- package/types/control/Control.d.ts +0 -104
- package/types/control/DebugInfo.d.ts +0 -19
- package/types/control/DrawingSwitcher.d.ts +0 -13
- package/types/control/EarthCoordinates.d.ts +0 -44
- package/types/control/EarthNavigation.d.ts +0 -43
- package/types/control/GeoImageDragControl.d.ts +0 -14
- package/types/control/KeyboardNavigation.d.ts +0 -24
- package/types/control/LayerAnimation.d.ts +0 -73
- package/types/control/LayerSwitcher.d.ts +0 -64
- package/types/control/Lighting.d.ts +0 -41
- package/types/control/MouseNavigation.d.ts +0 -49
- package/types/control/MouseWheelZoomControl.d.ts +0 -46
- package/types/control/ScaleControl.d.ts +0 -23
- package/types/control/ShowFps.d.ts +0 -11
- package/types/control/SimpleNavigation.d.ts +0 -26
- package/types/control/SimpleSkyBackground.d.ts +0 -15
- package/types/control/Sun.d.ts +0 -53
- package/types/control/ToggleWireframe.d.ts +0 -12
- package/types/control/TouchNavigation.d.ts +0 -54
- package/types/control/ZoomControl.d.ts +0 -26
- package/types/control/drawing/DrawingControl.d.ts +0 -14
- package/types/control/drawing/LineStringDrawingScene.d.ts +0 -5
- package/types/control/drawing/PolygonDrawingScene.d.ts +0 -99
- package/types/control/heightRuler/HeightRuler.d.ts +0 -6
- package/types/control/heightRuler/HeightRulerScene.d.ts +0 -23
- package/types/control/index.d.ts +0 -27
- package/types/control/ruler/Ruler.d.ts +0 -13
- package/types/control/ruler/RulerScene.d.ts +0 -51
- package/types/control/selection/Selection.d.ts +0 -49
- package/types/control/selection/SelectionScene.d.ts +0 -32
- package/types/control/timeline/TimelineControl.d.ts +0 -10
- package/types/control/timeline/TimelineModel.d.ts +0 -33
- package/types/control/timeline/TimelineView.d.ts +0 -57
- package/types/control/timeline/timelineUtils.d.ts +0 -9
- package/types/ellipsoid/Ellipsoid.d.ts +0 -170
- package/types/ellipsoid/index.d.ts +0 -3
- package/types/ellipsoid/wgs84.d.ts +0 -6
- package/types/entity/BaseBillboard.d.ts +0 -215
- package/types/entity/Billboard.d.ts +0 -94
- package/types/entity/BillboardHandler.d.ts +0 -75
- package/types/entity/Entity.d.ts +0 -340
- package/types/entity/EntityCollection.d.ts +0 -303
- package/types/entity/GeoObject.d.ts +0 -117
- package/types/entity/GeoObjectHandler.d.ts +0 -41
- package/types/entity/Geometry.d.ts +0 -79
- package/types/entity/GeometryHandler.d.ts +0 -76
- package/types/entity/Label.d.ts +0 -190
- package/types/entity/LabelHandler.d.ts +0 -31
- package/types/entity/LabelWorker.d.ts +0 -9
- package/types/entity/PointCloud.d.ts +0 -174
- package/types/entity/PointCloudHandler.d.ts +0 -38
- package/types/entity/Polyline.d.ts +0 -307
- package/types/entity/PolylineHandler.d.ts +0 -18
- package/types/entity/Ray.d.ts +0 -122
- package/types/entity/RayHandler.d.ts +0 -63
- package/types/entity/Strip.d.ts +0 -119
- package/types/entity/StripHandler.d.ts +0 -38
- package/types/entity/index.d.ts +0 -8
- package/types/index.d.ts +0 -53
- package/types/input/KeyboardHandler.d.ts +0 -10
- package/types/input/MouseHandler.d.ts +0 -5
- package/types/input/TouchHandler.d.ts +0 -5
- package/types/input/input.d.ts +0 -42
- package/types/layer/BaseGeoImage.d.ts +0 -116
- package/types/layer/CanvasTiles.d.ts +0 -73
- package/types/layer/GeoImage.d.ts +0 -51
- package/types/layer/GeoTexture2d.d.ts +0 -7
- package/types/layer/GeoVideo.d.ts +0 -47
- package/types/layer/KML.d.ts +0 -93
- package/types/layer/Layer.d.ts +0 -320
- package/types/layer/Material.d.ts +0 -45
- package/types/layer/Vector.d.ts +0 -211
- package/types/layer/WMS.d.ts +0 -66
- package/types/layer/XYZ.d.ts +0 -122
- package/types/layer/index.d.ts +0 -10
- package/types/light/LightSource.d.ts +0 -178
- package/types/math/Line2.d.ts +0 -11
- package/types/math/Line3.d.ts +0 -10
- package/types/math/Mat3.d.ts +0 -65
- package/types/math/Mat4.d.ts +0 -176
- package/types/math/Plane.d.ts +0 -18
- package/types/math/Quat.d.ts +0 -379
- package/types/math/Ray.d.ts +0 -82
- package/types/math/Vec2.d.ts +0 -309
- package/types/math/Vec3.d.ts +0 -472
- package/types/math/Vec4.d.ts +0 -161
- package/types/math/coder.d.ts +0 -43
- package/types/math/index.d.ts +0 -11
- package/types/math.d.ts +0 -268
- package/types/mercator.d.ts +0 -92
- package/types/proj/EPSG3857.d.ts +0 -6
- package/types/proj/EPSG4326.d.ts +0 -6
- package/types/proj/Proj.d.ts +0 -42
- package/types/quadTree/EPSG4326QuadTreeStrategy.d.ts +0 -3
- package/types/quadTree/EarthQuadTreeStrategy.d.ts +0 -3
- package/types/quadTree/EntityCollectionNode.d.ts +0 -41
- package/types/quadTree/MarsQuadTreeStrategy.d.ts +0 -3
- package/types/quadTree/Node.d.ts +0 -58
- package/types/quadTree/QuadTreeStrategy.d.ts +0 -21
- package/types/quadTree/Wgs84QuadTreeStrategy.d.ts +0 -3
- package/types/quadTree/index.d.ts +0 -12
- package/types/quadTree/quadTree.d.ts +0 -40
- package/types/renderer/Renderer.d.ts +0 -291
- package/types/renderer/RendererEvents.d.ts +0 -255
- package/types/res/images.d.ts +0 -2
- package/types/scene/Axes.d.ts +0 -10
- package/types/scene/BaseNode.d.ts +0 -60
- package/types/scene/Planet.d.ts +0 -595
- package/types/scene/RenderNode.d.ts +0 -152
- package/types/scene/SkyBox.d.ts +0 -9
- package/types/scene/index.d.ts +0 -4
- package/types/segment/Segment.d.ts +0 -273
- package/types/segment/SegmentLonLat.d.ts +0 -22
- package/types/segment/SegmentLonLatWgs84.d.ts +0 -4
- package/types/segment/Slice.d.ts +0 -10
- package/types/segment/segmentHelper.d.ts +0 -13
- package/types/shaders/atmos.d.ts +0 -4
- package/types/shaders/billboard.d.ts +0 -3
- package/types/shaders/depth.d.ts +0 -2
- package/types/shaders/drawnode.d.ts +0 -8
- package/types/shaders/geoObject.d.ts +0 -3
- package/types/shaders/label.d.ts +0 -4
- package/types/shaders/pickingMask.d.ts +0 -2
- package/types/shaders/pointCloud.d.ts +0 -2
- package/types/shaders/polyline.d.ts +0 -3
- package/types/shaders/ray.d.ts +0 -2
- package/types/shaders/screenFrame.d.ts +0 -2
- package/types/shaders/skybox.d.ts +0 -2
- package/types/shaders/toneMapping.d.ts +0 -2
- package/types/shaders/utils.d.ts +0 -1
- package/types/terrain/BilTerrain.d.ts +0 -14
- package/types/terrain/EmptyTerrain.d.ts +0 -87
- package/types/terrain/Geoid.d.ts +0 -17
- package/types/terrain/GlobusTerrain.d.ts +0 -122
- package/types/terrain/MapboxTerrain.d.ts +0 -14
- package/types/terrain/index.d.ts +0 -5
- package/types/ui/Button.d.ts +0 -21
- package/types/ui/ButtonGroup.d.ts +0 -12
- package/types/ui/Dialog.d.ts +0 -41
- package/types/ui/Slider.d.ts +0 -33
- package/types/ui/ToggleButton.d.ts +0 -10
- package/types/ui/UIhelpers.d.ts +0 -13
- package/types/ui/View.d.ts +0 -33
- package/types/ui/icons.d.ts +0 -1
- package/types/utils/BaseWorker.d.ts +0 -14
- package/types/utils/FontAtlas.d.ts +0 -16
- package/types/utils/GeoImageCreator.d.ts +0 -30
- package/types/utils/ImagesCacheManager.d.ts +0 -10
- package/types/utils/Loader.d.ts +0 -31
- package/types/utils/NormalMapCreator.d.ts +0 -39
- package/types/utils/PlainSegmentWorker.d.ts +0 -8
- package/types/utils/TerrainWorker.d.ts +0 -7
- package/types/utils/TextureAtlas.d.ts +0 -113
- package/types/utils/VectorTileCreator.d.ts +0 -14
- package/types/utils/colorTable.d.ts +0 -143
- package/types/utils/earcut.d.ts +0 -6
- package/types/utils/functionComposition.d.ts +0 -5
- package/types/utils/objParser.d.ts +0 -8
- package/types/utils/shared.d.ts +0 -241
- package/types/utils/units.d.ts +0 -20
- package/types/webgl/Framebuffer.d.ts +0 -134
- package/types/webgl/Handler.d.ts +0 -403
- package/types/webgl/Multisample.d.ts +0 -91
- package/types/webgl/Program.d.ts +0 -163
- package/types/webgl/ProgramController.d.ts +0 -89
- package/types/webgl/callbacks.d.ts +0 -1
- package/types/webgl/index.d.ts +0 -6
- package/types/webgl/types.d.ts +0 -2
- /package/{src/og → dist/@openglobus/res/fonts}/arial.js +0 -0
- /package/src/{og/ui/icons.js → ui/icons.ts} +0 -0
|
@@ -1,18 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import * as math from "../math";
|
|
2
|
+
import {BillboardHandler} from "./BillboardHandler";
|
|
3
|
+
import {createEvents, EventsHandler} from "../Events";
|
|
4
|
+
import {Entity} from "./Entity";
|
|
5
|
+
import {Ellipsoid} from "../ellipsoid/Ellipsoid";
|
|
6
|
+
import {EntityCollectionNode} from "../quadTree/EntityCollectionNode";
|
|
7
|
+
import {GeoObjectHandler} from "./GeoObjectHandler";
|
|
8
|
+
import {Label} from "./Label";
|
|
9
|
+
import {LabelHandler} from "./LabelHandler";
|
|
10
|
+
import {NumberArray3} from "../math/Vec3";
|
|
11
|
+
import {Planet} from "../scene/Planet";
|
|
12
|
+
import {PointCloudHandler} from "./PointCloudHandler";
|
|
13
|
+
import {PolylineHandler} from "./PolylineHandler";
|
|
14
|
+
import {RayHandler} from "./RayHandler";
|
|
15
|
+
import {RenderNode} from "../scene/RenderNode";
|
|
16
|
+
import {StripHandler} from "./StripHandler";
|
|
17
|
+
import {Vector} from "../layer/Vector";
|
|
18
|
+
|
|
19
|
+
export type EntityCollectionEvents = EventsHandler<EntityCollectionEventList>;
|
|
20
|
+
|
|
21
|
+
interface IEntityCollectionParams {
|
|
22
|
+
polygonOffsetUnits?: number;
|
|
23
|
+
visibility?: boolean;
|
|
24
|
+
labelMaxLetters?: number;
|
|
25
|
+
pickingEnabled?: boolean;
|
|
26
|
+
scaleByDistance?: NumberArray3;
|
|
27
|
+
pickingScale?: number;
|
|
28
|
+
opacity?: number;
|
|
29
|
+
|
|
30
|
+
entities?: Entity[];
|
|
31
|
+
}
|
|
12
32
|
|
|
13
33
|
/**
|
|
14
34
|
* An observable collection of og.Entity instances where each entity has a unique id.
|
|
15
|
-
* Entity collection provide handlers for
|
|
35
|
+
* Entity collection provide handlers for each type of entity like billboard, label or 3ds object.
|
|
16
36
|
* @constructor
|
|
17
37
|
* @param {Object} [options] - Entity options:
|
|
18
38
|
* @param {Array.<Entity>} [options.entities] - Entities array.
|
|
@@ -24,173 +44,217 @@ import { StripHandler } from "./StripHandler.js";
|
|
|
24
44
|
* @param {number} [options.opacity] - Entity global opacity.
|
|
25
45
|
* @param {boolean} [options.pickingEnabled=true] - Entity picking enable.
|
|
26
46
|
* @param {Number} [options.polygonOffsetUnits=0.0] - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. The default value is 0.
|
|
27
|
-
* @fires
|
|
28
|
-
* @fires
|
|
29
|
-
* @fires
|
|
30
|
-
* @fires
|
|
31
|
-
* @fires
|
|
32
|
-
* @fires
|
|
33
|
-
* @fires
|
|
34
|
-
* @fires
|
|
35
|
-
* @fires
|
|
36
|
-
* @fires
|
|
37
|
-
* @fires
|
|
38
|
-
* @fires
|
|
39
|
-
* @fires
|
|
40
|
-
* @fires
|
|
41
|
-
* @fires
|
|
42
|
-
* @fires
|
|
43
|
-
* @fires
|
|
44
|
-
* @fires
|
|
45
|
-
* @fires
|
|
46
|
-
* @fires
|
|
47
|
-
* @fires
|
|
48
|
-
* @fires
|
|
49
|
-
* @fires
|
|
50
|
-
* @fires
|
|
51
|
-
* @fires
|
|
52
|
-
* @fires
|
|
53
|
-
* @fires
|
|
54
|
-
* @fires
|
|
55
|
-
* @fires
|
|
56
|
-
* @fires
|
|
57
|
-
* @fires
|
|
58
|
-
* @fires
|
|
59
|
-
* @fires
|
|
47
|
+
* @fires EntityCollection#entitymove
|
|
48
|
+
* @fires EntityCollection#draw
|
|
49
|
+
* @fires EntityCollection#drawend
|
|
50
|
+
* @fires EntityCollection#add
|
|
51
|
+
* @fires EntityCollection#remove
|
|
52
|
+
* @fires EntityCollection#entityadd
|
|
53
|
+
* @fires EntityCollection#entityremove
|
|
54
|
+
* @fires EntityCollection#visibilitychange
|
|
55
|
+
* @fires EntityCollection#mousemove
|
|
56
|
+
* @fires EntityCollection#mouseenter
|
|
57
|
+
* @fires EntityCollection#mouseleave
|
|
58
|
+
* @fires EntityCollection#lclick
|
|
59
|
+
* @fires EntityCollection#rclick
|
|
60
|
+
* @fires EntityCollection#mclick
|
|
61
|
+
* @fires EntityCollection#ldblclick
|
|
62
|
+
* @fires EntityCollection#rdblclick
|
|
63
|
+
* @fires EntityCollection#mdblclick
|
|
64
|
+
* @fires EntityCollection#lup
|
|
65
|
+
* @fires EntityCollection#rup
|
|
66
|
+
* @fires EntityCollection#mup
|
|
67
|
+
* @fires EntityCollection#ldown
|
|
68
|
+
* @fires EntityCollection#rdown
|
|
69
|
+
* @fires EntityCollection#mdown
|
|
70
|
+
* @fires EntityCollection#lhold
|
|
71
|
+
* @fires EntityCollection#rhold
|
|
72
|
+
* @fires EntityCollection#mhold
|
|
73
|
+
* @fires EntityCollection#mousewheel
|
|
74
|
+
* @fires EntityCollection#touchmove
|
|
75
|
+
* @fires EntityCollection#touchstart
|
|
76
|
+
* @fires EntityCollection#touchend
|
|
77
|
+
* @fires EntityCollection#doubletouch
|
|
78
|
+
* @fires EntityCollection#touchleave
|
|
79
|
+
* @fires EntityCollection#touchenter
|
|
60
80
|
*/
|
|
61
81
|
class EntityCollection {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
|
|
83
|
+
static __counter__: number = 0;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Uniq identifier.
|
|
87
|
+
* @public
|
|
88
|
+
* @readonly
|
|
89
|
+
*/
|
|
90
|
+
protected __id: number;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Render node collections array index.
|
|
94
|
+
* @protected
|
|
95
|
+
* @type {number}
|
|
96
|
+
*/
|
|
97
|
+
protected _renderNodeIndex: number;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Render node context.
|
|
101
|
+
* @public
|
|
102
|
+
* @type {RenderNode}
|
|
103
|
+
*/
|
|
104
|
+
public renderNode: RenderNode | null;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Visibility option.
|
|
108
|
+
* @public
|
|
109
|
+
* @type {boolean}
|
|
110
|
+
*/
|
|
111
|
+
public _visibility: boolean;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Specifies the scale Units for gl.polygonOffset function to calculate depth values, 0.0 is default.
|
|
115
|
+
* @public
|
|
116
|
+
* @type {Number}
|
|
117
|
+
*/
|
|
118
|
+
public polygonOffsetUnits: number;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Billboards handler
|
|
122
|
+
* @public
|
|
123
|
+
* @type {BillboardHandler}
|
|
124
|
+
*/
|
|
125
|
+
public billboardHandler: BillboardHandler;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Labels handler
|
|
129
|
+
* @public
|
|
130
|
+
* @type {LabelHandler}
|
|
131
|
+
*/
|
|
132
|
+
public labelHandler: LabelHandler;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Polyline handler
|
|
136
|
+
* @public
|
|
137
|
+
* @type {PolylineHandler}
|
|
138
|
+
*/
|
|
139
|
+
public polylineHandler: PolylineHandler;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Ray handler
|
|
143
|
+
* @public
|
|
144
|
+
* @type {RayHandler}
|
|
145
|
+
*/
|
|
146
|
+
public rayHandler: RayHandler;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* PointCloud handler
|
|
150
|
+
* @public
|
|
151
|
+
* @type {PointCloudHandler}
|
|
152
|
+
*/
|
|
153
|
+
public pointCloudHandler: PointCloudHandler;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Strip handler
|
|
157
|
+
* @public
|
|
158
|
+
* @type {StripHandler}
|
|
159
|
+
*/
|
|
160
|
+
public stripHandler: StripHandler;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Geo object handler
|
|
164
|
+
* @public
|
|
165
|
+
* @type {GeoObjectHandler}
|
|
166
|
+
*/
|
|
167
|
+
public geoObjectHandler: GeoObjectHandler;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Entities array.
|
|
171
|
+
* @public
|
|
172
|
+
* @type {Array.<Entity>}
|
|
173
|
+
*/
|
|
174
|
+
public _entities: Entity[];
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* First index - near distance to the entity, after entity becomes full scale.
|
|
178
|
+
* Second index - far distance to the entity, when entity becomes zero scale.
|
|
179
|
+
* Third index - far distance to the entity, when entity becomes invisible.
|
|
180
|
+
* @public
|
|
181
|
+
* @type {Array.<number>} - (exactly 3 entries)
|
|
182
|
+
*/
|
|
183
|
+
public scaleByDistance: NumberArray3;
|
|
184
|
+
|
|
185
|
+
public pickingScale: number;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Global opacity.
|
|
189
|
+
* @protected
|
|
190
|
+
* @type {number}
|
|
191
|
+
*/
|
|
192
|
+
protected _opacity: number;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Opacity state during the animated opacity.
|
|
196
|
+
* @public
|
|
197
|
+
* @type {number}
|
|
198
|
+
*/
|
|
199
|
+
public _fadingOpacity: number;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Entity collection events handler.
|
|
203
|
+
* @public
|
|
204
|
+
* @type {EntityCollectionEvents}
|
|
205
|
+
*/
|
|
206
|
+
public events: EntityCollectionEvents;
|
|
207
|
+
|
|
208
|
+
public rendererEvents: EntityCollectionEvents;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Used in EntityCollectionNode, also could be merged with _quadNode
|
|
212
|
+
*/
|
|
213
|
+
public _layer?: Vector;
|
|
214
|
+
public _quadNode?: EntityCollectionNode;
|
|
215
|
+
|
|
216
|
+
constructor(options: IEntityCollectionParams = {}) {
|
|
217
|
+
|
|
218
|
+
this.__id = EntityCollection.__counter__++;
|
|
219
|
+
|
|
77
220
|
this._renderNodeIndex = -1;
|
|
78
221
|
|
|
79
|
-
/**
|
|
80
|
-
* Render node context.
|
|
81
|
-
* @public
|
|
82
|
-
* @type {RenderNode}
|
|
83
|
-
*/
|
|
84
222
|
this.renderNode = null;
|
|
85
223
|
|
|
86
|
-
/**
|
|
87
|
-
* Visibility option.
|
|
88
|
-
* @protected
|
|
89
|
-
* @type {boolean}
|
|
90
|
-
*/
|
|
91
224
|
this._visibility = options.visibility == undefined ? true : options.visibility;
|
|
92
225
|
|
|
93
|
-
/**
|
|
94
|
-
* Specifies the scale Units for gl.polygonOffset function to calculate depth values, 0.0 is default.
|
|
95
|
-
* @public
|
|
96
|
-
* @type {Number}
|
|
97
|
-
*/
|
|
98
226
|
this.polygonOffsetUnits =
|
|
99
227
|
options.polygonOffsetUnits != undefined ? options.polygonOffsetUnits : 0.0;
|
|
100
228
|
|
|
101
|
-
/**
|
|
102
|
-
* Billboards handler
|
|
103
|
-
* @public
|
|
104
|
-
* @type {BillboardHandler}
|
|
105
|
-
*/
|
|
106
229
|
this.billboardHandler = new BillboardHandler(this);
|
|
107
230
|
|
|
108
|
-
/**
|
|
109
|
-
* Labels handler
|
|
110
|
-
* @public
|
|
111
|
-
* @type {LabelHandler}
|
|
112
|
-
*/
|
|
113
231
|
this.labelHandler = new LabelHandler(this, options.labelMaxLetters);
|
|
114
232
|
|
|
115
|
-
/**
|
|
116
|
-
* Polyline handler
|
|
117
|
-
* @public
|
|
118
|
-
* @type {PolylineHandler}
|
|
119
|
-
*/
|
|
120
233
|
this.polylineHandler = new PolylineHandler(this);
|
|
121
234
|
|
|
122
|
-
/**
|
|
123
|
-
* Ray handler
|
|
124
|
-
* @public
|
|
125
|
-
* @type {RayHandler}
|
|
126
|
-
*/
|
|
127
235
|
this.rayHandler = new RayHandler(this);
|
|
128
236
|
|
|
129
|
-
/**
|
|
130
|
-
* PointCloud handler
|
|
131
|
-
* @public
|
|
132
|
-
* @type {PointCloudHandler}
|
|
133
|
-
*/
|
|
134
237
|
this.pointCloudHandler = new PointCloudHandler(this);
|
|
135
238
|
|
|
136
|
-
/**
|
|
137
|
-
* Strip handler
|
|
138
|
-
* @public
|
|
139
|
-
* @type {StripHandler}
|
|
140
|
-
*/
|
|
141
239
|
this.stripHandler = new StripHandler(this);
|
|
142
240
|
|
|
143
|
-
/**
|
|
144
|
-
* Geo object handler
|
|
145
|
-
* @public
|
|
146
|
-
* @type {og.GeoObjectHandler}
|
|
147
|
-
*/
|
|
148
241
|
this.geoObjectHandler = new GeoObjectHandler(this);
|
|
149
242
|
|
|
150
243
|
if (options.pickingEnabled != undefined) {
|
|
151
244
|
this.setPickingEnabled(options.pickingEnabled);
|
|
152
245
|
}
|
|
153
246
|
|
|
154
|
-
/**
|
|
155
|
-
* Entities array.
|
|
156
|
-
* @protected
|
|
157
|
-
* @type {Array.<Entity>}
|
|
158
|
-
*/
|
|
159
247
|
this._entities = [];
|
|
160
248
|
|
|
161
|
-
/**
|
|
162
|
-
* First index - near distance to the entity, after entity becomes full scale.
|
|
163
|
-
* Second index - far distance to the entity, when entity becomes zero scale.
|
|
164
|
-
* Third index - far distance to the entity, when entity becomes invisible.
|
|
165
|
-
* @public
|
|
166
|
-
* @type {Array.<number>} - (exactly 3 entries)
|
|
167
|
-
*/
|
|
168
249
|
this.scaleByDistance = options.scaleByDistance || [math.MAX32, math.MAX32, math.MAX32];
|
|
169
250
|
|
|
170
251
|
this.pickingScale = options.pickingScale || 1.0;
|
|
171
252
|
|
|
172
|
-
/**
|
|
173
|
-
* Global opacity.
|
|
174
|
-
* @protected
|
|
175
|
-
* @type {number}
|
|
176
|
-
*/
|
|
177
253
|
this._opacity = options.opacity == undefined ? 1.0 : options.opacity;
|
|
178
254
|
|
|
179
|
-
/**
|
|
180
|
-
* Opacity state during the animated opacity.
|
|
181
|
-
* @protected
|
|
182
|
-
* @type {number}
|
|
183
|
-
*/
|
|
184
255
|
this._fadingOpacity = this._opacity;
|
|
185
256
|
|
|
186
|
-
|
|
187
|
-
* Entity collection events handler.
|
|
188
|
-
* @public
|
|
189
|
-
* @type {Events}
|
|
190
|
-
*/
|
|
191
|
-
this.events = new Events(EVENT_NAMES, this);
|
|
192
|
-
|
|
193
|
-
this.rendererEvents = this.events;
|
|
257
|
+
this.events = this.rendererEvents = createEvents<EntityCollectionEventList>(ENTITYCOLLECTION_EVENTS, this);
|
|
194
258
|
|
|
195
259
|
// initialize current entities
|
|
196
260
|
if (options.entities) {
|
|
@@ -198,15 +262,12 @@ class EntityCollection {
|
|
|
198
262
|
}
|
|
199
263
|
}
|
|
200
264
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
this._counter = 0;
|
|
204
|
-
}
|
|
205
|
-
return this._counter;
|
|
265
|
+
get id(): number {
|
|
266
|
+
return this.__id;
|
|
206
267
|
}
|
|
207
268
|
|
|
208
|
-
|
|
209
|
-
this.
|
|
269
|
+
public isEqual(ec: EntityCollection): boolean {
|
|
270
|
+
return this.__id === ec.__id;
|
|
210
271
|
}
|
|
211
272
|
|
|
212
273
|
/**
|
|
@@ -214,7 +275,7 @@ class EntityCollection {
|
|
|
214
275
|
* @public
|
|
215
276
|
* @param {boolean} visibility - Visibility flag.
|
|
216
277
|
*/
|
|
217
|
-
setVisibility(visibility) {
|
|
278
|
+
public setVisibility(visibility: boolean) {
|
|
218
279
|
this._visibility = visibility;
|
|
219
280
|
this._fadingOpacity = this._opacity * (visibility ? 1 : 0);
|
|
220
281
|
this.events.dispatch(this.events.visibilitychange, this);
|
|
@@ -225,7 +286,7 @@ class EntityCollection {
|
|
|
225
286
|
* @public
|
|
226
287
|
* @returns {boolean} -
|
|
227
288
|
*/
|
|
228
|
-
getVisibility() {
|
|
289
|
+
public getVisibility(): boolean {
|
|
229
290
|
return this._visibility;
|
|
230
291
|
}
|
|
231
292
|
|
|
@@ -234,7 +295,7 @@ class EntityCollection {
|
|
|
234
295
|
* @public
|
|
235
296
|
* @param {number} opacity - Opacity.
|
|
236
297
|
*/
|
|
237
|
-
setOpacity(opacity) {
|
|
298
|
+
public setOpacity(opacity: number) {
|
|
238
299
|
this._opacity = opacity;
|
|
239
300
|
}
|
|
240
301
|
|
|
@@ -243,7 +304,7 @@ class EntityCollection {
|
|
|
243
304
|
* @public
|
|
244
305
|
* @param {boolean} enable - Picking enable flag.
|
|
245
306
|
*/
|
|
246
|
-
setPickingEnabled(enable) {
|
|
307
|
+
public setPickingEnabled(enable: boolean) {
|
|
247
308
|
this.billboardHandler.pickingEnabled = enable;
|
|
248
309
|
this.labelHandler.pickingEnabled = enable;
|
|
249
310
|
this.polylineHandler.pickingEnabled = enable;
|
|
@@ -258,7 +319,7 @@ class EntityCollection {
|
|
|
258
319
|
* @public
|
|
259
320
|
* @returns {number} -
|
|
260
321
|
*/
|
|
261
|
-
getOpacity() {
|
|
322
|
+
public getOpacity(): number {
|
|
262
323
|
return this._opacity;
|
|
263
324
|
}
|
|
264
325
|
|
|
@@ -266,20 +327,20 @@ class EntityCollection {
|
|
|
266
327
|
* Sets scale by distance parameters.
|
|
267
328
|
* @public
|
|
268
329
|
* @param {number} near - Full scale entity distance.
|
|
269
|
-
* @param {number} far -
|
|
330
|
+
* @param {number} far - Zero scale entity distance.
|
|
270
331
|
* @param {number} [farInvisible] - Entity visibility distance.
|
|
271
332
|
*/
|
|
272
|
-
setScaleByDistance(near, far, farInvisible) {
|
|
333
|
+
public setScaleByDistance(near: number, far: number, farInvisible?: number) {
|
|
273
334
|
this.scaleByDistance[0] = near;
|
|
274
335
|
this.scaleByDistance[1] = far;
|
|
275
336
|
this.scaleByDistance[2] = farInvisible || math.MAX32;
|
|
276
337
|
}
|
|
277
338
|
|
|
278
|
-
appendChildEntity(entity) {
|
|
339
|
+
public appendChildEntity(entity: Entity) {
|
|
279
340
|
this._addRecursively(entity);
|
|
280
341
|
}
|
|
281
342
|
|
|
282
|
-
_addRecursively(entity) {
|
|
343
|
+
protected _addRecursively(entity: Entity) {
|
|
283
344
|
// billboard
|
|
284
345
|
entity.billboard && this.billboardHandler.add(entity.billboard);
|
|
285
346
|
|
|
@@ -317,16 +378,16 @@ class EntityCollection {
|
|
|
317
378
|
* @param {Entity} entity - Entity.
|
|
318
379
|
* @returns {EntityCollection} -
|
|
319
380
|
*/
|
|
320
|
-
add(entity) {
|
|
381
|
+
public add(entity: Entity): EntityCollection {
|
|
321
382
|
if (!entity._entityCollection) {
|
|
322
383
|
entity._entityCollection = this;
|
|
323
384
|
entity._entityCollectionIndex = this._entities.length;
|
|
324
385
|
this._entities.push(entity);
|
|
325
|
-
|
|
386
|
+
let rn: RenderNode | null = this.renderNode;
|
|
326
387
|
if (rn) {
|
|
327
|
-
rn.renderer && rn.renderer.assignPickingColor(entity);
|
|
328
|
-
if (rn.ellipsoid && entity._cartesian.isZero()) {
|
|
329
|
-
entity.setCartesian3v(rn.ellipsoid.lonLatToCartesian(entity._lonLat));
|
|
388
|
+
rn.renderer && rn.renderer.assignPickingColor<Entity>(entity);
|
|
389
|
+
if ((rn as Planet).ellipsoid && entity._cartesian.isZero()) {
|
|
390
|
+
entity.setCartesian3v((rn as Planet).ellipsoid.lonLatToCartesian(entity._lonLat));
|
|
330
391
|
}
|
|
331
392
|
}
|
|
332
393
|
this._addRecursively(entity);
|
|
@@ -341,7 +402,7 @@ class EntityCollection {
|
|
|
341
402
|
* @param {Array.<Entity>} entities - Entities array.
|
|
342
403
|
* @returns {EntityCollection} -
|
|
343
404
|
*/
|
|
344
|
-
addEntities(entities) {
|
|
405
|
+
public addEntities(entities: Entity[]): EntityCollection {
|
|
345
406
|
for (let i = 0, len = entities.length; i < len; i++) {
|
|
346
407
|
this.add(entities[i]);
|
|
347
408
|
}
|
|
@@ -354,14 +415,11 @@ class EntityCollection {
|
|
|
354
415
|
* @param {Entity} entity - Entity.
|
|
355
416
|
* @returns {boolean} -
|
|
356
417
|
*/
|
|
357
|
-
belongs(entity) {
|
|
358
|
-
return
|
|
359
|
-
entity._entityCollection &&
|
|
360
|
-
this._renderNodeIndex === entity._entityCollection._renderNodeIndex
|
|
361
|
-
);
|
|
418
|
+
public belongs(entity: Entity) {
|
|
419
|
+
return entity._entityCollection && this._renderNodeIndex === entity._entityCollection._renderNodeIndex;
|
|
362
420
|
}
|
|
363
421
|
|
|
364
|
-
_removeRecursively(entity) {
|
|
422
|
+
protected _removeRecursively(entity: Entity) {
|
|
365
423
|
entity._entityCollection = null;
|
|
366
424
|
entity._entityCollectionIndex = -1;
|
|
367
425
|
|
|
@@ -396,7 +454,7 @@ class EntityCollection {
|
|
|
396
454
|
* @public
|
|
397
455
|
* @param {Entity} entity - Entity to remove.
|
|
398
456
|
*/
|
|
399
|
-
removeEntity(entity) {
|
|
457
|
+
public removeEntity(entity: Entity) {
|
|
400
458
|
this._entities.splice(entity._entityCollectionIndex, 1);
|
|
401
459
|
this.reindexEntitiesArray(entity._entityCollectionIndex);
|
|
402
460
|
|
|
@@ -413,7 +471,7 @@ class EntityCollection {
|
|
|
413
471
|
this.events.dispatch(this.events.entityremove, entity);
|
|
414
472
|
}
|
|
415
473
|
|
|
416
|
-
_removeEntitySilent(entity) {
|
|
474
|
+
public _removeEntitySilent(entity: Entity) {
|
|
417
475
|
this._entities.splice(entity._entityCollectionIndex, 1);
|
|
418
476
|
this.reindexEntitiesArray(entity._entityCollectionIndex);
|
|
419
477
|
|
|
@@ -432,23 +490,24 @@ class EntityCollection {
|
|
|
432
490
|
* Creates or refresh collected entities picking color.
|
|
433
491
|
* @public
|
|
434
492
|
*/
|
|
435
|
-
createPickingColors() {
|
|
436
|
-
|
|
493
|
+
public createPickingColors() {
|
|
494
|
+
if (!(this.renderNode && this.renderNode.renderer)) return;
|
|
495
|
+
let e = this._entities;
|
|
437
496
|
for (let i = 0; i < e.length; i++) {
|
|
438
497
|
if (!e[i].parent) {
|
|
439
|
-
this.renderNode.renderer.assignPickingColor(e[i]);
|
|
498
|
+
this.renderNode.renderer.assignPickingColor<Entity>(e[i]);
|
|
440
499
|
e[i].setPickingColor();
|
|
441
500
|
}
|
|
442
501
|
}
|
|
443
502
|
}
|
|
444
503
|
|
|
445
504
|
/**
|
|
446
|
-
* Refresh collected entities indexes from startIndex
|
|
505
|
+
* Refresh collected entities indexes from startIndex entities collection array position.
|
|
447
506
|
* @public
|
|
448
507
|
* @param {number} startIndex - Entities collection array index.
|
|
449
508
|
*/
|
|
450
|
-
reindexEntitiesArray(startIndex) {
|
|
451
|
-
|
|
509
|
+
public reindexEntitiesArray(startIndex: number) {
|
|
510
|
+
let e = this._entities;
|
|
452
511
|
for (let i = startIndex; i < e.length; i++) {
|
|
453
512
|
e[i]._entityCollectionIndex = i;
|
|
454
513
|
}
|
|
@@ -461,7 +520,7 @@ class EntityCollection {
|
|
|
461
520
|
* @param {boolean} [isHidden] - Uses in vector layers that render in planet render specific function.
|
|
462
521
|
* @returns {EntityCollection} -
|
|
463
522
|
*/
|
|
464
|
-
addTo(renderNode, isHidden) {
|
|
523
|
+
public addTo(renderNode: RenderNode, isHidden: boolean = false) {
|
|
465
524
|
if (!this.renderNode) {
|
|
466
525
|
this.renderNode = renderNode;
|
|
467
526
|
|
|
@@ -470,7 +529,7 @@ class EntityCollection {
|
|
|
470
529
|
renderNode.entityCollections.push(this);
|
|
471
530
|
}
|
|
472
531
|
|
|
473
|
-
renderNode.ellipsoid && this._updateGeodeticCoordinates(renderNode.ellipsoid);
|
|
532
|
+
(renderNode as Planet).ellipsoid && this._updateGeodeticCoordinates((renderNode as Planet).ellipsoid);
|
|
474
533
|
|
|
475
534
|
this.bindRenderNode(renderNode);
|
|
476
535
|
|
|
@@ -481,16 +540,17 @@ class EntityCollection {
|
|
|
481
540
|
|
|
482
541
|
/**
|
|
483
542
|
* This function is called in the RenderNode assign function.
|
|
543
|
+
* @public
|
|
484
544
|
* @param {RenderNode} renderNode
|
|
485
545
|
*/
|
|
486
|
-
bindRenderNode(renderNode) {
|
|
546
|
+
public bindRenderNode(renderNode: RenderNode) {
|
|
487
547
|
if (renderNode.renderer && renderNode.renderer.isInitialized()) {
|
|
488
548
|
|
|
489
549
|
this.billboardHandler.setRenderer(renderNode.renderer);
|
|
490
550
|
this.labelHandler.setRenderer(renderNode.renderer);
|
|
491
551
|
this.rayHandler.setRenderer(renderNode.renderer);
|
|
492
552
|
|
|
493
|
-
this.geoObjectHandler.setRenderNode(renderNode);
|
|
553
|
+
this.geoObjectHandler.setRenderNode(renderNode as Planet);
|
|
494
554
|
this.polylineHandler.setRenderNode(renderNode);
|
|
495
555
|
this.pointCloudHandler.setRenderNode(renderNode);
|
|
496
556
|
this.stripHandler.setRenderNode(renderNode);
|
|
@@ -502,15 +562,15 @@ class EntityCollection {
|
|
|
502
562
|
}
|
|
503
563
|
|
|
504
564
|
/**
|
|
505
|
-
* Updates coordinates all lonLat entities in collection after
|
|
506
|
-
* @
|
|
565
|
+
* Updates coordinates all lonLat entities in collection after collection attached to the planet node.
|
|
566
|
+
* @protected
|
|
507
567
|
* @param {Ellipsoid} ellipsoid - Globe ellipsoid.
|
|
508
568
|
*/
|
|
509
|
-
_updateGeodeticCoordinates(ellipsoid) {
|
|
510
|
-
|
|
511
|
-
|
|
569
|
+
protected _updateGeodeticCoordinates(ellipsoid: Ellipsoid) {
|
|
570
|
+
let e = this._entities;
|
|
571
|
+
let i = e.length;
|
|
512
572
|
while (i--) {
|
|
513
|
-
|
|
573
|
+
let ei = e[i];
|
|
514
574
|
ei._lonLat && ei.setCartesian3v(ellipsoid.lonLatToCartesian(ei._lonLat));
|
|
515
575
|
}
|
|
516
576
|
}
|
|
@@ -519,10 +579,10 @@ class EntityCollection {
|
|
|
519
579
|
* Updates billboard texture atlas.
|
|
520
580
|
* @public
|
|
521
581
|
*/
|
|
522
|
-
updateBillboardsTextureAtlas() {
|
|
523
|
-
|
|
582
|
+
public updateBillboardsTextureAtlas() {
|
|
583
|
+
let b = this.billboardHandler.billboards;
|
|
524
584
|
for (let i = 0; i < b.length; i++) {
|
|
525
|
-
b[i].setSrc(b[i].
|
|
585
|
+
b[i].setSrc(b[i].getSrc());
|
|
526
586
|
}
|
|
527
587
|
}
|
|
528
588
|
|
|
@@ -530,13 +590,14 @@ class EntityCollection {
|
|
|
530
590
|
* Updates labels font atlas.
|
|
531
591
|
* @public
|
|
532
592
|
*/
|
|
533
|
-
updateLabelsFontAtlas() {
|
|
593
|
+
public updateLabelsFontAtlas() {
|
|
534
594
|
if (this.renderNode) {
|
|
535
|
-
|
|
536
|
-
this.labelHandler._billboards = [];
|
|
537
|
-
for (let i = 0; i < l.length; i++) {
|
|
538
|
-
|
|
539
|
-
}
|
|
595
|
+
// let l = ([] as Label[]).concat(this.labelHandler.labels);
|
|
596
|
+
// this.labelHandler._billboards = [];
|
|
597
|
+
// for (let i = 0; i < l.length; i++) {
|
|
598
|
+
// this.labelHandler.assignFontAtlas(l[i]);
|
|
599
|
+
// }
|
|
600
|
+
this.labelHandler.updateFonts();
|
|
540
601
|
}
|
|
541
602
|
}
|
|
542
603
|
|
|
@@ -544,17 +605,13 @@ class EntityCollection {
|
|
|
544
605
|
* Removes collection from render node.
|
|
545
606
|
* @public
|
|
546
607
|
*/
|
|
547
|
-
remove() {
|
|
608
|
+
public remove() {
|
|
548
609
|
if (this.renderNode) {
|
|
549
610
|
if (this._renderNodeIndex !== -1) {
|
|
550
611
|
this.renderNode.entityCollections.splice(this._renderNodeIndex, 1);
|
|
551
612
|
// reindex in the renderNode
|
|
552
|
-
for (
|
|
553
|
-
|
|
554
|
-
i < this.renderNode.entityCollections.length;
|
|
555
|
-
i++
|
|
556
|
-
) {
|
|
557
|
-
this.renderNode.entityCollections._renderNodeIndex = i;
|
|
613
|
+
for (let i = this._renderNodeIndex; i < this.renderNode.entityCollections.length; i++) {
|
|
614
|
+
this.renderNode.entityCollections[i]._renderNodeIndex = i;
|
|
558
615
|
}
|
|
559
616
|
}
|
|
560
617
|
this.renderNode = null;
|
|
@@ -568,8 +625,8 @@ class EntityCollection {
|
|
|
568
625
|
* @public
|
|
569
626
|
* @returns {Array.<Entity>} -
|
|
570
627
|
*/
|
|
571
|
-
getEntities() {
|
|
572
|
-
return [].concat(this._entities);
|
|
628
|
+
public getEntities(): Entity[] {
|
|
629
|
+
return ([] as Entity[]).concat(this._entities);
|
|
573
630
|
}
|
|
574
631
|
|
|
575
632
|
/**
|
|
@@ -577,10 +634,10 @@ class EntityCollection {
|
|
|
577
634
|
* @public
|
|
578
635
|
* @param {function} callback - Entity callback.
|
|
579
636
|
*/
|
|
580
|
-
each(callback) {
|
|
581
|
-
|
|
637
|
+
public each(callback: Function) {
|
|
638
|
+
let i = this._entities.length;
|
|
582
639
|
while (i--) {
|
|
583
|
-
|
|
640
|
+
let ei = this._entities[i];
|
|
584
641
|
ei && callback(ei);
|
|
585
642
|
}
|
|
586
643
|
}
|
|
@@ -589,7 +646,7 @@ class EntityCollection {
|
|
|
589
646
|
* Removes all entities from collection and clear handlers.
|
|
590
647
|
* @public
|
|
591
648
|
*/
|
|
592
|
-
clear() {
|
|
649
|
+
public clear() {
|
|
593
650
|
// TODO: Optimize by replace delete
|
|
594
651
|
// code to the clearEntity function.
|
|
595
652
|
this.billboardHandler.clear();
|
|
@@ -600,9 +657,9 @@ class EntityCollection {
|
|
|
600
657
|
this.stripHandler.clear();
|
|
601
658
|
this.geoObjectHandler.clear();
|
|
602
659
|
|
|
603
|
-
|
|
660
|
+
let i = this._entities.length;
|
|
604
661
|
while (i--) {
|
|
605
|
-
|
|
662
|
+
let ei = this._entities[i];
|
|
606
663
|
if (this.renderNode && this.renderNode.renderer) {
|
|
607
664
|
this.renderNode.renderer.clearPickingColor(ei);
|
|
608
665
|
ei._pickingColor.clear();
|
|
@@ -614,11 +671,11 @@ class EntityCollection {
|
|
|
614
671
|
}
|
|
615
672
|
|
|
616
673
|
/**
|
|
617
|
-
* Clears entity
|
|
674
|
+
* Clears entity recursively.
|
|
618
675
|
* @private
|
|
619
676
|
* @param {Entity} entity - Entity to clear.
|
|
620
677
|
*/
|
|
621
|
-
_clearEntity(entity) {
|
|
678
|
+
protected _clearEntity(entity: Entity) {
|
|
622
679
|
entity._entityCollection = null;
|
|
623
680
|
entity._entityCollectionIndex = -1;
|
|
624
681
|
for (let i = 0; i < entity.childrenNodes.length; i++) {
|
|
@@ -627,204 +684,240 @@ class EntityCollection {
|
|
|
627
684
|
}
|
|
628
685
|
}
|
|
629
686
|
|
|
630
|
-
|
|
687
|
+
type EntityCollectionEventList = [
|
|
688
|
+
"entitymove",
|
|
689
|
+
"draw",
|
|
690
|
+
"drawend",
|
|
691
|
+
"add",
|
|
692
|
+
"remove",
|
|
693
|
+
"entityadd",
|
|
694
|
+
"entityremove",
|
|
695
|
+
"visibilitychange",
|
|
696
|
+
"mousemove",
|
|
697
|
+
"mouseenter",
|
|
698
|
+
"mouseleave",
|
|
699
|
+
"lclick",
|
|
700
|
+
"rclick",
|
|
701
|
+
"mclick",
|
|
702
|
+
"ldblclick",
|
|
703
|
+
"rdblclick",
|
|
704
|
+
"mdblclick",
|
|
705
|
+
"lup",
|
|
706
|
+
"rup",
|
|
707
|
+
"mup",
|
|
708
|
+
"ldown",
|
|
709
|
+
"rdown",
|
|
710
|
+
"mdown",
|
|
711
|
+
"lhold",
|
|
712
|
+
"rhold",
|
|
713
|
+
"mhold",
|
|
714
|
+
"mousewheel",
|
|
715
|
+
"touchmove",
|
|
716
|
+
"touchstart",
|
|
717
|
+
"touchend",
|
|
718
|
+
"doubletouch",
|
|
719
|
+
"touchleave",
|
|
720
|
+
"touchenter"
|
|
721
|
+
]
|
|
722
|
+
|
|
723
|
+
const ENTITYCOLLECTION_EVENTS: EntityCollectionEventList = [
|
|
631
724
|
/**
|
|
632
725
|
* Triggered when entity has moved.
|
|
633
|
-
* @event
|
|
726
|
+
* @event EntityCollection#entitymove
|
|
634
727
|
*/
|
|
635
728
|
"entitymove",
|
|
636
729
|
|
|
637
730
|
/**
|
|
638
731
|
* Triggered when collection entities begin draw.
|
|
639
|
-
* @event
|
|
732
|
+
* @event EntityCollection#draw
|
|
640
733
|
*/
|
|
641
734
|
"draw",
|
|
642
735
|
|
|
643
736
|
/**
|
|
644
737
|
* Triggered after collection has drawn.
|
|
645
|
-
* @event
|
|
738
|
+
* @event EntityCollection#drawend
|
|
646
739
|
*/
|
|
647
740
|
"drawend",
|
|
648
741
|
|
|
649
742
|
/**
|
|
650
743
|
* Triggered when added to the render node.
|
|
651
|
-
* @event
|
|
744
|
+
* @event EntityCollection#add
|
|
652
745
|
*/
|
|
653
746
|
"add",
|
|
654
747
|
|
|
655
748
|
/**
|
|
656
749
|
* Triggered when removed from the render node.
|
|
657
|
-
* @event
|
|
750
|
+
* @event EntityCollection#remove
|
|
658
751
|
*/
|
|
659
752
|
"remove",
|
|
660
753
|
|
|
661
754
|
/**
|
|
662
755
|
* Triggered when new entity added to the collection.
|
|
663
|
-
* @event
|
|
756
|
+
* @event EntityCollection#entityadd
|
|
664
757
|
*/
|
|
665
758
|
"entityadd",
|
|
666
759
|
|
|
667
760
|
/**
|
|
668
761
|
* Triggered when entity removes from the collection.
|
|
669
|
-
* @event
|
|
762
|
+
* @event EntityCollection#entityremove
|
|
670
763
|
*/
|
|
671
764
|
"entityremove",
|
|
672
765
|
|
|
673
766
|
/**
|
|
674
767
|
* Triggered when visibility changes.
|
|
675
|
-
* @event
|
|
768
|
+
* @event EntityCollection#visibilitychange
|
|
676
769
|
*/
|
|
677
770
|
"visibilitychange",
|
|
678
771
|
|
|
679
772
|
/**
|
|
680
773
|
* Triggered when mouse moves over the entity.
|
|
681
|
-
* @event
|
|
774
|
+
* @event EntityCollection#mousemove
|
|
682
775
|
*/
|
|
683
776
|
"mousemove",
|
|
684
777
|
|
|
685
778
|
/**
|
|
686
779
|
* Triggered when mouse has entered over the entity.
|
|
687
|
-
* @event
|
|
780
|
+
* @event EntityCollection#mouseenter
|
|
688
781
|
*/
|
|
689
782
|
"mouseenter",
|
|
690
783
|
|
|
691
784
|
/**
|
|
692
785
|
* Triggered when mouse leaves the entity.
|
|
693
|
-
* @event
|
|
786
|
+
* @event EntityCollection#mouseleave
|
|
694
787
|
*/
|
|
695
788
|
"mouseleave",
|
|
696
789
|
|
|
697
790
|
/**
|
|
698
791
|
* Mouse left button clicked.
|
|
699
|
-
* @event
|
|
792
|
+
* @event EntityCollection#lclick
|
|
700
793
|
*/
|
|
701
794
|
"lclick",
|
|
702
795
|
|
|
703
796
|
/**
|
|
704
797
|
* Mouse right button clicked.
|
|
705
|
-
* @event
|
|
798
|
+
* @event EntityCollection#rclick
|
|
706
799
|
*/
|
|
707
800
|
"rclick",
|
|
708
801
|
|
|
709
802
|
/**
|
|
710
803
|
* Mouse right button clicked.
|
|
711
|
-
* @event
|
|
804
|
+
* @event EntityCollection#mclick
|
|
712
805
|
*/
|
|
713
806
|
"mclick",
|
|
714
807
|
|
|
715
808
|
/**
|
|
716
809
|
* Mouse left button double click.
|
|
717
|
-
* @event
|
|
810
|
+
* @event EntityCollection#ldblclick
|
|
718
811
|
*/
|
|
719
812
|
"ldblclick",
|
|
720
813
|
|
|
721
814
|
/**
|
|
722
815
|
* Mouse right button double click.
|
|
723
|
-
* @event
|
|
816
|
+
* @event EntityCollection#rdblclick
|
|
724
817
|
*/
|
|
725
818
|
"rdblclick",
|
|
726
819
|
|
|
727
820
|
/**
|
|
728
821
|
* Mouse middle button double click.
|
|
729
|
-
* @event
|
|
822
|
+
* @event EntityCollection#mdblclick
|
|
730
823
|
*/
|
|
731
824
|
"mdblclick",
|
|
732
825
|
|
|
733
826
|
/**
|
|
734
827
|
* Mouse left button up(stop pressing).
|
|
735
|
-
* @event
|
|
828
|
+
* @event EntityCollection#lup
|
|
736
829
|
*/
|
|
737
830
|
"lup",
|
|
738
831
|
|
|
739
832
|
/**
|
|
740
833
|
* Mouse right button up(stop pressing).
|
|
741
|
-
* @event
|
|
834
|
+
* @event EntityCollection#rup
|
|
742
835
|
*/
|
|
743
836
|
"rup",
|
|
744
837
|
|
|
745
838
|
/**
|
|
746
839
|
* Mouse middle button up(stop pressing).
|
|
747
|
-
* @event
|
|
840
|
+
* @event EntityCollection#mup
|
|
748
841
|
*/
|
|
749
842
|
"mup",
|
|
750
843
|
|
|
751
844
|
/**
|
|
752
845
|
* Mouse left button is just pressed down(start pressing).
|
|
753
|
-
* @event
|
|
846
|
+
* @event EntityCollection#ldown
|
|
754
847
|
*/
|
|
755
848
|
"ldown",
|
|
756
849
|
|
|
757
850
|
/**
|
|
758
851
|
* Mouse right button is just pressed down(start pressing).
|
|
759
|
-
* @event
|
|
852
|
+
* @event EntityCollection#rdown
|
|
760
853
|
*/
|
|
761
854
|
"rdown",
|
|
762
855
|
|
|
763
856
|
/**
|
|
764
857
|
* Mouse middle button is just pressed down(start pressing).
|
|
765
|
-
* @event
|
|
858
|
+
* @event EntityCollection#mdown
|
|
766
859
|
*/
|
|
767
860
|
"mdown",
|
|
768
861
|
|
|
769
862
|
/**
|
|
770
863
|
* Mouse left button is pressing.
|
|
771
|
-
* @event
|
|
864
|
+
* @event EntityCollection#lhold
|
|
772
865
|
*/
|
|
773
866
|
"lhold",
|
|
774
867
|
|
|
775
868
|
/**
|
|
776
869
|
* Mouse right button is pressing.
|
|
777
|
-
* @event
|
|
870
|
+
* @event EntityCollection#rhold
|
|
778
871
|
*/
|
|
779
872
|
"rhold",
|
|
780
873
|
|
|
781
874
|
/**
|
|
782
875
|
* Mouse middle button is pressing.
|
|
783
|
-
* @event
|
|
876
|
+
* @event EntityCollection#mhold
|
|
784
877
|
*/
|
|
785
878
|
"mhold",
|
|
786
879
|
|
|
787
880
|
/**
|
|
788
881
|
* Mouse wheel is rotated.
|
|
789
|
-
* @event
|
|
882
|
+
* @event EntityCollection#mousewheel
|
|
790
883
|
*/
|
|
791
884
|
"mousewheel",
|
|
792
885
|
|
|
793
886
|
/**
|
|
794
887
|
* Triggered when touch moves over the entity.
|
|
795
|
-
* @event
|
|
888
|
+
* @event EntityCollection#touchmove
|
|
796
889
|
*/
|
|
797
890
|
"touchmove",
|
|
798
891
|
|
|
799
892
|
/**
|
|
800
893
|
* Triggered when entity begins to touch.
|
|
801
|
-
* @event
|
|
894
|
+
* @event EntityCollection#touchstart
|
|
802
895
|
*/
|
|
803
896
|
"touchstart",
|
|
804
897
|
|
|
805
898
|
/**
|
|
806
899
|
* Triggered when entity ends touching.
|
|
807
|
-
* @event
|
|
900
|
+
* @event EntityCollection#touchend
|
|
808
901
|
*/
|
|
809
902
|
"touchend",
|
|
810
903
|
|
|
811
904
|
/**
|
|
812
905
|
* Triggered entity double touch.
|
|
813
|
-
* @event
|
|
906
|
+
* @event EntityCollection#doubletouch
|
|
814
907
|
*/
|
|
815
908
|
"doubletouch",
|
|
816
909
|
|
|
817
910
|
/**
|
|
818
911
|
* Triggered when touching leaves entity.
|
|
819
|
-
* @event
|
|
912
|
+
* @event EntityCollection#touchleave
|
|
820
913
|
*/
|
|
821
914
|
"touchleave",
|
|
822
915
|
|
|
823
916
|
/**
|
|
824
917
|
* Triggered when touch enters over the entity.
|
|
825
|
-
* @event
|
|
918
|
+
* @event EntityCollection#touchenter
|
|
826
919
|
*/
|
|
827
920
|
"touchenter"
|
|
828
921
|
];
|
|
829
922
|
|
|
830
|
-
export {
|
|
923
|
+
export {EntityCollection};
|